Everything posted by Dr.Nickenstein
-
Help with my Recipe
Tested it and... doesn't work. Any code I should provide?
-
Help with my Recipe
So it should look like this?: public static final DeferredRegister<IRecipeSerializer<?>> RECIPE_SERIALIZERS = DeferredRegister.create( ForgeRegistries.RECIPE_SERIALIZERS, Humlands.MOD_ID); public static final RegistryObject<IRecipeSerializer<?>> SCULPTOR_SERIALIZER = RECIPE_SERIALIZERS.register("sculptor", () -> new SculptorRecipeSerializer());
-
Help with my Recipe
So I was creating a recipe, and now I have no errors in my code. But it still doesn't work for some reason, could you help me find the error? I'll provide my classes: ISculptorRecipe (Recipe interface): https://pastebin.com/rX7c0wJP SculptorRecipe (Recipe class): https://pastebin.com/fkfG41MJ SculptorRecipeSerializer: (Recipe serializer): https://pastebin.com/kNPgSxcC RecipeSerializerInit (Initializator for the serializer): https://pastebin.com/ZdfWNWyC SculptorItemHandler (Item handler for the tile entity): https://pastebin.com/mp2vWqKs pure_flux_crystal.json (Recipe file): https://pastebin.com/8n4uiHFG Thank you in advance.
-
Question About Recipes
So I can remove both registerType and the SCULPTOR_TYPE field and instead put ISculptorRecipe.SCULPTOR?
-
Question About Recipes
static <T extends IRecipe<?>> IRecipeType<T> register(final String key) { return Registry.register(Registry.RECIPE_TYPE, new ResourceLocation(key), new IRecipeType<T>() { public String toString() { return key; } }); } and this is the register(String) method.
-
Question About Recipes
IRecipeType<SculptorRecipe> SCULPTOR = register("sculptor");
-
Question About Recipes
But then another error comes up, since I'm doing this: public static final IRecipeType<ISculptorRecipe> SCULPTOR_TYPE = registerType(ISculptorRecipe.SCULPTOR); @SuppressWarnings({ "unchecked", "rawtypes" }) private static <T extends IRecipeType> T registerType(ResourceLocation recipeTypeId) { return (T) Registry.register(Registry.RECIPE_TYPE, recipeTypeId, new RecipeType<>()); } The registerType method takes in a ResourceLocation, not an IRecipeType.
-
Question About Recipes
So like vanilla?
-
Question About Recipes
There are only a few methods which take in a ResourceLocation and they are "onOptional, getOrDefault and containsKey". Probably not these one...
-
Question About Recipes
So in the recipe interface 1.15.2 code I had this method: @Nonnull @Override default IRecipeType<?> getType() { return Registry.RECIPE_TYPE.getValue(RECIPE_TYPE_ID).get(); } Now in 1.16.4 it says that .getValue() is undefined. So, what should I put there?
-
Help with my TileEntityTypesInit
So in the registry class on SculptorTileEntity::new I'm getting an error: "The type SculptorTileEntity does not define SculptorTileEntity() that is applicable here". This is my TileEntityTypesInit: https://pastebin.com/0PMN5rE4 This is my tile entity's contructor: public SculptorTileEntity(TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); this.inventory = new SculptorItemHandler(2); }
-
Help for my tool
Ooooooh I thought it was the other way round! Thanks for the help!
-
Help for my tool
So basically I want an item that when is used on a certain block it gives you a certain item and transforms the used block into another one. That works perfectly fine without the if(context.getItem().getDamage() > 1) condition. The whole code is here https://pastebin.com/0tRGVxze
-
Method to get the current durability?
Thank you so much!
-
Method to get the current durability?
I want to get the current durability of an item, what is the method for it?
-
[1.15.2] Render custom projectiles
I tried just removing the model method so putting the texture only but it doesn't work. It's just invisible, no missing texture, no texture. Just invisible
-
[1.15.2] Render custom projectiles
Minecraft has a RenderSnowball, so i guessed i needed that. Yeah, it's nothing special, it's just an item sprite. Now i have another question. The snowball class references to a particle that is called ITEM_SNOWBALL. Now this is a silly question but is the actual projectile a particle or does the entity emit particles? 'Cause it's not just ParticleTypes.SNOW but ParticleTypes.ITEM_SNOWBALL
-
[1.15.2] Render custom projectiles
So I was wondering... How are you supposed to render your custom projectile, saying that it is flat and not 3D? Yes, I've tried looking at the vanilla code but all i found were deprecated and inexisting stuff. It still used @SideOnly(Side.CLIENT) annotation.
-
[ 1.15.1 ] How do you create a timer?
Works fine now. Thank you. Sorry for that error
-
[ 1.15.1 ] How do you create a timer?
oh yeah i forgot super.tick() i believe. I'll check if that was the issue. Now it doesn't run in an infinite loop but i need to check if it actually applies the effects once the timer runs out
-
[ 1.15.1 ] How do you create a timer?
That method doesn't work, it makes my entity stay still forever when i hit it. I'll try to find a better solution
-
[ 1.15.1 ] How do you create a timer?
I tought there was a way to make a timer in the damageEntity in some way, but thanks
-
[ 1.15.1 ] How do you create a timer?
But that's not java :T , you said that pascal
-
[ 1.15.1 ] How do you create a timer?
This is a tick method, i already have the damageEntity method, so i can't use this one
-
[ 1.15.1 ] How do you create a timer?
No, the problem is another one. I already have a method. I can't use the tick() one
IPS spam blocked by CleanTalk.