Less error prone Kappa

This commit is contained in:
nossr50 2019-10-01 16:28:46 -07:00
parent ec1fdea40d
commit 7f6bbadc1c

View File

@ -32,29 +32,26 @@ public class NBTManager {
public void debugNBTInMainHandItem(Player player) { public void debugNBTInMainHandItem(Player player) {
player.sendMessage("Starting NBT Debug Dump..."); player.sendMessage("Starting NBT Debug Dump...");
ItemStack itemStack = player.getInventory().getItemInMainHand(); ItemStack itemStack = player.getInventory().getItemInMainHand();
player.sendMessage("Checking NBT for "+itemStack.toString()); player.sendMessage("Checking NBT for "+itemStack.toString());
NBTTagCompound nbtTagCompound = getNBTCopy(itemStack);
player.sendMessage("Total NBT Entries: "+nbtTagCompound.getKeys().size()); player.sendMessage("Total NBT Entries: "+getNBTCopy(player.getInventory().getItemInMainHand()).getKeys().size());
printNBT(itemStack, player); printNBT(player.getInventory().getItemInMainHand(), player);
player.sendMessage("-- END OF NBT REPORT --"); player.sendMessage("-- END OF NBT REPORT --");
player.sendMessage("Attempting to add NBT key named - Herp"); player.sendMessage("Attempting to add NBT key named - Herp");
addFloatNBT(itemStack, "herp", 13.37F); addFloatNBT(player.getInventory().getItemInMainHand(), "herp", 13.37F);
player.updateInventory();
player.sendMessage("(After HERP) Total NBT Entries: "+nbtTagCompound.getKeys().size()); player.sendMessage("(After HERP) Total NBT Entries: "+getNBTCopy(player.getInventory().getItemInMainHand()).getKeys().size());
printNBT(itemStack, player); printNBT(player.getInventory().getItemInMainHand(), player);
player.sendMessage("-- END OF NBT REPORT --"); player.sendMessage("-- END OF NBT REPORT --");
player.sendMessage("Attempting to save NBT data..."); player.sendMessage("Attempting to save NBT data...");
player.updateInventory(); player.updateInventory();
} }
public void addNewNBT(ItemStack itemStack) {
}
public net.minecraft.server.v1_14_R1.ItemStack getNMSItemStack(ItemStack itemStack) { public net.minecraft.server.v1_14_R1.ItemStack getNMSItemStack(ItemStack itemStack) {
return CraftItemStack.asNMSCopy(itemStack); return CraftItemStack.asNMSCopy(itemStack);
} }