Translations:Sprinting/17/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "//LEGACY METHOD:玩家在之前的 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; //the timer is 7 ticks else...")
 
No edit summary
Line 1: Line 1:
//LEGACY METHOD:玩家在之前的 tick 中没有向前移动,但现在移动了。必须在地面上。
//LEGACY METHOD:玩家在之前的 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))
{
{

Revision as of 14:01, 11 June 2022

Message definition (Sprinting)
//LEGACY METHOD: the player wasn't moving forward on the previous tick but is now. Must be on ground.
   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; //the timer is 7 ticks
       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);
   }

//LEGACY METHOD:玩家在之前的 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; //the timer is 7 ticks
       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);
   }