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)
|
@Marker(4)
|
||||||
public boolean stopOnDisable = false;
|
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)")
|
@Config("Mixin (recommended)")
|
||||||
@Description("Use the client's mixin for ElytraFly control, which is more accurate but can theoretically be broken by other clients.")
|
@Description("Use the client's mixin for ElytraFly control, which is more accurate but can theoretically be broken by other clients.")
|
||||||
@Marker(2)
|
@Marker(2)
|
||||||
|
@ -118,12 +123,12 @@ public class ElytraFly extends Feature {
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
init = false;
|
init = false;
|
||||||
if(stopOnDisable && !notIngame()) {
|
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();
|
sendDisablePackets();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// stop fall dmg
|
// 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.rotationPitch = 0;
|
||||||
mc.player.motionY = 0.1;
|
mc.player.motionY = 0.1;
|
||||||
sendDisableTimer = ServerDataManager.timeToSurelyTicked();
|
sendDisableTimer = ServerDataManager.timeToSurelyTicked();
|
||||||
|
|
Loading…
Add table
Reference in a new issue