Package org.geysermc.geyser.item.hashing
Class MinecraftHashEncoder
java.lang.Object
org.geysermc.geyser.item.hashing.MinecraftHashEncoder
Encodes primitive Java objects, lists, and maps into a
HashCode, using Hashing.crc32c() as hash function.
Based off the HashOps class in vanilla Java 1.21.5, and is used by MinecraftHasher.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.hash.HashCodebool(boolean b) com.google.common.hash.HashCodebyteArray(byte[] bytes) com.google.common.hash.HashCodeempty()com.google.common.hash.HashCodeemptyMap()com.google.common.hash.HashCodeintArray(int[] ints) com.google.common.hash.HashCodecom.google.common.hash.HashCodelongArray(long[] longs) com.google.common.hash.HashCodecom.google.common.hash.HashCodenbtList(org.cloudburstmc.nbt.NbtList<?> nbtList) com.google.common.hash.HashCodenbtMap(org.cloudburstmc.nbt.NbtMap map) com.google.common.hash.HashCodesession()com.google.common.hash.HashCode
-
Field Details
-
EMPTY_MAP
public static final byte[] EMPTY_MAP
-
-
Constructor Details
-
MinecraftHashEncoder
-
-
Method Details
-
session
-
empty
public com.google.common.hash.HashCode empty() -
emptyMap
public com.google.common.hash.HashCode emptyMap() -
number
-
string
-
bool
public com.google.common.hash.HashCode bool(boolean b) -
map
public com.google.common.hash.HashCode map(Map<com.google.common.hash.HashCode, com.google.common.hash.HashCode> map) -
nbtMap
public com.google.common.hash.HashCode nbtMap(org.cloudburstmc.nbt.NbtMap map) -
list
-
nbtList
public com.google.common.hash.HashCode nbtList(org.cloudburstmc.nbt.NbtList<?> nbtList) -
byteArray
public com.google.common.hash.HashCode byteArray(byte[] bytes) -
intArray
public com.google.common.hash.HashCode intArray(int[] ints) -
longArray
public com.google.common.hash.HashCode longArray(long[] longs)
-