Skip to content

Instantly share code, notes, and snippets.

@4801XP
4801XP / PaletteHashTest.java
Created May 25, 2025 15:26 — forked from Alemiz112/PaletteHashTest.java
Example implementation of Minecraft: Bedrock block state network hash computation
public class PaletteHashTest {
private static final int FNV1_32_INIT = 0x811c9dc5;
private static final int FNV1_PRIME_32 = 0x01000193;
public static void main(String[] args) throws Exception {
NbtMap blockState = NbtMap.builder()
.putString("name", "minecraft:bamboo_hanging_sign")
.putCompound("states", NbtMap.builder()
.putInt("facing_direction", 3)