Fixed a wide range of bugs with floating-point coordinates getting incorrectly int-casted

This causes lots of bugs in negative coordinates.

This fixes #1789 after world load & save.
This commit is contained in:
Dylan K. Taylor
2018-02-15 10:27:42 +00:00
parent 4e9e285e37
commit e7e4645c0b
7 changed files with 31 additions and 29 deletions

View File

@ -233,7 +233,7 @@ class Explosion{
$pk->position = $this->source->asVector3();
$pk->radius = $this->size;
$pk->records = $send;
$this->level->addChunkPacket($source->x >> 4, $source->z >> 4, $pk);
$this->level->addChunkPacket($source->getFloorX() >> 4, $source->getFloorZ() >> 4, $pk);
$this->level->addParticle(new HugeExplodeSeedParticle($source));
$this->level->broadcastLevelSoundEvent($source, LevelSoundEventPacket::SOUND_EXPLODE);