mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
fix heads rotating 45 degrees when placed facing north
This commit is contained in:
parent
cef9c4621c
commit
78ca2f2e58
@ -67,10 +67,10 @@ class Skull extends Flowable{
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $facePos, Player $player = null) : bool{
|
||||
if($face !== Vector3::SIDE_DOWN){
|
||||
$this->meta = $face;
|
||||
if($face === Vector3::SIDE_UP){
|
||||
|
||||
$rot = 0;
|
||||
if($face === Vector3::SIDE_UP and $player !== null){
|
||||
$rot = floor(($player->yaw * 16 / 360) + 0.5) & 0x0F;
|
||||
}else{
|
||||
$rot = $face;
|
||||
}
|
||||
$this->getLevel()->setBlock($blockReplace, $this, true);
|
||||
$nbt = new CompoundTag("", [
|
||||
|
Loading…
x
Reference in New Issue
Block a user