Ensure that server-side nbt is not sent over the network

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2022-01-22 05:48:32 +01:00
parent be1495a385
commit 6e185c718e

View File

@ -46,5 +46,8 @@ public class BlockClientNbtTest {
var nbt = NBT.Compound(Map.of("test", NBT.String("test")));
assertNull(BlockUtils.extractClientNbt(Block.STONE.withNbt(nbt).withHandler(handler)));
assertEquals(nbt, BlockUtils.extractClientNbt(Block.CHEST.withNbt(nbt).withHandler(handler)));
assertEquals(nbt, BlockUtils.extractClientNbt(Block.CHEST
.withNbt(NBT.Compound(Map.of("test", NBT.String("test"), "test2", NBT.String("test"))))
.withHandler(handler)));
}
}