Fix a different, unrelated OreDict issue.

This commit is contained in:
Ben Spiers committed 2014-07-13 19:53:41 +01:00
1 parent 3e3bf2c25c
commit c560bdc2e1
6 files changed
+60 -23

No files matched your search

+9 -9
View File
@@ -1,29 +1,29 @@
package mekanism.api;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemInfo
{
public Block block;
public Item item;
public int meta;
public ItemInfo(Block b, int j)
public ItemInfo(Item i, int j)
{
block = b;
item = i;
meta = j;
}
public static ItemInfo get(ItemStack stack)
{
return new ItemInfo(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage());
return new ItemInfo(stack.getItem(), stack.getItemDamage());
}
@Override
public boolean equals(Object obj)
{
return obj instanceof ItemInfo &&
((ItemInfo)obj).block == block &&
return obj instanceof BlockInfo &&
((ItemInfo)obj).item == item &&
((ItemInfo)obj).meta == meta;
}
@@ -31,8 +31,8 @@ public class ItemInfo
public int hashCode()
{
int code = 1;
code = 31 * code + block.getUnlocalizedName().hashCode();
code = 31 * code + item.getUnlocalizedName().hashCode();
code = 31 * code + meta;
return code;
}
}
}