Record Class Equippable

java.lang.Object
java.lang.Record
net.minestom.server.item.component.Equippable

public record Equippable(EquipmentSlot slot, SoundEvent equipSound, @Nullable String assetId, @Nullable String cameraOverlay, @Nullable RegistryTag<EntityType> allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt, boolean equipOnInteract, boolean canBeSheared, SoundEvent shearingSound) extends Record
  • Field Details

  • Constructor Details

    • Equippable

      public Equippable(EquipmentSlot slot, SoundEvent equipSound, @Nullable @Nullable String assetId, @Nullable @Nullable String cameraOverlay, @Nullable @Nullable RegistryTag<EntityType> allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt, boolean equipOnInteract, boolean canBeSheared, SoundEvent shearingSound)
      Creates an instance of a Equippable record class.
      Parameters:
      slot - the value for the slot record component
      equipSound - the value for the equipSound record component
      assetId - the value for the assetId record component
      cameraOverlay - the value for the cameraOverlay record component
      allowedEntities - the value for the allowedEntities record component
      dispensable - the value for the dispensable record component
      swappable - the value for the swappable record component
      damageOnHurt - the value for the damageOnHurt record component
      equipOnInteract - the value for the equipOnInteract record component
      canBeSheared - the value for the canBeSheared record component
      shearingSound - the value for the shearingSound record component
  • Method Details

    • withSlot

      public Equippable withSlot(EquipmentSlot slot)
    • withEquipSound

      public Equippable withEquipSound(SoundEvent equipSound)
    • withAssetId

      public Equippable withAssetId(@Nullable @Nullable String assetId)
    • withCameraOverlay

      public Equippable withCameraOverlay(@Nullable @Nullable String cameraOverlay)
    • withAllowedEntities

      public Equippable withAllowedEntities(@Nullable @Nullable RegistryTag<EntityType> allowedEntities)
    • withDispensable

      public Equippable withDispensable(boolean dispensable)
    • withSwappable

      public Equippable withSwappable(boolean swappable)
    • withDamageOnHurt

      public Equippable withDamageOnHurt(boolean damageOnHurt)
    • withEquipOnInteract

      public Equippable withEquipOnInteract(boolean equipOnInteract)
    • withCanBeSheared

      public Equippable withCanBeSheared(boolean canBeSheared)
    • withShearingSound

      public Equippable withShearingSound(SoundEvent shearingSound)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • slot

      public EquipmentSlot slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component
    • equipSound

      public SoundEvent equipSound()
      Returns the value of the equipSound record component.
      Returns:
      the value of the equipSound record component
    • assetId

      @Nullable public @Nullable String assetId()
      Returns the value of the assetId record component.
      Returns:
      the value of the assetId record component
    • cameraOverlay

      @Nullable public @Nullable String cameraOverlay()
      Returns the value of the cameraOverlay record component.
      Returns:
      the value of the cameraOverlay record component
    • allowedEntities

      @Nullable public @Nullable RegistryTag<EntityType> allowedEntities()
      Returns the value of the allowedEntities record component.
      Returns:
      the value of the allowedEntities record component
    • dispensable

      public boolean dispensable()
      Returns the value of the dispensable record component.
      Returns:
      the value of the dispensable record component
    • swappable

      public boolean swappable()
      Returns the value of the swappable record component.
      Returns:
      the value of the swappable record component
    • damageOnHurt

      public boolean damageOnHurt()
      Returns the value of the damageOnHurt record component.
      Returns:
      the value of the damageOnHurt record component
    • equipOnInteract

      public boolean equipOnInteract()
      Returns the value of the equipOnInteract record component.
      Returns:
      the value of the equipOnInteract record component
    • canBeSheared

      public boolean canBeSheared()
      Returns the value of the canBeSheared record component.
      Returns:
      the value of the canBeSheared record component
    • shearingSound

      public SoundEvent shearingSound()
      Returns the value of the shearingSound record component.
      Returns:
      the value of the shearingSound record component