java.lang.Object
com.hammy275.immersivemc.common.network.packet.SwapPacket

public class SwapPacket extends Object
  • Field Details

    • block

      public final net.minecraft.core.BlockPos block
    • slots

      public final List<Integer> slots
    • hand

      public final net.minecraft.world.InteractionHand hand
    • mode

      public final SwapMode mode
    • destination

      public final SwapPacket.SwapDestination destination
  • Constructor Details

    • SwapPacket

      public SwapPacket(net.minecraft.core.BlockPos block, List<Integer> slots, net.minecraft.world.InteractionHand hand, SwapMode mode)
    • SwapPacket

      public SwapPacket(net.minecraft.core.BlockPos block, List<Integer> slots, net.minecraft.world.InteractionHand hand, SwapMode mode, SwapPacket.SwapDestination destination)
  • Method Details

    • encode

      public static void encode(SwapPacket packet, net.minecraft.network.RegistryFriendlyByteBuf buffer)
    • decode

      public static SwapPacket decode(net.minecraft.network.RegistryFriendlyByteBuf buffer)
    • handle

      public static void handle(SwapPacket message, net.minecraft.server.level.ServerPlayer player)