Class ValueNotifyPacket
java.lang.Object
org.cyclops.cyclopscore.network.PacketBase<ValueNotifyPacket>
org.cyclops.cyclopscore.network.PacketCodec<ValueNotifyPacket>
org.cyclops.cyclopscore.network.packet.ValueNotifyPacket
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public class ValueNotifyPacket
extends org.cyclops.cyclopscore.network.PacketCodec<ValueNotifyPacket>
Packet for sending a value from server to client.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.cyclopscore.network.PacketCodec
org.cyclops.cyclopscore.network.PacketCodec.ICodecAction, org.cyclops.cyclopscore.network.PacketCodec.ICodecRunnable
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
Modifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, ValueNotifyPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type
<ValueNotifyPacket> Fields inherited from class org.cyclops.cyclopscore.network.PacketCodec
fieldCache, READ_STRING_MAX_LENGTH
-
Constructor Summary
ConstructorDescriptionValueNotifyPacket
(net.minecraft.world.inventory.MenuType<?> containerType, int valueId, net.minecraft.nbt.CompoundTag value) -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionClient
(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player) void
actionServer
(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player) boolean
isAsync()
protected boolean
isContainerValid
(IValueNotifiable container) Methods inherited from class org.cyclops.cyclopscore.network.PacketCodec
addCodedAction, decode, encode, getAction, getActionSuper, read, write
Methods inherited from class org.cyclops.cyclopscore.network.PacketBase
getCodec, type, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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<ValueNotifyPacket> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ValueNotifyPacket> CODEC
-
-
Constructor Details
-
ValueNotifyPacket
public ValueNotifyPacket() -
ValueNotifyPacket
public ValueNotifyPacket(net.minecraft.world.inventory.MenuType<?> containerType, int valueId, net.minecraft.nbt.CompoundTag value)
-
-
Method Details
-
isAsync
public boolean isAsync()- Specified by:
isAsync
in classorg.cyclops.cyclopscore.network.PacketBase<ValueNotifyPacket>
-
isContainerValid
-
actionClient
public void actionClient(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player) - Specified by:
actionClient
in classorg.cyclops.cyclopscore.network.PacketBase<ValueNotifyPacket>
-
actionServer
public void actionServer(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player) - Specified by:
actionServer
in classorg.cyclops.cyclopscore.network.PacketBase<ValueNotifyPacket>
-