Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private CompoundNBT initNbt() {
- if (nbtData != null) {
- InputStream stream = new ByteArrayInputStream(nbtData.getBytes(Charset.forName("UTF-8")));
- try {
- nbt = CompoundNBT.READER.read(new DataInputStream(stream), 255, NBTSizeTracker.INFINITE);
- } catch (IOException e) {
- nbt = new CompoundNBT();
- LOGGER.warn(String.format("could not deserialize NBT: [%s]", nbtData));
- }
- } else {
- nbt = new CompoundNBT();
- }
- CompoundNBT test = new CompoundNBT();
- test.putString("Type", "brown");
- test.putInt("Age", 100);
- test.putBoolean("NoAi", true);
- System.out.println(nbt.toString());
- System.out.println(test.toString());
- return nbt;
- }
- [07:36:17] [Server thread/INFO] [STDOUT/]: [com.resourcefulbees.resourcefulbees.api.beedata.MutationData$MutationOutput:initNbt:337]: {}
- [07:36:17] [Server thread/INFO] [STDOUT/]: [com.resourcefulbees.resourcefulbees.api.beedata.MutationData$MutationOutput:initNbt:338]: {Type:"brown",NoAi:1b,Age:100}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement