-
[1.16] Item.onCreated that gets called when getting item?
I just want to add NBT data to the item stacks and it would help keep the abstraction I have going on in my code to have a method where I can place an itemstack instantiation method. It would also work to override a method that creates the default NBT data of the item if there is such a thing.
-
[1.16] Item.onCreated that gets called when getting item?
Item.onCreated gets called only when the item is crafted. Is there a similar method that gets called when the item instance is created, so that it gets called when a mob drops it or you grab the item on creative, etc? If not, how would one go about achieving the same goal through other methods?
-
[1.16] How do you add recipes that depends on the ingredients?
That worked, thank you
-
[1.16] How do you add recipes that depends on the ingredients?
Great, that worked! But the result of the crafting is minecraft:air instead of the IRecipe.getCraftingResult return.
-
[1.16] How do you add recipes that depends on the ingredients?
This is the code https://github.com/crisdesivo/Elemental_Chaos, a lot of stuff is unused, I'm just trying stuff to see what works and what doesn't. The recipe I'm interested in is in com.example.elementalchaos.elementalItems.recipes.RechargeRecipe.java, the registration code is in RegistryHandler, the JSON is com.example.elementalchaos.elementalItems.recipes.recharge.json, and the serializer is defined at com/example/elementalchaos/elementalItems/recipes/ModRecipes.java
-
[1.16] How do you add recipes that depends on the ingredients?
That's the same id as my recipe so that's not working for me, it's an invalid recipe type.
-
[1.16] How do you add recipes that depends on the ingredients?
So how should the JSON look like then? Mine looked like: { "type": recipeid } where recipe id is the one specified in IRecipe.getId. And removing the type raises "com.google.gson.JsonSyntaxException: Missing type, expected to find a string"
-
[1.16] How do you add recipes that depends on the ingredients?
I tried, but it is not recognizing my recipe type, I get "Invalid or unsupported recipe type" error message. How do I point to my recipe from the json if the recipe type I used is just IRecipeType.CRAFTING?
-
[1.16] How do you add recipes that depends on the ingredients?
Thank you. And once I defined my recipe class how do I register it in the game?
-
[1.16] How do you add recipes that depends on the ingredients?
I can't seem to find any examples of this, I'm guessing the ingredient list now goes in the "match" function of IRecipe, but most of the methods I wouldn't know how to complete, namely IRecipe.getId, IRecipe.getSerializer, IRecipe.getType, and the methods of IRecipeSerializer. I think I'd need to see a minimal working example of these classes implemented.
-
[1.16] How do you add recipes that depends on the ingredients?
The method I'm using to add recipes is creating json files as recommended. However this method doesn't seem ideal for working with "dynamic" recipes (meaning recipes that depends on the ingredients). How would you register recipes in a way that lets you access the ingredients' information and edit the result appropriately? Edit: There is probably a guide somewhere for this, but can't find it for this version. If anyone can provide a link that would be more than enough. Thanks!
-
[1.16] Modifying water freezing?
I guess I's impossible then, thanks for your help.
-
[1.16] Modifying water freezing?
Interesting, what's the method to overwrite? I didn't find much documentation about how to check events, for example, how does one check if the event is water freezing versus for example a player placing an ice block on a water source? or an ice block generating on a water source in other way?
-
crischu joined the community
-
[1.16] Modifying water freezing?
I'd like to add a chance of a block spawning every time a water source turns into ice. I check but there is no event to listen to this in the current version. Does anyone know if this would be possible?
IPS spam blocked by CleanTalk.