Jump to content

[1.14.4] Using CookingRecipeSerializer for custom Cookingrecipe


Recommended Posts

I try to create a smeltingrecipe that is capable of creating diffrent results based on the nbt of the input (Enchantments shall persist from ingriedient to result). Therefore I want to create a custom-smelting recipe and use the CookingRecipeSerializer since it provides what I need. But as far as I can see it is not possible to do so, since the functional Interface that is needed in CookingRecipeSerializer is not public. I think it would be bad practise to just

rewrite the CookingRecipeSerializer exactly as it is just to access it. Is there a way around that? Or is reflection needed or even capable of that?

Link to comment
Share on other sites

Excuse me asking but do you have an example or some extra information on using Proxy without having an Implementing Object available, since in all examples I found

they passed this object to the InvocationHandler to use invoke() on the passed method. It is a new thing for me and the tutorials in the net are basicaly repeating the standard case of the Javadoc. Just asking if you had a good example if not Ill just keep searching.

Link to comment
Share on other sites

Now I ran into an unexpected problem, the furnace does not call getCraftingResult which would provide the information about the ingredients nbt instead it uses

getRecipeOutput to determine the result and thus I am unable to do as I intended. I even cant use matches and take the information about the ingreedient from there

because I have not enough Informations to map the ingriedient infs to the specific furnace in the world.

And I failed to find a proper event. Do you have an Idea to work around this?

Link to comment
Share on other sites

Oh sry of course. But there is still the problem that in getRecipeOutput I have no parameter or Information to check which of the Inventorys I saved is the right one.

I first thought that I could just row them up in a list and then always take the first one since it startet the process as the first. But of course different cooking durations make this impossible.

I would need to accsess the TEs and their left cooktime.

Link to comment
Share on other sites

Oh Id did not thought about checkin this out. Thanks for the Idea. By the way is that (the (missing ?) getCraftingResult call) something the forgeteam would add or change in the code in newer versions (assuming it has not already) and should this be put in the improvement forum? Cause I do not see a reason for the furnace not to allow the use of this mightyer method and thus saving modders this "ugly hack"

Edited by Eisenpaulchen
Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Start with removing: modernfix and FlyWheel
    • Vigor Vita CBD Gummies- Behind every product is a story. Vigor Vita CBD Gummies's journey involves a commitment to quality, customer satisfaction, and a genuine desire to enhance the well-being of individuals. Understanding the ethos of the company adds depth to the product experience.   Official Website==> https://bestlifecaremart.com/vigor-vita-cbd-gummies/   Facebook==> https://www.facebook.com/GetVigorVitaCBDGummies/   Groups Google:   https://groups.google.com/g/mozilla.dev.platform/c/kAoLq82Obfc   https://groups.google.com/g/comp.os.vms/c/MMy0pLUnU40   https://groups.google.com/g/mozilla.dev.platform/c/op2Zyok7iKI   Sites Google==> https://sites.google.com/view/vigor-vita-c-b-d-gummies-price/home   Gamma==> https://gamma.app/public/Is-Vigor-Vita-CBD-Gummies-Scam-Read-Reviews-Best-CBD-Gummies-Pric-x91kh5meqawi99c   Jimdo==> https://vigor-vita-cbd-gummies-us-reviews-1.jimdosite.com/   Get More Info:   https://medium.com/@yvettieany/vigor-vita-cbd-gummies-united-states-us-100-natural-benefits-pain-relief-pros-cons-scam-d6cff170cac5   https://www.facebook.com/KellyClarksonSlimFusionGummiesUSA/   https://www.mid-day.com/lifestyle/infotainment/article/vigor-vita-cbd-gummies-reviews-wellness-peak-cbd-gummies-pure-ease-cbd-gummies-23314946   https://groups.google.com/g/mozilla.dev.platform/c/hG7s3KQI2q8  
    • If anyone can help me with this . I'm creating a command to open the GUI of a book. Supposedly this should work. But it doesn't do anything. Can somebody help me? Forge 1.16.5 - Server Side Mod   dispatcher.register( Commands.literal("dummyCommand") .executes(context -> { ItemStack book = new ItemStack(Items.WRITTEN_BOOK); CompoundNBT nbt = new CompoundNBT(); ListNBT pages = new ListNBT(); pages.add(StringNBT.valueOf("{\"text\":\"Hello World\"}")); nbt.putString("author", "Steve"); nbt.putString("title", "my_book"); nbt.put("pages", pages); nbt.putByte("resolved", (byte) 1); book.setTag(nbt); context.getSource().getPlayerOrException().openItemGui(book, Hand.MAIN_HAND); return 1; }) ); I have tried with "SOpenBookWindowPacket" but it only sends the instruction to open a book that the user has in their hand. ServerPlayerEntity serverPlayerEntity = context.getSource().getPlayerOrException(); SOpenBookWindowPacket packet = new SOpenBookWindowPacket(serverPlayerEntity.getUsedItemHand()); serverPlayerEntity.connection.send(packet); The idea is that this mod is an information command for the user. You should not give a book to the user and have them read it. I have seen the Spigot documentation and have found some examples of how this is done on servers. PacketPlayOutCustomPayload packet = new PacketPlayOutCustomPayload("MC|BOpen", new PacketDataSerializer(buf)); Is there a way to do this with Forge Server Side? I've been dealing with this for 2 days and I can't find a solution. I've searched on Google and can't find anything.
    • Finally got around to fixing this, just removed the use method, and changed  FIERY_ARROW_ONLY = (stack) -> stack.getItem() instanceof InitItems.FIERY_ARROW.get(); to FIERY_ARROW_ONLY = (stack) -> stack.is(InitItems.FIERY_ARROW.get()); which fixes the issue, and also allows you to use regular arrows, which is an ability I want (I scrapped this).
    • Check Mod Versions: Ensure you are using the correct version of the Scorge mod compatible with Minecraft 1.16.5. Update or downgrade the mod accordingly. Remove or Update Problematic Mods: Identify and remove mods causing conflicts. Test the game by removing mods one by one until you find the one causing the issue. Update Forge: Use the latest version of Forge for Minecraft 1.16.5 to resolve compatibility issues. Check for Mod Updates: Ensure the Scorge mod is up to date. Mod developers release updates to address bugs and compatibility issues. If the problem persists, consider seeking help on Minecraft modding forums or contacting the mod developer for specific guidance. Always back up your world before making changes.
  • Topics

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.