More type fixes

This commit is contained in:
Dylan K. Taylor 2017-06-03 22:44:39 +01:00
parent db93827650
commit 7c14ffbcfa
2 changed files with 2 additions and 2 deletions

View File

@ -2600,7 +2600,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
//TODO: improve this to take stuff like swimming, ladders, enchanted tools into account, fix wrong tool break time calculations for bad tools (pmmp/PocketMine-MP#211)
$breakTime = ceil($target->getBreakTime($this->inventory->getItemInHand()) * 20);
if($breakTime > 0){
$this->level->broadcastLevelEvent($pos, LevelEventPacket::EVENT_BLOCK_START_BREAK, 65535 / $breakTime);
$this->level->broadcastLevelEvent($pos, LevelEventPacket::EVENT_BLOCK_START_BREAK, (int) (65535 / $breakTime));
}
}
$this->lastBreak = microtime(true);

View File

@ -68,7 +68,7 @@ class FloatingTextParticle extends Particle{
$p = [];
if($this->entityId === null){
$this->entityId = (int) bcadd("1095216660480", mt_rand(0, 0x7fffffff)); //No conflict with other things
$this->entityId = Entity::$entityCount++;
}else{
$pk0 = new RemoveEntityPacket();
$pk0->entityUniqueId = $this->entityId;