FLUFFY2 Posted July 6, 2014 Share Posted July 6, 2014 I have a custom recipe that WORKS while useing: GameRegistry.addRecipe(new LanternRefuelRecipe()); But that throws me an error: Unknown recipe class! com.fluffy.amnesia.handler.LanternRefuelRecipe Modder please refer to net.minecraftforge.oredict.RecipeSorter So i just updated my code: RecipeSorter.register("Amnesia:lantern", LanternRefuelRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless"); Its now STOPPED working. No error, crash, just there is no crafting resoults. My Recipe class: http://pastebin.com/3VkyTC1F In the modder forum nobody has clue why is that. It mayebe a bug or it just not that simple how i tought it is. Useing forge .1159! Thanks! Quote Link to comment Share on other sites More sharing options...
LexManos Posted July 6, 2014 Share Posted July 6, 2014 It looks okay to me, however, does the code itself run at all? If you are satisfying the recipe with another recipe earlier in the sort list then it'd work fine. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
FLUFFY2 Posted July 6, 2014 Author Share Posted July 6, 2014 Okey just checked out! If im using the RecipeSorter registration my custom Recipe class never runs. With the bad register way it runs. I checked out the list and it matches how it should look like. Quote Link to comment Share on other sites More sharing options...
LexManos Posted July 6, 2014 Share Posted July 6, 2014 Toss your mod source this way or atleast a small sample to reproduce the issue and i'll see what I can do tonight. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
FLUFFY2 Posted July 6, 2014 Author Share Posted July 6, 2014 W-W-W...WAIT? WHAT? GameRegistry.addRecipe(RecipeSorter.register("Amnesia:lantern", LanternRefuelRecipe.class, Category.SHAPELESS, "after:minecraft:shapeless")); That throws an error. Quote Link to comment Share on other sites More sharing options...
FLUFFY2 Posted July 6, 2014 Author Share Posted July 6, 2014 Um........... Sorry guys for wasting your times. I tought RecipeSorter.register replaces .addRecipe() in case of custom recipes. Problem sloved, thank you very much guys! Quote Link to comment Share on other sites More sharing options...
LexManos Posted July 6, 2014 Share Posted July 6, 2014 No, RecipeSorter needs to register your Recipe CLASS ONCE. So it know how to sort future instances of that class. Shaped comes before shapeless etc.. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon Link to comment Share on other sites More sharing options...
Recommended Posts
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.