Moving Elevators

Moving Elevators

7M Downloads

Dying to fall damage

WenXin20 opened this issue ยท 8 comments

commented

Minecraft v1.15.2
Forge v31.1.61
Moving Elevators v1.2.13

If I set the floor speed to anything above 0.2 blocks/t, I end up dying from fall damage. I'm on a server if that makes a difference.
Using half slabs also causes fall damage with any speed once reaching the ground, or fall through the floor once it becomes solid again.

commented

Fall damage can be further discussed in #17.

As for falling through the platform, it hasn't been happening to me anymore, so I believe it got fixed somewhere along the way.

commented

The fall damage issue is already discussed here, #17, and should now be fixed.
I can't however replicate falling through the platform when using slabs.

commented

Thanks
For the slabs, they were upper slabs that were going up. When they got replaced with solid blocks again, that's when I fell through. I was on a server though, maybe there was some lag.

commented

That probably does have to do with lag then. I will look into that.

commented

Alright, thanks!

commented

i have a couple of suggestions that may fix these issues.

1st is the slab lag issue, if you can allow the platform to go around 2-3 pixels above the destination floor before snapping to solid blocks that should give a small grace period to land on the platform rather than falling through it.

2nd is fall damage from platform speed, if you can add some deceleration to the platform as it arrives to the destination floor (around 4-5 blocks should do it) that should negate the fall damage, kind of like landing the elytra at a smooth angle.

i use a different elevator mod for 1.12.2 that does both of these things however it is not as aesthetically pleasing as your mod is with controllers/displays & that remote control block is just fantastic, the dyeable/nameable floors too.
gotta say... this is gonna be the no.1 elevator mod by far.

EDIT: the deceleration setup also allows you to remove manual speed settings as you can now accelerate to a higher speed between floors that are far apart, closer floors will force the platform to move slower as it would be shorter than the acceleration+deceleration distance.

commented
  1. The player position is set one last time one tick after the blocks have been placed. As far as I understand, the problem is that since the player position is mainly determined client-side, when there's lag on the server the client-side elevator arrives before the server-side and thus the player already starts to fall down before the elevator actually arrives server-side.

  2. Every tick both client and server side, the player motion (speed) and fall distance is set to 0. In version 1.2.14 I also give entities on the platform a tag with the current time and cancel the fall damage event whenever the entity has that tag and it is within 5 seconds of the tag's time. That's why it confuses me that the issue still persists, since I'm literally cancelling all fall damage within 5 seconds of being on the elevator.

I think you're referring to Thut's Elevators, they use an entity for the platform. I don't want to do that, since I would have to rewrite most of the mod and dealing with entities is quite a pain, plus I don't think it would allow for as smooth a transition as I have now.

I would like to keep the platform speed configurable, because I think it's a nice feature for the player to be able to choose the speed.

commented

hmmm i see the conundrum for fall damage... that setup should work flawlessly. i assumed you were using an entity based system too, i'm glad that's not the case though as i have had my fair share of problems with thuts elevators in the past.

the falling through issue might be unavoidable on servers due to it being related to lag, but i noticed that if you call a platform down on top of the player you get put on top of the platform (im sure this is a result of your position check implementation) maybe you could add a 2nd ghost layer under the platform that triggers when in motion and could catch a players hitbox if they lag through, it would only be applied while moving up but may not work at all if the ghost layer disappears to soon, but as it is going up you may not need to have it disappear at all until you trigger downward motion.
i'ts a dirty solution though it might cause more issues than it solves...

just a few ideas i hope might help.
thanks for humouring my mad solutions ;P