Record Class EquippableComponent

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

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, boolean equipOnInteract, boolean canBeSheared, RegistryEntry<SoundEvent> shearingSound) extends Record
Mappings:
Namespace Name
named net/minecraft/component/type/EquippableComponent
intermediary net/minecraft/class_10192
official dle
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
named equipOnInteract
intermediary comp_3523
official k
named canBeSheared
intermediary comp_4362
official l
named shearingSound
intermediary comp_4363
official m
  • Field Details

    • slot

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

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

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

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

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

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

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

      private final boolean damageOnHurt
      The field for the damageOnHurt record component.
    • equipOnInteract

      private final boolean equipOnInteract
      The field for the equipOnInteract record component.
    • canBeSheared

      private final boolean canBeSheared
      The field for the canBeSheared record component.
    • shearingSound

      private final RegistryEntry<SoundEvent> shearingSound
      The field for the shearingSound record component.
    • CODEC

      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 Ldle;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      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 Ldle;b:Lzm;
  • Constructor Details

  • Method Details

    • ofCarpet

      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 Ldle;a(Ldbt;)Ldle;
    • ofSaddle

      public static EquippableComponent ofSaddle()
      Mappings:
      Namespace Name Mixin selector
      named ofSaddle Lnet/minecraft/component/type/EquippableComponent;ofSaddle()Lnet/minecraft/component/type/EquippableComponent;
      intermediary method_66699 Lnet/minecraft/class_10192;method_66699()Lnet/minecraft/class_10192;
      official a Ldle;a()Ldle;
    • ofHarness

      public static EquippableComponent ofHarness(DyeColor color)
      Mappings:
      Namespace Name Mixin selector
      named ofHarness Lnet/minecraft/component/type/EquippableComponent;ofHarness(Lnet/minecraft/util/DyeColor;)Lnet/minecraft/component/type/EquippableComponent;
      intermediary method_70740 Lnet/minecraft/class_10192;method_70740(Lnet/minecraft/class_1767;)Lnet/minecraft/class_10192;
      official b Ldle;b(Ldbt;)Ldle;
    • builder

      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 Ldle;a(Lbzw;)Ldle$a;
    • equip

      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 Ldle;a(Ldcv;Lcut;)Lbxj;
    • equipOnInteract

      public ActionResult equipOnInteract(PlayerEntity player, LivingEntity entity, ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named equipOnInteract Lnet/minecraft/component/type/EquippableComponent;equipOnInteract(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/ActionResult;
      intermediary method_66700 Lnet/minecraft/class_10192;method_66700(Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1269;
      official a Ldle;a(Lcut;Lcam;Ldcv;)Lbxj;
    • allows

      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 Ldle;a(Lbzv;)Z
    • 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 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

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

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

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

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

      public Optional<RegistryEntryList<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 RegistryEntry<SoundEvent> shearingSound()
      Returns the value of the shearingSound record component.
      Returns:
      the value of the shearingSound record component