This commit is contained in:
parent
92e0b46c4c
commit
e72db8f9ff
1 changed files with 7 additions and 2 deletions
|
@ -35,6 +35,11 @@ public class ElytraFly extends Feature {
|
|||
@Marker(4)
|
||||
public boolean stopOnDisable = false;
|
||||
|
||||
@Config("Safe stop")
|
||||
@Description("At the expense of convenience, make stopping less likely to kill you from false fall damage.")
|
||||
@Gate(4)
|
||||
public boolean safeStop = false;
|
||||
|
||||
@Config("Mixin (recommended)")
|
||||
@Description("Use the client's mixin for ElytraFly control, which is more accurate but can theoretically be broken by other clients.")
|
||||
@Marker(2)
|
||||
|
@ -118,12 +123,12 @@ public class ElytraFly extends Feature {
|
|||
public void onDisable() {
|
||||
init = false;
|
||||
if(stopOnDisable && !notIngame()) {
|
||||
if(mc.player.motionY >= -0.1 && mc.player.rotationPitch < 40) {
|
||||
if(!safeStop && mc.player.motionY >= -0.1 && mc.player.rotationPitch < 40) {
|
||||
sendDisablePackets();
|
||||
}
|
||||
else {
|
||||
// stop fall dmg
|
||||
mc.player.connection.sendPacket(new CPacketPlayer.Rotation(mc.player.rotationYaw, 0, false));
|
||||
mc.player.connection.sendPacket(new CPacketPlayer.PositionRotation(mc.player.posX, mc.player.posY, mc.player.posZ, mc.player.rotationYaw, 0, false));
|
||||
mc.player.rotationPitch = 0;
|
||||
mc.player.motionY = 0.1;
|
||||
sendDisableTimer = ServerDataManager.timeToSurelyTicked();
|
||||
|
|
Loading…
Add table
Reference in a new issue