use of net.minecraft.nbt.ByteArrayNBT in project Mekanism by mekanism.
the class CCArgumentWrapperPropertyTest method testListEmptyPlusByteArray.
@Test
@DisplayName("Test serializing and deserializing lists of lists that would create the inner ones as an empty compound plus a byte array")
void testListEmptyPlusByteArray() {
qt().forAll(lists().of(allBytes()).ofSizeBetween(1, 15)).check(bytes -> {
ListNBT nbt = fromArray(new ListNBT(), fromBytes(bytes));
ListNBT expected = fromArray(new ByteArrayNBT(new byte[0]), new ByteArrayNBT(bytes));
return expected.equals(CCArgumentWrapperTestHelper.wrapAndSanitize(nbt, null, false));
});
}
Aggregations