I worked quite a bit on the mob sensor screen and finally got the dropdown working.
The dropdown was honestly way more annoying than I expected. I had problems with the text not showing, the entries being weird when hovering, and moving the dropdown would only move the text instead of the whole thing.
After messing with it for a while I got it working, with the mob names centered and the hover effect working too.
Then I wanted the selected mob to actually save when I close the screen instead of resetting every time.
Since the block is in main and the screen is in client, I had to figure out how to pass the BlockEntity to the screen without mixing the two.
I added NBT saving to the Mob Sensor BlockEntity, so every sensor can save its own selected mob.
I tested it with multiple sensors and it actually works, so one can be set to Zombie and another to Creeper and they both remember their settings.
I also got HotSwap working, which made testing the GUI changes a lot easier.
Overall, I’m pretty happy with how the mob sensor is going. Now I just need to make it actually detect the mob instead of just remembering it, and add a texture to it, which will be dynamic.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.