Record Class AccessoryEffectType
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.accessory.AccessoryEffectType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AccessoryEffectType> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, AccessoryEffectType> -
Constructor Summary
ConstructorsConstructorDescriptionAccessoryEffectType(String name, boolean clamp) Creates an instance of aAccessoryEffectTyperecord class.AccessoryEffectType(net.minecraft.resources.Identifier name) AccessoryEffectType(net.minecraft.resources.Identifier name, boolean clamp) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclamp()Returns the value of theclamprecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, AccessoryEffectType> STREAM_CODEC
-
-
Constructor Details
-
AccessoryEffectType
public AccessoryEffectType(net.minecraft.resources.Identifier name) -
AccessoryEffectType
public AccessoryEffectType(net.minecraft.resources.Identifier name, boolean clamp) -
AccessoryEffectType
Creates an instance of aAccessoryEffectTyperecord class.- Parameters:
name- the value for thenamerecord componentclamp- the value for theclamprecord component
-
-
Method Details
-
createTranslation
-
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 thecomparemethod from their corresponding wrapper classes. -
hashCode
-
toString
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
clamp
public boolean clamp()Returns the value of theclamprecord component.- Returns:
- the value of the
clamprecord component
-