mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 13:39:44 +00:00
paintings were fixed
This commit is contained in:
parent
102f515469
commit
c7e509960e
1 changed files with 22 additions and 16 deletions
|
|
@ -404,7 +404,7 @@ class Entity extends Position
|
|||
$endZ = ceil($this->boundingBox->maxZ);
|
||||
$waterDone = false;
|
||||
//$bup = new AxisAlignedBB($startX, $startY + 1, $startZ, $endX, $endY, $endZ);
|
||||
|
||||
if(!($this instanceof Painting)){ //TODO better way to fix
|
||||
for($i = 0; $i < 8; ++$i){
|
||||
$x = ((($i >> 0) % 2) - 0.5) * $this->width * 0.8;
|
||||
$y= ((($i >> 1) % 2) - 0.5) * 0.1;
|
||||
|
|
@ -420,7 +420,7 @@ class Entity extends Position
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for ($y = $startY; $y <= $endY; ++$y){
|
||||
for ($x = $startX; $x <= $endX; ++$x){
|
||||
for ($z = $startZ; $z <= $endZ; ++$z){
|
||||
|
|
@ -1429,6 +1429,7 @@ class Entity extends Position
|
|||
$pk->event = EntityEventPacket::ENTITY_DEAD;
|
||||
$this->server->api->player->broadcastPacket($this->level->players, $pk);
|
||||
}
|
||||
|
||||
if($this->player instanceof Player){
|
||||
$this->player->blocked = true;
|
||||
$this->server->api->dhandle("player.death", [
|
||||
|
|
@ -1439,9 +1440,14 @@ class Entity extends Position
|
|||
$this->server->api->ban->ban($this->player->username);
|
||||
}
|
||||
} else{
|
||||
if($this instanceof Painting){ //TODO better fix
|
||||
$this->close();
|
||||
}
|
||||
else{
|
||||
$this->server->api->schedule(40, [$this, "close"], []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getAttackDamage(){
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue