remove dependency on Java 1.7
This commit is contained in:
parent
7f0f16ef62
commit
5cd1f38a4a
1 changed files with 4 additions and 6 deletions
|
@ -8,8 +8,6 @@
|
|||
*/
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -84,14 +82,14 @@ public final class StackKey {
|
|||
if (stack != null) {
|
||||
if (stack.getItem() != k.stack.getItem() ||
|
||||
stack.getHasSubtypes() && stack.getItemDamage() != k.stack.getItemDamage() ||
|
||||
!Objects.equals(stack.getTagCompound(), k.stack.getTagCompound())) {
|
||||
!stack.getTagCompound().equals(k.stack.getTagCompound())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (fluidStack != null) {
|
||||
if (fluidStack.fluidID != k.fluidStack.fluidID ||
|
||||
fluidStack.amount != k.fluidStack.amount ||
|
||||
!Objects.equals(fluidStack.tag, k.fluidStack.tag)) {
|
||||
!fluidStack.tag.equals(k.fluidStack.tag)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -104,13 +102,13 @@ public final class StackKey {
|
|||
if (stack != null) {
|
||||
result = 31 * result + stack.getItem().hashCode();
|
||||
result = 31 * result + stack.getItemDamage();
|
||||
result = 31 * result + Objects.hashCode(stack.getTagCompound());
|
||||
result = 31 * result + stack.getTagCompound().hashCode();
|
||||
}
|
||||
result = 31 * result + 7;
|
||||
if (fluidStack != null) {
|
||||
result = 31 * result + fluidStack.fluidID;
|
||||
result = 31 * result + fluidStack.amount;
|
||||
result = 31 * result + Objects.hashCode(fluidStack.tag);
|
||||
result = 31 * result + fluidStack.tag.hashCode();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue