Posted February 21, 20205 yr comment_385545 Hello world, I'm trying to realize a mod with Forge 1.15.2. I don't have big problem, but I want to implement a specific recipe, for an item. To craft this item, I want players to use 7 different dyes, whatever they are. Only 7 different colors dyes. I found the Tags system, so I used it to write my recipe. But players can still make the recipe with 7 bone meal. I searched a bit, but I didn't find solution for this problem. Do you know how to deal with that, and force players to give 7 different items, corresponding to the same Tag, without forcing especially the dye type ? Here is my recipe.json file : { "type": "minecraft:crafting_shaped", "pattern": [ "bgd", "ddd", "ddd" ], "key": { "b": { "item": "rainbowportals:magic_bucket" }, "g": { "item": "minecraft:water_bucket" }, "d": { "tag": "forge:dyes" } }, "result": { "type": "minecraft:item", "item": "rainbowportals:dye_bucket" } } Thanks by advance
February 21, 20205 yr comment_385548 You will need to make your own IRecipe implementation. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 21, 20205 yr Author comment_385561 Hi, thank you for the reply. I tried to do that, but I don't know how to "register" this new IRecipe. I read some things about "IRecipeFactory", but it seems to be obsolete. I tried too some thing with IRecipeSerializer, but it doesn't seems to work, since I cannot use the identifier from my json recipe. Do you know how I can manage to register this IRecipe and make it usable ? Here is my recipes register class @Mod.EventBusSubscriber(modid = RainbowPortals.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) class RainbowPortalsRecipes { companion object { @SubscribeEvent @JvmStatic fun registerRecipes(event : RegistryEvent.Register<IRecipeSerializer<*>>) { event.registry.register(DyeBucketRecipe.Serializer().setRegistryName("dye_bucket_recipe")) } } } Thanks by advance
February 21, 20205 yr comment_385563 3 minutes ago, Dracoctix said: DyeBucketRecipe.Serializer() You either need to call new on this or show what this method does. Also, it may be that you're working in Kotlin and I just don't know how Kotlin works. What is it that "doesn't seems to work"? Edited February 21, 20205 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 21, 20205 yr Author comment_385566 It's my class, `new` keyword doesn't exist in Kotin. I only need to call the class constructor like any method When I run my world, I have an error saying that "dye_bucket_recipe" is an unknown type. I just figured it out, I forgot the modid prefix. So the recipe is loaded. It doesn't work like I want to, but it's certainly algorithmic problem, so I'll debug that by myself ^^ Thank you very much for your help
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.