Fixed issues when picking up engines of different types. Closes #42

This commit is contained in:
SirSengir 2012-06-04 22:30:23 +02:00
parent 175703ddf2
commit 90f3466960

View file

@ -13,13 +13,19 @@ import net.minecraft.src.ItemBlock;
import net.minecraft.src.ItemStack; import net.minecraft.src.ItemStack;
import net.minecraft.src.buildcraft.core.ItemBlockBuildCraft; import net.minecraft.src.buildcraft.core.ItemBlockBuildCraft;
public class ItemEngine extends ItemBlockBuildCraft public class ItemEngine extends ItemBlockBuildCraft {
{
public ItemEngine(int i) { public ItemEngine(int i) {
super(i, "engine"); super(i, "engine");
setMaxDamage(0);
setHasSubtypes(true);
} }
@Override
public int getMetadata(int i) {
return i;
}
@SuppressWarnings({ "all" }) @SuppressWarnings({ "all" })
public String getItemNameIS(ItemStack itemstack) { public String getItemNameIS(ItemStack itemstack) {
if (itemstack.getItemDamage() == 0) { if (itemstack.getItemDamage() == 0) {