Record Class TeslaArmorItem.TeslaArmorItemPacketHandler
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.TeslaArmorItemPacketHandler
- Enclosing class:
- TeslaArmorItem
public static record TeslaArmorItem.TeslaArmorItemPacketHandler(tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.EffectState state)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTeslaArmorItemPacketHandler(tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.EffectState state) Creates an instance of aTeslaArmorItemPacketHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondecode(net.minecraft.network.FriendlyByteBuf packetBuffer) static voidencode(TeslaArmorItem.TeslaArmorItemPacketHandler msg, net.minecraft.network.FriendlyByteBuf packetBuffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(TeslaArmorItem.TeslaArmorItemPacketHandler msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) final inthashCode()Returns a hash code value for this object.tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.EffectStatestate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TeslaArmorItemPacketHandler
public TeslaArmorItemPacketHandler(tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.EffectState state) Creates an instance of aTeslaArmorItemPacketHandlerrecord class.- Parameters:
state- the value for thestaterecord component
-
-
Method Details
-
encode
public static void encode(TeslaArmorItem.TeslaArmorItemPacketHandler msg, net.minecraft.network.FriendlyByteBuf packetBuffer) -
decode
public static TeslaArmorItem.TeslaArmorItemPacketHandler decode(net.minecraft.network.FriendlyByteBuf packetBuffer) -
handle
public static void handle(TeslaArmorItem.TeslaArmorItemPacketHandler msg, Supplier<net.minecraftforge.network.NetworkEvent.Context> contextSupplier) -
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 withObjects::equals(Object,Object). -
state
public tech.anonymoushacker1279.immersiveweapons.item.armor.TeslaArmorItem.EffectState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-