Added Block->getRuntimeId(), clean up some mess

This commit is contained in:
Dylan K. Taylor
2018-09-19 16:16:10 +01:00
parent 107192c753
commit 4bc0d850b1
7 changed files with 18 additions and 20 deletions

View File

@ -2762,7 +2762,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
break; //TODO
case PlayerActionPacket::ACTION_CONTINUE_BREAK:
$block = $this->level->getBlock($pos);
$this->level->broadcastLevelEvent($pos, LevelEventPacket::EVENT_PARTICLE_PUNCH_BLOCK, BlockFactory::toStaticRuntimeId($block->getId(), $block->getDamage()) | ($packet->face << 24));
$this->level->broadcastLevelEvent($pos, LevelEventPacket::EVENT_PARTICLE_PUNCH_BLOCK, $block->getRuntimeId() | ($packet->face << 24));
//TODO: destroy-progress level event
break;
case PlayerActionPacket::ACTION_START_SWIMMING: