Class CheckedNbtKey

java.lang.Object
com.minecolonies.api.items.CheckedNbtKey

public class CheckedNbtKey extends Object
Representation of a nbt key to match two item stacks.
  • Field Details

  • Constructor Details

    • CheckedNbtKey

      public CheckedNbtKey(@NotNull @NotNull String key, @NotNull @NotNull Set<CheckedNbtKey> children)
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • matches

      public boolean matches(net.minecraft.nbt.CompoundTag nbt1, net.minecraft.nbt.CompoundTag nbt2)
      Check if two nbt match according to this checked nbt keys rules.
      Parameters:
      nbt1 - the first nbt.
      nbt2 - the second nbt.
      Returns:
      true if they match.