Jump to content

Robotic-Brain

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Robotic-Brain

  1. which methods do you mean? writeToNBT and loadFromNBT? In InventoryStackWrapper is my save and load code: (I have no idea what synchronized(this) does, I kinda stole it from EnderStorage ) the strange thing is that when I go trough the code step by step and watch the ItemStack object, I can see, that the NBTTag is properly written and in game it works too. But when I run the code without the debugger it doesn't work! Another thing I noticed in debug mode was, that the stack object of InventoryStackWrapper(ItemStack stack) changes, if it's referenced outside the constructor scope so the initial load seems to work but not the save later on. Since I have no idea how the memory management in java works, i have no idea what could be causing that
  2. Hi, The title says it: I want to make a kind of backpack. I managed to open an Inventory on rightclick and everything but for some reason I can't actually SAVE the ItemStacks The problem lies somewhere between putting an Item in and saving the NBTTagCompund with the Stack The strange thing is, that it randomly works and as soon as I close out of the world it breaks again with absolutely no code changes... (I wish it would crash, then I had a clue where my problem is) I think it has something to do with Client/Server Synchronisation and the GUIs since I can store the amount of rightclicks just fine with NBT data Can somebody please look over my code and point out any glaring "What an Idiot" Errors? (I'm a noob in Java) Thanks in advance for any help! Code (MCP-725):
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.