Record Class EquippableComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.EquippableComponent
Record Components:
slot -
equipSound -
assetId -
cameraOverlay -
allowedEntities -
dispensable -
swappable -
damageOnHurt -

public record EquippableComponent(EquipmentSlot slot, RegistryEntry<SoundEvent> equipSound, Optional<RegistryKey<EquipmentAsset>> assetId, Optional<Identifier> cameraOverlay, Optional<RegistryEntryList<EntityType<?>>> allowedEntities, boolean dispensable, boolean swappable, boolean damageOnHurt) extends Record
Mappings:
Namespace Name
named net/minecraft/component/type/EquippableComponent
intermediary net/minecraft/class_10192
official dev
named slot
intermediary comp_3174
official c
named equipSound
intermediary comp_3175
official d
named assetId
intermediary comp_3176
official e
named cameraOverlay
intermediary comp_3306
official f
named allowedEntities
intermediary comp_3177
official g
named dispensable
intermediary comp_3178
official h
named swappable
intermediary comp_3213
official i
named damageOnHurt
intermediary comp_3214
official j
  • Field Details Link icon

    • slot Link icon

      private final EquipmentSlot slot
      The field for the slot record component.
    • equipSound Link icon

      private final RegistryEntry<SoundEvent> equipSound
      The field for the equipSound record component.
    • assetId Link icon

      private final Optional<RegistryKey<EquipmentAsset>> assetId
      The field for the assetId record component.
    • cameraOverlay Link icon

      private final Optional<Identifier> cameraOverlay
      The field for the cameraOverlay record component.
    • allowedEntities Link icon

      private final Optional<RegistryEntryList<EntityType<?>>> allowedEntities
      The field for the allowedEntities record component.
    • dispensable Link icon

      private final boolean dispensable
      The field for the dispensable record component.
    • swappable Link icon

      private final boolean swappable
      The field for the swappable record component.
    • damageOnHurt Link icon

      private final boolean damageOnHurt
      The field for the damageOnHurt record component.
    • CODEC Link icon

      public static final com.mojang.serialization.Codec<EquippableComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/EquippableComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_54145 Lnet/minecraft/class_10192;field_54145:Lcom/mojang/serialization/Codec;
      official a Ldev;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC Link icon

      public static final PacketCodec<RegistryByteBuf,EquippableComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/EquippableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_54146 Lnet/minecraft/class_10192;field_54146:Lnet/minecraft/class_9139;
      official b Ldev;b:Lyn;
  • Constructor Details Link icon

  • Method Details Link icon

    • ofCarpet Link icon

      public static EquippableComponent ofCarpet(DyeColor color)
      Mappings:
      Namespace Name Mixin selector
      named ofCarpet Lnet/minecraft/component/type/EquippableComponent;ofCarpet(Lnet/minecraft/util/DyeColor;)Lnet/minecraft/component/type/EquippableComponent;
      intermediary method_64017 Lnet/minecraft/class_10192;method_64017(Lnet/minecraft/class_1767;)Lnet/minecraft/class_10192;
      official a Ldev;a(Lcvn;)Ldev;
    • builder Link icon

      public static EquippableComponent.Builder builder(EquipmentSlot slot)
      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/component/type/EquippableComponent;builder(Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/component/type/EquippableComponent$Builder;
      intermediary method_64202 Lnet/minecraft/class_10192;method_64202(Lnet/minecraft/class_1304;)Lnet/minecraft/class_10192$class_10217;
      official a Ldev;a(Lbuu;)Ldev$a;
    • equip Link icon

      public ActionResult equip(ItemStack stack, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      named equip Lnet/minecraft/component/type/EquippableComponent;equip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/util/ActionResult;
      intermediary method_64018 Lnet/minecraft/class_10192;method_64018(Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1269;
      official a Ldev;a(Lcwq;Lcoy;)Lbsl;
    • allows Link icon

      public boolean allows(EntityType<?> entityType)
      Mappings:
      Namespace Name Mixin selector
      named allows Lnet/minecraft/component/type/EquippableComponent;allows(Lnet/minecraft/entity/EntityType;)Z
      intermediary method_64015 Lnet/minecraft/class_10192;method_64015(Lnet/minecraft/class_1299;)Z
      official a Ldev;a(Lbut;)Z
    • toString Link icon

      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 Link icon

      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 Link icon

      public final boolean equals(Object object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • slot Link icon

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

      public RegistryEntry<SoundEvent> equipSound()
      Returns the value of the equipSound record component.
      Returns:
      the value of the equipSound record component
    • assetId Link icon

      public Optional<RegistryKey<EquipmentAsset>> assetId()
      Returns the value of the assetId record component.
      Returns:
      the value of the assetId record component
    • cameraOverlay Link icon

      public Optional<Identifier> cameraOverlay()
      Returns the value of the cameraOverlay record component.
      Returns:
      the value of the cameraOverlay record component
    • allowedEntities Link icon

      public Optional<RegistryEntryList<EntityType<?>>> allowedEntities()
      Returns the value of the allowedEntities record component.
      Returns:
      the value of the allowedEntities record component
    • dispensable Link icon

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

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

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