mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 23:13:21 +00:00
A tiny bit compiles in Idea, and doesnt work!
It dont crash though :)
This commit is contained in:
1 parent
f074761b01
commit
0ec827389b
213 files changed
+3050
-2903
No files matched your search
@@ -1,19 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) SpaceToad, 2011-2012
|
||||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||
*/
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author CovertJaguar <http://www.railcraft.info/>
|
||||
*/
|
||||
public class StackWrapper {
|
||||
|
||||
public final ItemStack stack;
|
||||
@@ -25,10 +22,15 @@ public class StackWrapper {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 5;
|
||||
hash = 67 * hash + stack.itemID;
|
||||
|
||||
hash = 67 * hash + stack.getItem().hashCode();
|
||||
|
||||
hash = 67 * hash + stack.getItemDamage();
|
||||
if (stack.stackTagCompound != null)
|
||||
|
||||
if (stack.stackTagCompound != null) {
|
||||
hash = 67 * hash + stack.stackTagCompound.hashCode();
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -39,7 +41,7 @@ public class StackWrapper {
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final StackWrapper other = (StackWrapper) obj;
|
||||
if (stack.itemID != other.stack.itemID)
|
||||
if (stack.getItem() != other.stack.getItem())
|
||||
return false;
|
||||
if (stack.getHasSubtypes() && stack.getItemDamage() != other.stack.getItemDamage())
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user