Posted May 24, 201411 yr Hi guys. I have got problem. I dont know what i must add in FuelHandler. It it look like that: package net.elementarydiamonds.main; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.IFuelHandler; public class FuelHandler implements IFuelHandler { @Override public int getBurnTime(ItemStack fuel) { return 0; } } So what i must give inside. Please help me as fast as it is possible. ~ogrekpl
May 24, 201411 yr You may want to look up the corresponding page in the Forge Wiki. Otherwise I highly recommend learning more about interfaces in Java.
May 24, 201411 yr Author You may want to look up the corresponding page in the Forge Wiki. Otherwise I highly recommend learning more about interfaces in Java. Oh my god. In 1.6.X was .getID now it doesn't works. No do you understand or not? O wann't listen to some one who would like be as my mum but anyone whou is able to help me.
May 24, 201411 yr Oh my god. In 1.6.X was .getID now it doesn't works. No do you understand or not? O wann't listen to some one who would like be as my mum but anyone whou is able to help me. Most of the parts of this tutorial still work. The only thing you'll need to do is change Item.customItem.itemID to Item.getIdFromItem(Items.apple) If your problem is to determine the item's ID, then please mention it in your root post. Otherwise we're all unable to help.
May 24, 201411 yr There is no need to create a class simply to implement an interface. If your class does nothing else, get rid of it. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
May 25, 201411 yr There is no need to create a class simply to implement an interface. If your class does nothing else, get rid of it. Not really. It's always better to create an extra class implementing an interface just to make your whole project look neatly arranged. However, if you're merging multiple functionalities of the same type to one big compound of methods, then you could also make some kind of handler which handles all events of the same type. Speaking of that, wouldn't it be a good idea to implement the IFuelHandler interface directly into the item to which it belongs to?
May 25, 201411 yr wouldn't it be a good idea to implement the IFuelHandler interface directly into the item to which it belongs to? In theory, that works, but you still have to check for the item specifically, and you still have to initialize it separately in your main mod class. Especially for mods checking for multiple things to add fuel values for, and even for mods who add one, it is better just to add a separate class for it, both for simplicity and readability sake.
May 26, 201411 yr There is no need to create a class simply to implement an interface. If your class does nothing else, get rid of it. Not really. It's always better to create an extra class implementing an interface just to make your whole project look neatly arranged. However, if you're merging multiple functionalities of the same type to one big compound of methods, then you could also make some kind of handler which handles all events of the same type. Speaking of that, wouldn't it be a good idea to implement the IFuelHandler interface directly into the item to which it belongs to? Utter bull-feces! Nothing about adding useless classes makes a project look neatly arraigned. It just makes the programmer look retarded, as they have no idea that an interface is for class mix-ins. Any class can implement any number of interfaces and a superclass if desired. This line of reasoning indicates a lack of experience in Java programming. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.