mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
fixed lava and fire mob collision(ignore mobcontroller)
This commit is contained in:
parent
e9c6f473ef
commit
f7cccfb2c3
3 changed files with 54 additions and 19 deletions
|
|
@ -446,7 +446,7 @@ class Entity extends Position
|
|||
break;
|
||||
case LAVA: // Lava damage
|
||||
case STILL_LAVA:
|
||||
if ($this->inBlockNonVector($x, $y, $z)) {
|
||||
if ((!$this->isPlayer() && StaticBlock::getBoundingBoxForBlockCoords($id, $x, $y, $z)->intersectsWith($this->boundingBox)) || ($this->isPlayer() && $this->inBlockNonVector($x, $y, $z))) {
|
||||
$this->harm(5, "lava");
|
||||
$this->fire = 300;
|
||||
$this->updateMetadata();
|
||||
|
|
@ -454,7 +454,7 @@ class Entity extends Position
|
|||
}
|
||||
break;
|
||||
case FIRE: // Fire block damage
|
||||
if ($this->inBlockNonVector($x, $y, $z)) {
|
||||
if ((!$this->isPlayer() && StaticBlock::getBoundingBoxForBlockCoords($id, $x, $y, $z)->intersectsWith($this->boundingBox)) || ($this->isPlayer() && $this->inBlockNonVector($x, $y, $z))) {
|
||||
$this->harm(1, "fire");
|
||||
$this->fire = 300;
|
||||
$this->updateMetadata();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue