Package net.minecraft.component.type
Record Class WeaponComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.WeaponComponent
- Record Components:
damagePerAttack-canDisableBlocking-
- Mappings:
Namespace Name named net/minecraft/component/type/WeaponComponentintermediary net/minecraft/class_10590official damnamed damagePerAttackintermediary 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 thedamagePerAttackrecord component.static final PacketCodec<RegistryByteBuf, WeaponComponent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanDisableBlockingrecord component.intReturns the value of thedamagePerAttackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
damagePerAttack
private final int damagePerAttackThe field for thedamagePerAttackrecord 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 aLdam;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 bLdam;b:Lyn;
-
-
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 '=='. -
damagePerAttack
public int damagePerAttack()Returns the value of thedamagePerAttackrecord component.- Returns:
- the value of the
damagePerAttackrecord component
-
canDisableBlocking
public boolean canDisableBlocking()Returns the value of thecanDisableBlockingrecord component.- Returns:
- the value of the
canDisableBlockingrecord component
-