Replaced more literal ints with Vector3 constants

This commit is contained in:
Dylan K. Taylor
2017-08-20 10:43:48 +01:00
parent e1d894057c
commit c394aea803
8 changed files with 28 additions and 28 deletions

View File

@ -61,7 +61,7 @@ class SignPost extends Transparent{
public function place(Item $item, Block $block, Block $target, int $face, Vector3 $facePos, Player $player = null) : bool{
if($face !== 0){
if($face !== Vector3::SIDE_DOWN){
$nbt = new CompoundTag("", [
new StringTag("id", Tile::SIGN),
new IntTag("x", $block->x),
@ -83,7 +83,7 @@ class SignPost extends Transparent{
}
}
if($face === 1){
if($face === Vector3::SIDE_UP){
$this->meta = floor((($player->yaw + 180) * 16 / 360) + 0.5) & 0x0f;
$this->getLevel()->setBlock($block, $this, true);
}else{