Started by
Folkpizza
on
Topic category: Help with Minecraft modding (Java Edition)
I am currently working on a mod that involves a custom bar on the players screen. I have made a texture in an overlay for every bar position (full, 2/3, 1/3, and empty). (Here is the procedure I used to do this. Note half full is 2/3 and that each logic variable that changes to true I have already made procedures to show or hide the accosted texture). I tested this in multiplayer but the overlays overlapped each other with each of the players different values. Is there some way for me to set the overlay to only show to some players, or is there another way to do this. I am okay with coding but might need a little help. Thank you in advance!
now that is a Mess of procedure
dont use logic, why logic? why so many variables?? what???
The logic variables are to toggle each part of the bar, like this. Also I have already tested this in single player and it works
you are oversimplifying it, on your condition blocks use the Number Variables and delete all the Logic ones
Okay, I have changed the overlays to be based on the value of the number variable. (Here)
not sure if that works, to avoid bugs make it like
if get Global happiness
whoops
if Get global:happiness for event target entity = 3
do return true
return false
Here. It looks like it works, however the warnings and errors say "Procedure that uses return value must end with a valid return block" should I use a variable that is always true or false?
Btw, thank you so much for your help!
Wait, nvm, I have fixed it, I just had to move around the blocks
:)
Thank you a lot for helping me with my return procedures, however this still doesn't work in multiplayer, is there some way for me to make it so that in multiplayer a player can for example have there custom bar to 1/3, while the other player has it to 2/3 (or with more players more values). Is there some way for me to make it so that the bar status that represents that players happiness score, only appears for that player, so that player A's bar doesn't overlap with player B's bar so that both there values are all glitched and overlapping. Player A's value would show on there screen, while Player B's value would show on there screen, not overlapping. I know this is super wordy but I hope you get the gist. And if you could help me with this I would much appreciate it. Thank you!
make the number variable Player Persistent and not World