mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Entity: Allow disabling gravity for a mob
This commit is contained in:
@ -99,6 +99,7 @@ class Squid extends WaterAnimal{
|
||||
}
|
||||
|
||||
$inWater = $this->isUnderwater();
|
||||
$this->setHasGravity(!$inWater);
|
||||
if(!$inWater){
|
||||
$this->swimDirection = null;
|
||||
}elseif($this->swimDirection !== null){
|
||||
@ -118,12 +119,6 @@ class Squid extends WaterAnimal{
|
||||
return $hasUpdate;
|
||||
}
|
||||
|
||||
protected function applyGravity() : void{
|
||||
if(!$this->isUnderwater()){
|
||||
parent::applyGravity();
|
||||
}
|
||||
}
|
||||
|
||||
public function getDrops() : array{
|
||||
return [
|
||||
ItemFactory::get(Item::DYE, 0, mt_rand(1, 3))
|
||||
|
Reference in New Issue
Block a user