mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Improved Falling blocks physics, entity kill, chunk unserialize, fixed flat generator color, fixed nbt tags __toString(), fixed explosion offsets, fixed increased player interaction range in creative
This commit is contained in:
@ -95,8 +95,10 @@ class FallingSand extends Entity{
|
||||
$hasUpdate = $this->entityBaseTick($tickDiff);
|
||||
|
||||
if($this->isAlive()){
|
||||
$pos = (new Vector3($this->x - 0.5, $this->y, $this->z - 0.5))->floor();
|
||||
|
||||
if($this->ticksLived === 1){
|
||||
$block = $this->level->getBlock($pos = (new Vector3($this->x - 0.5, $this->y - 0.5, $this->z - 0.5))->floor());
|
||||
$block = $this->level->getBlock($pos);
|
||||
if($block->getId() !== $this->blockId){
|
||||
$this->kill();
|
||||
return true;
|
||||
@ -114,7 +116,7 @@ class FallingSand extends Entity{
|
||||
$this->motionY *= 1 - $this->drag;
|
||||
$this->motionZ *= $friction;
|
||||
|
||||
$pos = (new Vector3($this->x, $this->y, $this->z))->floor();
|
||||
$pos = (new Vector3($this->x - 0.5, $this->y, $this->z - 0.5))->floor();
|
||||
|
||||
if($this->onGround){
|
||||
$this->kill();
|
||||
|
Reference in New Issue
Block a user