mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
bow will consume durability, arrows will be deleted
This commit is contained in:
parent
0a1a4f33f3
commit
105b09e28f
3 changed files with 18 additions and 4 deletions
|
|
@ -1318,7 +1318,11 @@ class Entity extends Position
|
|||
}
|
||||
$dmg = $this->applyArmor($dmg, $cause);
|
||||
$ret = $this->setHealth(max(- 128, $this->getHealth() - ((int) $dmg)), $cause, $force);
|
||||
|
||||
|
||||
if($this->isPlayer() && $this->player->gamemode & 0x01 == 0x01){
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($ret != false && $this->hasKnockback && is_numeric($cause) && ($entity = $this->server->api->entity->get($cause)) != false) {
|
||||
$d = $entity->x - $this->x;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue