mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
swimming fixed
This commit is contained in:
parent
3d1dba6b86
commit
6eb13e5bd4
16 changed files with 170 additions and 16 deletions
|
|
@ -21,7 +21,6 @@ class MobController
|
|||
public $someTicker = 0;
|
||||
|
||||
protected $jumping;
|
||||
protected $jumpTimeout;
|
||||
|
||||
public $moveToX, $moveToY, $moveToZ;
|
||||
public $speed;
|
||||
|
|
@ -84,6 +83,11 @@ class MobController
|
|||
return $old + $v4;
|
||||
}
|
||||
|
||||
public function jumpTick(){
|
||||
$this->entity->jumping = $this->jumping;
|
||||
$this->jumping = false;
|
||||
}
|
||||
|
||||
public function movementTick(){
|
||||
$this->entity->moveForward = 0;
|
||||
if($this->updateMove){
|
||||
|
|
|
|||
|
|
@ -16,15 +16,12 @@ class TaskSwimming extends TaskBase
|
|||
{
|
||||
if(!$ai->entity->inWater){
|
||||
$this->reset();
|
||||
$ai->mobController->setJumping(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if(lcg_value() < 0.8){ #1.5.2 method
|
||||
$ai->mobController->setJumping(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function canBeExecuted(EntityAI $ai)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue