Esempio n. 1
0
 @Override
 public boolean equals(Object o) {
   return o instanceof InvWithLocation
       && handler.equals(((InvWithLocation) o).handler)
       && world == ((InvWithLocation) o).world
       && pos.equals(((InvWithLocation) o).pos);
 }
Esempio n. 2
0
  @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;
  }
Esempio n. 3
0
 @Override
 public int hashCode() {
   return 31 * handler.hashCode() ^ world.hashCode() ^ pos.hashCode();
 }