Minecraft coding: How to make objects return after use?
-
SUMMARY- need a way for bowls to be returned after eating food in them, need way for buckets to be used up in the crafting of an item but returned later after drinking the item, then changing an eating animation to a drinking one..... *read for more info :P* Real brain twister here, so i've been modding Minecraft for the past 2 or so days (newbie modder here) and have been working on 2 mods that require bowls or buckets my first problem is making it so that when i eat a bowl of food it returns the bowl back to me (like Mushroom soup does) this is what i got so far for the food package net.minecraft.src; import java.util.Random; public class mod_Noodles_Base extends BaseMod{ public static Item NoodlesItem = new Item(500).setMaxStackSize(24).setItemNam… public static Item PlainNoodles = new ItemFood(501,4,0.5F,false).setMaxStackSi… public static Item ChickenNoodles = new ItemFood(502,9,1.0F,false).setMaxStackSi… public mod_Noodles_Base(){ ModLoader.addName(NoodlesItem, "Noodles"); NoodlesItem.iconIndex = ModLoader.addOverride("/gui/items.png","… ModLoader.addRecipe(new ItemStack(NoodlesItem,1), new Object[]{ "W", "W", "W",Character.valueOf('W'), Item.wheat}); ModLoader.addName(PlainNoodles, "Plain Noodles"); PlainNoodles.iconIndex = ModLoader.addOverride("/gui/items.png","… ModLoader.addRecipe(new ItemStack(PlainNoodles,1),new Object[]{ " N ", " B ", 'N', new ItemStack(Item.noodles,1), 'B', Item.bowlEmpty}); ModLoader.addName(ChickenNoodles, "Chicken 'N' Noodles"); ChickenNoodles.iconIndex = ModLoader.addOverride("/gui/items.png","… ModLoader.addRecipe(new ItemStack(ChickenNoodles,1),new Object[]{ " C ", " P ", 'P', new ItemStack(Item.plainnoodles,1), 'C', Item.chickenCooked}); i have a couple more recipes on this too now my next problem is a little different but the same idea i have Item.bucketMilk and i added Item.dyePowder,1,3 (cocoa beans) and when i craft them in game it produces the item Chocolate milk (the mod) like it should but leaves a bucket behind in the crafting table (i know that its programmed that way in-game) i need to remove this so that when the milk bucket is mixed with the cocoa it only forms one object (milkbucket) + (Cocoa Beans) = 1(ChocolateMilk) no items left in the crafting table. Next problem im having is just like the bowl of food......i need the bucket back after drinking the chocolate milk (maybe something like the way potions work) which brings to my last and final problem instead of an eating animation for the chocolate milk i need to substitute it for drinking (like potions work) Heres the Chocolate milk mod at the moment :P need 2 more lines for the bucket returning and drink animation package net.minecraft.src; import java.util.Random; public class mod_Chocolatemilk extends BaseMod{ public static Item ChocolateMilk = new ItemFood(505,6,5F,false).setPotionEffect… public mod_Chocolatemilk(){ ModLoader.addName(ChocolateMilk, "Chocolate Milk"); ChocolateMilk.iconIndex = ModLoader.addOverride("/gui/items.png","… ModLoader.addRecipe(new ItemStack(ChocolateMilk,1), new Object[]{ " C ", " B ", 'C', new ItemStack(Item.dyePowder,1,3), 'B', Item.bucketMilk}); SUMMARY- need a way for bowls to be returned after eating food in them, need way for buckets to be used up in the crafting of an item but returned later after drinking the item, then changing an eating animation to a drinking one..... searched this on google and found nothing so this is like my last hope and if i do get an answer i'll probably post a video about to help anyone else that might be having the same problem as me
-
Answer:
Im actually also new, but have spent a lot of time tinkering with this thing to make a starwars mod for my little step brother. From what I can tell, you are editing your Items.jar and our recipes. Open up ItemMilk.jar and use that as a base for your mods. Hope this helps.
carcrash... at Yahoo! Answers Visit the source
Related Q & A:
- How To Make Multiple Minecraft Accounts?Best solution by answers.com
- How to get actual return type of a generic static method in Java?Best solution by stackoverflow.com
- How can I permanently return to my original yahoo page?Best solution by Yahoo! Answers
- How to make a computer use more RAM?Best solution by Super User
- How to make fluffy rice and which type of type of rice to use?Best solution by Seasoned Advice
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.