@Override public boolean equals(Object o) { return o instanceof InvWithLocation && handler.equals(((InvWithLocation) o).handler) && world == ((InvWithLocation) o).world && pos.equals(((InvWithLocation) o).pos); }
@Override public boolean matches(IItemHandler inv) { boolean matches = super.matches(inv); if (matches) { for (int i = 0; i < inv.getSlots(); i++) { ItemStack stack = inv.getStackInSlot(i); if (stack == null) break; if (stack.getItem() == Items.NAME_TAG) { name = stack.getDisplayName(); if (name.equals(I18n.translateToLocal("item.nameTag.name"))) return false; } } } return matches; }
@Override public int hashCode() { return 31 * handler.hashCode() ^ world.hashCode() ^ pos.hashCode(); }