Package net.nullved.pmweatherapi.network
Record Class S2CRadarsPacket
java.lang.Object
java.lang.Record
net.nullved.pmweatherapi.network.S2CRadarsPacket
- Record Components:
tag- TheCompoundTagto send
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record S2CRadarsPacket(net.minecraft.nbt.CompoundTag tag)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
A packet for sending radar information from Server -> Client (S2C)
- Since:
- 0.14.15.3
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, S2CRadarsPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<S2CRadarsPacket> -
Constructor Summary
ConstructorsConstructorDescriptionS2CRadarsPacket(net.minecraft.nbt.CompoundTag tag) Creates an instance of aS2CRadarsPacketrecord class.S2CRadarsPacket(net.minecraft.network.RegistryFriendlyByteBuf buf) Creates a newS2CRadarsPacketfrom aRegistryFriendlyByteBuf -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(net.minecraft.world.entity.player.Player player) Handles the packet on the CLIENT SIDEfinal inthashCode()Returns a hash code value for this object.net.minecraft.nbt.CompoundTagtag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Gets the packet typevoidwrite(net.minecraft.network.FriendlyByteBuf buf) Writes the data into the givenFriendlyByteBufMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<S2CRadarsPacket> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,S2CRadarsPacket> STREAM_CODEC
-
-
Constructor Details
-
S2CRadarsPacket
public S2CRadarsPacket(net.minecraft.network.RegistryFriendlyByteBuf buf) Creates a newS2CRadarsPacketfrom aRegistryFriendlyByteBuf- Parameters:
buf- TheRegistryFriendlyByteBufto read aCompoundTagfrom- Since:
- 0.14.15.3
-
S2CRadarsPacket
public S2CRadarsPacket(net.minecraft.nbt.CompoundTag tag) Creates an instance of aS2CRadarsPacketrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) Writes the data into the givenFriendlyByteBuf- Parameters:
buf- TheFriendlyByteBufto write into- Since:
- 0.14.15.3
-
handle
public void handle(net.minecraft.world.entity.player.Player player) Handles the packet on the CLIENT SIDE- Parameters:
player- The player the packet was sent to- Since:
- 0.14.15.3
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()Gets the packet type- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload- Returns:
- The packet type
- Since:
- 0.14.15.3
-
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). -
tag
public net.minecraft.nbt.CompoundTag tag()Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-