Posted April 24, 20214 yr As already stated in the title, I have problems saving my custom tileentity data, the saving itself works, but when I change the data I close the world and open it again I get an error message (see log). What I don't understand about it when loading the world, the save method should not be called in my tileentity because the data should actually be loaded. why is the method called? this is my TileEntity this is the log: error log.log
April 24, 20214 yr Author 45 minutes ago, diesieben07 said: You are calling it yourself, here: okay makes sense, but how do I prevent the tileentity data from being updated before it is not loaded? in the forge doc to synchronize tileentity data it is checked whether the area is loaded, includes this also the data of the tileentity? 45 minutes ago, diesieben07 said: You increment i every loop, but only add to the ListNBT if the element is not null. So if for example the first element is null, on the 2nd loop i will be 1 and the ListNBT will be empty. You then tell the ListNBT to add at position 1, which it does not have (it's still empty). Do not use the add(int, T) method. Just use a normal foreach loop and add(T). I had used add(i, T) to save the order of the list, but in the end it would not change anything in the function of the tileentity... Edited April 24, 20214 yr by Luis_ST
April 24, 20214 yr Author 28 minutes ago, diesieben07 said: I have no idea what you are talking about. has done itself i have found a solution
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.