Posted February 9, 20223 yr --> First, I have to warn you, I am new to coding on java, so if you give me a solution, imagine that you are talking to a guy who has been only making texture packs and nothing else ๐ I just started this mod, following Nico Kaupenjohann's tutorial, and I want to add a new entity block that will have a UI, but every time I right-click on it, it opens up the interface, then 1s later, the game crashes and it reports me this error: Caused by: java.lang.RuntimeException: Slot 4 not in valid range - [0,4) I know that this error is due to the fact that my UI has 8 slots and the game somehow considers that there could be only 4, but after a good hour of searching, I couldn't find where the game considers it... If you have any idea, here is the mod on github:ย https://github.com/AstronoCraft/RocketScienceMod/tree/master Thank you in advance for any help!
February 9, 20223 yr Author 6 hours ago, diesieben07 said: Without having looked at your code (because you have not specified which inventory is the problem): Note that ItemStackHandler saves its size to disk. If you change the size later, it will keep the old size when loaded from disk. Have you tried starting a new world? Thank you it works now! ๐ Sorry I'm kinda dumb...
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.