Added handling for punch-block player action, added block punch particles

This commit is contained in:
Dylan K. Taylor
2017-05-04 21:11:47 +01:00
parent 49eb0eb050
commit 18f1376c65
3 changed files with 8 additions and 0 deletions

View File

@ -2775,6 +2775,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
case PlayerActionPacket::ACTION_START_GLIDE:
case PlayerActionPacket::ACTION_STOP_GLIDE:
break; //TODO
case PlayerActionPacket::ACTION_CONTINUE_BREAK:
$block = $this->level->getBlock($pos);
$this->level->broadcastLevelEvent($pos, LevelEventPacket::EVENT_PARTICLE_PUNCH_BLOCK, $block->getId() | ($block->getDamage() << 8) | ($packet->face << 16));
break;
default:
$this->server->getLogger()->debug("Unhandled/unknown player action type " . $packet->action . " from " . $this->getName());
return false;