Started by
_Vitjok_
on
Topic category: Help with Minecraft modding (Java Edition)
Hey there!
Right now making in my mod boots, that will make you able to auto-jump.
I found this little script here:
{
entity.stepHeight = 1.0F;
}
Yeah, this works, but it's not setting back to 0.5F after undressing the boots and I can't figure how to make player set back step height to 0.5F again.
I already tried using "Every minecraft tick" make step height to 0.5F, but player everytime has 0.5F, even when with boots.
So, how to make player reset their step height back to 0.5F after undressing the boots?
I don't think you can because there's no button that says "when X taken off".
Just do a procedure that has the global trigger : On player tick update; then do an if statement that says: if player is wearing boots, Set step height to (Whatever step height you want), then go to the little settings cogwheel in the top left corner of the if statement block, then add an else block in there. Under the New Else statement, put the stepheight to the lower number that you want all the players without boots to have.
If you have an trouble with this, or don't understand what I'm saying (I say things super complicated sometimes) just ask, also I might be able to post a picture if you want. Also tell me if this doesn't work.
I don't know to put in that step hieght code but here is how you control if player is wearing boots or not. id of slot of boots is = 0. leggings = 1, chestplate =2, and helmet =3, kinda simple.
So fist if, put your new step height code their somehow
2nd put in the code but put change back to normal. etc.
instead of using code you could try this
anytime player collides with a block from 2 or lower distance, it'll attempt to auto-move player on the y axis by 1, then reset it back to 0. if you aim for armor