public class PacketUtils
extends java.lang.Object
| Constructor and Description |
|---|
PacketUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minecraft.util.math.BlockPos |
readBlockPos(io.netty.buffer.ByteBuf buf) |
static CubePos |
readCubePos(io.netty.buffer.ByteBuf buf) |
static int |
readSignedVarInt(io.netty.buffer.ByteBuf buf)
Reads signed int with variable length encoding, using at most 5 bytes.
|
static void |
write(io.netty.buffer.ByteBuf buf,
net.minecraft.util.math.BlockPos pos) |
static void |
write(io.netty.buffer.ByteBuf buf,
CubePos pos) |
static void |
writeSignedVarInt(io.netty.buffer.ByteBuf buf,
int i)
Writes signed int with variable length encoding, using at most 5 bytes.
|
public static void write(io.netty.buffer.ByteBuf buf,
net.minecraft.util.math.BlockPos pos)
public static net.minecraft.util.math.BlockPos readBlockPos(io.netty.buffer.ByteBuf buf)
public static void write(io.netty.buffer.ByteBuf buf,
CubePos pos)
public static CubePos readCubePos(io.netty.buffer.ByteBuf buf)
public static void writeSignedVarInt(io.netty.buffer.ByteBuf buf,
int i)
buf - byte bufferi - integer to writepublic static int readSignedVarInt(io.netty.buffer.ByteBuf buf)
buf - byte bufferwriteSignedVarInt(ByteBuf, int)