Record Class SelfHandlingNetworkStorageSyncPacket
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.common.network.packet.SelfHandlingNetworkStorageSyncPacket
public record SelfHandlingNetworkStorageSyncPacket(SelfHandlingNetworkStorage storage)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aSelfHandlingNetworkStorageSyncPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondecode(net.minecraft.network.RegistryFriendlyByteBuf buffer) static voidencode(SelfHandlingNetworkStorageSyncPacket message, net.minecraft.network.RegistryFriendlyByteBuf buffer) final booleanIndicates whether some other object is "equal to" this one.static voidhandle(SelfHandlingNetworkStorageSyncPacket packet, net.minecraft.server.level.ServerPlayer player) final inthashCode()Returns a hash code value for this object.storage()Returns the value of thestoragerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SelfHandlingNetworkStorageSyncPacket
Creates an instance of aSelfHandlingNetworkStorageSyncPacketrecord class.- Parameters:
storage- the value for thestoragerecord component
-
-
Method Details
-
encode
public static void encode(SelfHandlingNetworkStorageSyncPacket message, net.minecraft.network.RegistryFriendlyByteBuf buffer) -
decode
public static SelfHandlingNetworkStorageSyncPacket decode(net.minecraft.network.RegistryFriendlyByteBuf buffer) -
handle
public static void handle(SelfHandlingNetworkStorageSyncPacket packet, net.minecraft.server.level.ServerPlayer player) -
toString
-
hashCode
-
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). -
storage
Returns the value of thestoragerecord component.- Returns:
- the value of the
storagerecord component
-