Jump to content

[SOLVED][1.7.2] Recipes returning part of recipe (eg. bucket)


Recommended Posts

Posted

First all, nice to be here and greetings everyone :)

 

My name is Federico, TheGoldSun on Minecraft. I'm a programmer and I recently decided to explore Forge to develop something interesting. My favourite mod is IndustrialCraft2, and actually I'm playing the experimental version, great even with bugs and unfinished mechanics. However, let me ask something to more expert modders as you are!

 

 

I wonder, how can I make an item or a block similar to buckets? I mean... Using a bucket in a recipe, the result is a new item but it returns also empty buckets. Now, of course a filled bucket (water/milk/lava ecc) has is own id, and empty bucket has another one.. So, it's there some arguments to add - may be - tu GameRegistry.addRecipe () to give player back some ItemStack? Searching in bucket classes and in Blocks and Items classes gave me no hints about it. I thought another way could be create an event handler that give player an ItemStack on the crafting of something else, but again.. no hints about that. I even thought that could be a property of item but nothing, it seems there is not anything like that in the properties or methods of Item or Block. Even possible I missed it, of course.

 

So, can anybody help me and reaveal the trick? :D

 

 

Thanks in advance, and sorry if I made some mistake explaining my question, my english is not so good.. xD

 

 

Bye!

Federico Nuzzo

Programmer and Developer

Posted

OHHH!! Well, thanks! Tomorrow I will try. If I not misunderstood, in the istance of the item i use setContainerItem(), with - as argument - the item that have to return back after crafting? However, very thanks! I'll let you know if I solve my problem. :) Good night folks!

 

 

Edit:

 

Finally I verified the method setContainerItem and it worked perfectly, very very thanks. The starting idea is something just like the "forge hammer" or the "cable cutter" in industrialcraft, a tool usable in the crafting table that decreas his health, and I'm quite near to discover how to :D Thanks. I'll modify the topit title with [sOLVED].

Federico Nuzzo

Programmer and Developer

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.

Guest
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
    • Maybe you need to create file in assets/<modid>/items/<itemname>.json with content like this:   { "model": { "type": "minecraft:model", "model": "modname:item/itemname" } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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