Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ItemInventory(ItemStack backpack)
- {
- this.slots = stack.getItemDamage() +2;
- this.stack = stack;
- this.modules = new ItemStack[slots];
- if(!this.stack.hasTagCompound())
- {
- System.out.println("Generating new NBTTagCompound for stack item");
- NBTTagCompound nbt = new NBTTagCompound();
- nbt.setBoolean("createdtag", true);
- System.out.println("Generated Tag " + nbt.toString());
- this.stack.setTagCompound(nbt );
- System.out.println("Has nbt? " + stack.hasTagCompound());
- }
- else readFromNBT(this.stack.getTagCompound());
- }
Advertisement
Add Comment
Please, Sign In to add comment