This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello!
So I have created a custom lock method inside of my tile entity for my chest!
It works fine except for the fact that after re-loading the map, the saved nbt string does not want to be equal to another identical string....
and so, returns false (as well as print a debug message with both the string saved on the chest and key)
Tile Entity
Thanks,
Lukas G. Olson
When comparing Strings, do not use == like you did in line 644. As Strings in Java are Objects, you need to compare them using the method string1.equals(string2) that is inherited every Object.
Check out my mod, Placeable Items!
If my comment helped you or you just like me, hit the green arrow down there!
IT WORKS!!! THANKS SOOOOO MUCH!!!!!!!
I'M SOOO HAPPY
Hello!
So I have created a custom lock method inside of my tile entity for my chest!
It works fine except for the fact that after re-loading the map, the saved nbt string does not want to be equal to another identical string....
and so, returns false (as well as print a debug message with both the string saved on the chest and key)
Tile Entity
Thanks,
Lukas G. Olson
When comparing Strings, do not use == like you did in line 644. As Strings in Java are Objects, you need to compare them using the method string1.equals(string2) that is inherited every Object.
Check out my mod, Placeable Items!
If my comment helped you or you just like me, hit the green arrow down there!
IT WORKS!!! THANKS SOOOOO MUCH!!!!!!!
I'M SOOO HAPPY