-
Recently Browsing
No registered users viewing this page.
-
Posts
-
I have a custom event with the @Cancelable annotation, that I want to only do something if it isn't canceled. At the moment, I'm doing something like: if (!event.isCanceled()) { //Do Something } Which obviously doesn't work. How would I go about making an event that when fired, only runs code if it isn't cancelled? Thanks for your help!
-
I've changed the serializeNBT and deserialize methods so the value of i is in the key: @Override public CompoundNBT serializeNBT() { CompoundNBT data = new CompoundNBT(); for(int i = 0; i < 26; i++) { data.putInt("xp_" + i, (int) xp[i]); data.putInt("dynamic_" + i, dynamicLevels[i]); data.putInt("static_" + i, staticLevels[i]); } return data; } @Override public void deserializeNBT(CompoundNBT data) { for(int i = 0; i < 26; i++) { xp[i] = data.getInt("xp_" + i); dynamicLevels[i] = data.getInt("dynamic_" + i); staticLevels[i] = data.getInt("static_" + i); } } And now it works, thank you! (I think thats what the first person to reply to this post was trying to tell me to do but I didn't understand at the time).
-
By diesieben07 · Posted
Try joining the server anyways and then post the debug.log from server and client.
-
-
Topics
-
Who's Online (See full list)