Interface StreamNetworkChannel.ClientPacketHandle

All Known Subinterfaces:
StreamNetworkChannel.BidirectionalPacketHandle
Enclosing class:
StreamNetworkChannel

public static interface StreamNetworkChannel.ClientPacketHandle
A handle for constructing client-bound packets.
  • Method Summary

    Modifier and Type
    Method
    Description
    toClient(net.minecraft.core.RegistryAccess registryAccess)
    Construct a packet bound for a client.
    toClient(net.minecraft.world.entity.Entity entity)
    Construct a packet bound for a client.
    toClient(net.minecraft.world.entity.player.Player player)
    Construct a packet bound for a client.
    toClient(net.minecraft.world.level.block.entity.BlockEntity tile)
    Construct a packet bound for a client.
    toClient(net.minecraft.world.level.Level level)
    Construct a packet bound for a client.
  • Method Details

    • toClient

      StreamPacket.ToClient toClient(net.minecraft.core.RegistryAccess registryAccess)
      Construct a packet bound for a client.
      Parameters:
      registryAccess - The RegistryAccess instance.
      Returns:
      The packet.
    • toClient

      default StreamPacket.ToClient toClient(net.minecraft.world.level.Level level)
      Construct a packet bound for a client.
      Parameters:
      level - A level to grab the RegistryAccess from.
      Returns:
      The packet.
    • toClient

      default StreamPacket.ToClient toClient(net.minecraft.world.entity.player.Player player)
      Construct a packet bound for a client.
      Parameters:
      player - A player to grab the RegistryAccess from.
      Returns:
      The packet.
    • toClient

      default StreamPacket.ToClient toClient(net.minecraft.world.level.block.entity.BlockEntity tile)
      Construct a packet bound for a client.
      Parameters:
      tile - A BlockEntity to grab the RegistryAccess from.
      Returns:
      The packet.
    • toClient

      default StreamPacket.ToClient toClient(net.minecraft.world.entity.Entity entity)
      Construct a packet bound for a client.
      Parameters:
      entity - An entity to grab the RegistryAccess from.
      Returns:
      The packet.