Package net.minecraft.component.type
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/EquippableComponentintermediary net/minecraft/class_10192official dqanamed slotintermediary comp_3174official cnamed equipSoundintermediary comp_3175official dnamed assetIdintermediary comp_3176official enamed cameraOverlayintermediary comp_3306official fnamed allowedEntitiesintermediary comp_3177official gnamed dispensableintermediary comp_3178official hnamed swappableintermediary comp_3213official inamed damageOnHurtintermediary comp_3214official jnamed equipOnInteractintermediary comp_3523official knamed canBeShearedintermediary comp_4362official lnamed shearingSoundintermediary comp_4363official m
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<RegistryEntryList<EntityType<?>>> The field for theallowedEntitiesrecord component.private final Optional<RegistryKey<EquipmentAsset>> The field for theassetIdrecord component.private final Optional<Identifier> The field for thecameraOverlayrecord component.private final booleanThe field for thecanBeShearedrecord component.static final com.mojang.serialization.Codec<EquippableComponent> private final booleanThe field for thedamageOnHurtrecord component.private final booleanThe field for thedispensablerecord component.private final booleanThe field for theequipOnInteractrecord component.private final RegistryEntry<SoundEvent> The field for theequipSoundrecord component.static final PacketCodec<RegistryByteBuf, EquippableComponent> private final RegistryEntry<SoundEvent> The field for theshearingSoundrecord component.private final EquipmentSlotThe field for theslotrecord component.private final booleanThe field for theswappablerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEquippableComponent(EquipmentSlot equipmentSlot, RegistryEntry<SoundEvent> registryEntry, Optional<RegistryKey<EquipmentAsset>> optional, Optional<Identifier> optional2, Optional<RegistryEntryList<EntityType<?>>> optional3, boolean bool, boolean bool2, boolean bool3, boolean bool4, boolean bool5, RegistryEntry<SoundEvent> registryEntry2) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedEntitiesrecord component.booleanallows(EntityType<?> entityType) assetId()Returns the value of theassetIdrecord component.static EquippableComponent.Builderbuilder(EquipmentSlot slot) Returns the value of thecameraOverlayrecord component.booleanReturns the value of thecanBeShearedrecord component.booleanReturns the value of thedamageOnHurtrecord component.booleanReturns the value of thedispensablerecord component.final booleanIndicates whether some other object is "equal to" this one.equip(ItemStack stack, PlayerEntity player) booleanReturns the value of theequipOnInteractrecord component.equipOnInteract(PlayerEntity player, LivingEntity entity, ItemStack stack) Returns the value of theequipSoundrecord component.final inthashCode()Returns a hash code value for this object.static EquippableComponentstatic EquippableComponentstatic EquippableComponentofSaddle()Returns the value of theshearingSoundrecord component.slot()Returns the value of theslotrecord component.booleanReturns the value of theswappablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
slot
The field for theslotrecord component. -
equipSound
The field for theequipSoundrecord component. -
assetId
The field for theassetIdrecord component. -
cameraOverlay
The field for thecameraOverlayrecord component. -
allowedEntities
The field for theallowedEntitiesrecord component. -
dispensable
private final boolean dispensableThe field for thedispensablerecord component. -
swappable
private final boolean swappableThe field for theswappablerecord component. -
damageOnHurt
private final boolean damageOnHurtThe field for thedamageOnHurtrecord component. -
equipOnInteract
private final boolean equipOnInteractThe field for theequipOnInteractrecord component. -
canBeSheared
private final boolean canBeShearedThe field for thecanBeShearedrecord component. -
shearingSound
The field for theshearingSoundrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/EquippableComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_54145Lnet/minecraft/class_10192;field_54145:Lcom/mojang/serialization/Codec;official aLdqa;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/EquippableComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_54146Lnet/minecraft/class_10192;field_54146:Lnet/minecraft/class_9139;official bLdqa;b:Laae;
-
-
Constructor Details
-
EquippableComponent
public EquippableComponent(EquipmentSlot equipmentSlot, RegistryEntry<SoundEvent> registryEntry, Optional<RegistryKey<EquipmentAsset>> optional, Optional<Identifier> optional2, Optional<RegistryEntryList<EntityType<?>>> optional3, boolean bool, boolean bool2, boolean bool3, boolean bool4, boolean bool5, RegistryEntry<SoundEvent> registryEntry2)
-
-
Method Details
-
ofCarpet
- Mappings:
Namespace Name Mixin selector named ofCarpetLnet/minecraft/component/type/EquippableComponent;ofCarpet(Lnet/minecraft/util/DyeColor;)Lnet/minecraft/component/type/EquippableComponent;intermediary method_64017Lnet/minecraft/class_10192;method_64017(Lnet/minecraft/class_1767;)Lnet/minecraft/class_10192;official aLdqa;a(Ldgn;)Ldqa;
-
ofSaddle
- Mappings:
Namespace Name Mixin selector named ofSaddleLnet/minecraft/component/type/EquippableComponent;ofSaddle()Lnet/minecraft/component/type/EquippableComponent;intermediary method_66699Lnet/minecraft/class_10192;method_66699()Lnet/minecraft/class_10192;official aLdqa;a()Ldqa;
-
ofHarness
- Mappings:
Namespace Name Mixin selector named ofHarnessLnet/minecraft/component/type/EquippableComponent;ofHarness(Lnet/minecraft/util/DyeColor;)Lnet/minecraft/component/type/EquippableComponent;intermediary method_70740Lnet/minecraft/class_10192;method_70740(Lnet/minecraft/class_1767;)Lnet/minecraft/class_10192;official bLdqa;b(Ldgn;)Ldqa;
-
builder
- Mappings:
Namespace Name Mixin selector named builderLnet/minecraft/component/type/EquippableComponent;builder(Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/component/type/EquippableComponent$Builder;intermediary method_64202Lnet/minecraft/class_10192;method_64202(Lnet/minecraft/class_1304;)Lnet/minecraft/class_10192$class_10217;official aLdqa;a(Lcef;)Ldqa$a;
-
equip
- Mappings:
Namespace Name Mixin selector named equipLnet/minecraft/component/type/EquippableComponent;equip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/util/ActionResult;intermediary method_64018Lnet/minecraft/class_10192;method_64018(Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1269;official aLdqa;a(Ldhp;Lczl;)Lcbq;
-
equipOnInteract
- Mappings:
Namespace Name Mixin selector named equipOnInteractLnet/minecraft/component/type/EquippableComponent;equipOnInteract(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/ActionResult;intermediary method_66700Lnet/minecraft/class_10192;method_66700(Lnet/minecraft/class_1657;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1269;official aLdqa;a(Lczl;Lcew;Ldhp;)Lcbq;
-
allows
- Mappings:
Namespace Name Mixin selector named allowsLnet/minecraft/component/type/EquippableComponent;allows(Lnet/minecraft/entity/EntityType;)Zintermediary method_64015Lnet/minecraft/class_10192;method_64015(Lnet/minecraft/class_1299;)Zofficial aLdqa;a(Lcee;)Z
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
equipSound
Returns the value of theequipSoundrecord component.- Returns:
- the value of the
equipSoundrecord component
-
assetId
Returns the value of theassetIdrecord component.- Returns:
- the value of the
assetIdrecord component
-
cameraOverlay
Returns the value of thecameraOverlayrecord component.- Returns:
- the value of the
cameraOverlayrecord component
-
allowedEntities
Returns the value of theallowedEntitiesrecord component.- Returns:
- the value of the
allowedEntitiesrecord component
-
dispensable
public boolean dispensable()Returns the value of thedispensablerecord component.- Returns:
- the value of the
dispensablerecord component
-
swappable
public boolean swappable()Returns the value of theswappablerecord component.- Returns:
- the value of the
swappablerecord component
-
damageOnHurt
public boolean damageOnHurt()Returns the value of thedamageOnHurtrecord component.- Returns:
- the value of the
damageOnHurtrecord component
-
equipOnInteract
public boolean equipOnInteract()Returns the value of theequipOnInteractrecord component.- Returns:
- the value of the
equipOnInteractrecord component
-
canBeSheared
public boolean canBeSheared()Returns the value of thecanBeShearedrecord component.- Returns:
- the value of the
canBeShearedrecord component
-
shearingSound
Returns the value of theshearingSoundrecord component.- Returns:
- the value of the
shearingSoundrecord component
-