Class ValueNotifyPacket

All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload

public class ValueNotifyPacket extends PacketCodec
Packet for sending a value from server to client.
See Also:
  • Field Details

    • ID

      public static final net.minecraft.resources.ResourceLocation ID
  • 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 class PacketBase
      Returns:
      If this packet can run on a thread other than the main-thread of Minecraft. If this is asynchronous, the player parameter inside the action is not guaranteed to be defined.
    • isContainerValid

      protected boolean isContainerValid(IValueNotifiable container)
    • actionClient

      public void actionClient(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player)
      Description copied from class: PacketBase
      Actions for client-side.
      Specified by:
      actionClient in class PacketBase
      Parameters:
      level - The world.
      player - The player. Can be null if this packet is asynchronous.
    • actionServer

      public void actionServer(net.minecraft.world.level.Level level, net.minecraft.server.level.ServerPlayer player)
      Description copied from class: PacketBase
      Actions for server-side.
      Specified by:
      actionServer in class PacketBase
      Parameters:
      level - The world.
      player - The player.