mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
Fix a different, unrelated OreDict issue.
This commit is contained in:
1 parent
3e3bf2c25c
commit
c560bdc2e1
6 files changed
+60
-23
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user