Package net.minestom.server.utils
Class Utils
java.lang.Object
net.minestom.server.utils.Utils
public final class Utils
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description static long[]
encodeBlocks(int[] blocks, int bitsPerEntry)
static int
getVarIntSize(int input)
static java.util.UUID
intArrayToUuid(int[] array)
static int
readVarInt(io.netty.buffer.ByteBuf buffer)
static int[]
uuidToIntArray(java.util.UUID uuid)
static void
writeBlocks(io.netty.buffer.ByteBuf buffer, short[] palette, long[] blocksId, int bitsPerEntry)
static void
writeVarInt(BinaryWriter writer, int value)
static void
writeVarIntBuf(io.netty.buffer.ByteBuf buffer, int value)
static void
writeVarLong(BinaryWriter writer, long value)
-
Method Details
-
getVarIntSize
public static int getVarIntSize(int input) -
writeVarIntBuf
public static void writeVarIntBuf(io.netty.buffer.ByteBuf buffer, int value) -
writeVarInt
-
readVarInt
public static int readVarInt(io.netty.buffer.ByteBuf buffer) -
writeVarLong
-
uuidToIntArray
public static int[] uuidToIntArray(java.util.UUID uuid) -
intArrayToUuid
public static java.util.UUID intArrayToUuid(int[] array) -
writeBlocks
public static void writeBlocks(io.netty.buffer.ByteBuf buffer, short[] palette, long[] blocksId, int bitsPerEntry) -
encodeBlocks
public static long[] encodeBlocks(int[] blocks, int bitsPerEntry)
-