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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getVarIntSize

      public static int getVarIntSize​(int input)
    • writeVarIntBuf

      public static void writeVarIntBuf​(io.netty.buffer.ByteBuf buffer, int value)
    • writeVarInt

      public static void writeVarInt​(BinaryWriter writer, int value)
    • readVarInt

      public static int readVarInt​(io.netty.buffer.ByteBuf buffer)
    • writeVarLong

      public static void writeVarLong​(BinaryWriter writer, long value)
    • 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)