mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed players in creative being unable to punch other players, force send movement packet on respawn
This commit is contained in:
parent
bbf506c887
commit
aeffaee590
2 changed files with 27 additions and 6 deletions
|
|
@ -941,7 +941,7 @@ class Entity extends Position
|
|||
|
||||
public function interactWith(Entity $e, $action)
|
||||
{
|
||||
if($this->class === ENTITY_PLAYER and ($this->server->api->getProperty("pvp") == false or $this->server->difficulty <= 0 or ($e->player->gamemode & 0x01) === 0x01)){
|
||||
if($this->isPlayer() and ($this->server->api->getProperty("pvp") == false or $this->server->difficulty <= 0 or ($this->player->gamemode & 0x01) === 0x01)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1186,7 +1186,7 @@ class Entity extends Position
|
|||
$this->updateAABB();
|
||||
}
|
||||
|
||||
public function setPosition(Vector3 $pos, $yaw = false, $pitch = false)
|
||||
public function setPosition(Vector3 $pos, $yaw = false, $pitch = false, $headYaw = false)
|
||||
{
|
||||
$this->x = $pos->x;
|
||||
$this->y = $pos->y;
|
||||
|
|
@ -1197,6 +1197,8 @@ class Entity extends Position
|
|||
if($pitch !== false){
|
||||
$this->pitch = $pitch;
|
||||
}
|
||||
|
||||
if($headYaw !== false) $this->headYaw = $headYaw;
|
||||
}
|
||||
public function inBlockNonVector($x, $y, $z, $radius = 0.8)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue