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) {
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user