Translations:Sprinting/17/zh: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
// |
//遗留方法:玩家在之前的 Tick 中没有向前移动,但现在移动了。必须在地面上。 |
||
if (!this.isSprinting() && this.onGround && !prevSneaking && !prevMovingForward && this.movementInput.moveForward >= f && isntHungry && !this.isUsingItem() && !this.isPotionActive(Potion.blindness)) |
if (!this.isSprinting() && this.onGround && !prevSneaking && !prevMovingForward && this.movementInput.moveForward >= f && isntHungry && !this.isUsingItem() && !this.isPotionActive(Potion.blindness)) |
||
{ |
{ |
||
if (this.sprintToggleTimer <= 0 && !keyBindSprint.isKeyDown()) |
if (this.sprintToggleTimer <= 0 && !keyBindSprint.isKeyDown()) |
||
this.sprintToggleTimer = 7; // |
this.sprintToggleTimer = 7; //时间是 7 刻 |
||
else |
else |
||
this.setSprinting(true); |
this.setSprinting(true); |
Revision as of 06:19, 29 June 2022
//遗留方法:玩家在之前的 Tick 中没有向前移动,但现在移动了。必须在地面上。
if (!this.isSprinting() && this.onGround && !prevSneaking && !prevMovingForward && this.movementInput.moveForward >= f && isntHungry && !this.isUsingItem() && !this.isPotionActive(Potion.blindness)) { if (this.sprintToggleTimer <= 0 && !keyBindSprint.isKeyDown()) this.sprintToggleTimer = 7; //时间是 7 刻 else this.setSprinting(true); } //Activated when the player was moving forward on the previous tick if (!this.isSprinting() && this.movementInput.moveForward >= f && isntHungry && !this.isUsingItem() && !this.isPotionActive(Potion.blindness) && keyBindSprint.isKeyDown()) { this.setSprinting(true); }