Record Class ItemUnlockEffectData

java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.impl.research.effect.data.ItemUnlockEffectData
All Implemented Interfaces:
ResearchEffectData<ItemUnlockEffect>

public record ItemUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item>> blockedItems) extends Record implements ResearchEffectData<ItemUnlockEffect>
  • Field Details

  • Constructor Details

    • ItemUnlockEffectData

      public ItemUnlockEffectData()
    • ItemUnlockEffectData

      public ItemUnlockEffectData(com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item>> blockedItems)
      Creates an instance of a ItemUnlockEffectData record class.
      Parameters:
      blockedItems - the value for the blockedItems record component
  • Method Details

    • add

      public void add(ItemUnlockEffect effect, net.minecraft.world.level.Level level)
      Specified by:
      add in interface ResearchEffectData<ItemUnlockEffect>
    • remove

      public void remove(ItemUnlockEffect effect, net.minecraft.world.level.Level level)
      Specified by:
      remove in interface ResearchEffectData<ItemUnlockEffect>
    • isBlocked

      public boolean isBlocked(net.minecraft.world.item.ItemStack stack)
    • isBlocked

      public boolean isBlocked(net.minecraft.world.item.Item item)
    • getAll

      public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item>> getAll()
      Specified by:
      getAll in interface ResearchEffectData<ItemUnlockEffect>
    • type

      Specified by:
      type in interface ResearchEffectData<ItemUnlockEffect>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockedItems

      public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item>> blockedItems()
      Returns the value of the blockedItems record component.
      Returns:
      the value of the blockedItems record component