Package net.minecraft.component.type
Record Class WeaponComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.WeaponComponent
- Record Components:
itemDamagePerAttack-canDisableBlocking-
- Mappings:
Namespace Name named net/minecraft/component/type/WeaponComponentintermediary net/minecraft/class_10590official dbcnamed itemDamagePerAttackintermediary comp_3481official cnamed canDisableBlockingintermediary comp_3482official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thecanDisableBlockingrecord component.static final com.mojang.serialization.Codec<WeaponComponent> private final intThe field for theitemDamagePerAttackrecord component.static final PacketCodec<RegistryByteBuf, WeaponComponent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanDisableBlockingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theitemDamagePerAttackrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
itemDamagePerAttack
private final int itemDamagePerAttackThe field for theitemDamagePerAttackrecord component. -
canDisableBlocking
private final boolean canDisableBlockingThe field for thecanDisableBlockingrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/WeaponComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_55712Lnet/minecraft/class_10590;field_55712:Lcom/mojang/serialization/Codec;official aLdbc;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/WeaponComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_55713Lnet/minecraft/class_10590;field_55713:Lnet/minecraft/class_9139;official bLdbc;b:Lyt;
-
-
Constructor Details
-
WeaponComponent
public WeaponComponent(int int2, boolean bool)
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
itemDamagePerAttack
public int itemDamagePerAttack()Returns the value of theitemDamagePerAttackrecord component.- Returns:
- the value of the
itemDamagePerAttackrecord component
-
canDisableBlocking
public boolean canDisableBlocking()Returns the value of thecanDisableBlockingrecord component.- Returns:
- the value of the
canDisableBlockingrecord component
-