mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Less error prone Kappa
This commit is contained in:
parent
ec1fdea40d
commit
7f6bbadc1c
@ -32,29 +32,26 @@ public class NBTManager {
|
||||
|
||||
public void debugNBTInMainHandItem(Player player) {
|
||||
player.sendMessage("Starting NBT Debug Dump...");
|
||||
|
||||
ItemStack itemStack = player.getInventory().getItemInMainHand();
|
||||
player.sendMessage("Checking NBT for "+itemStack.toString());
|
||||
NBTTagCompound nbtTagCompound = getNBTCopy(itemStack);
|
||||
|
||||
player.sendMessage("Total NBT Entries: "+nbtTagCompound.getKeys().size());
|
||||
printNBT(itemStack, player);
|
||||
player.sendMessage("Total NBT Entries: "+getNBTCopy(player.getInventory().getItemInMainHand()).getKeys().size());
|
||||
printNBT(player.getInventory().getItemInMainHand(), player);
|
||||
player.sendMessage("-- END OF NBT REPORT --");
|
||||
|
||||
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());
|
||||
printNBT(itemStack, player);
|
||||
player.sendMessage("(After HERP) Total NBT Entries: "+getNBTCopy(player.getInventory().getItemInMainHand()).getKeys().size());
|
||||
printNBT(player.getInventory().getItemInMainHand(), player);
|
||||
player.sendMessage("-- END OF NBT REPORT --");
|
||||
|
||||
player.sendMessage("Attempting to save NBT data...");
|
||||
player.updateInventory();
|
||||
}
|
||||
|
||||
public void addNewNBT(ItemStack itemStack) {
|
||||
|
||||
}
|
||||
|
||||
public net.minecraft.server.v1_14_R1.ItemStack getNMSItemStack(ItemStack itemStack) {
|
||||
return CraftItemStack.asNMSCopy(itemStack);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user