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

@ -105,15 +105,15 @@ class ItemFrame extends Flowable{
}
public function place(Item $item, Block $block, Block $target, int $face, Vector3 $facePos, Player $player = null) : bool{
if($face === 0 or $face === 1){
if($face === Vector3::SIDE_DOWN or $face === Vector3::SIDE_UP){
return false;
}
$faces = [
2 => 3,
3 => 2,
4 => 1,
5 => 0
Vector3::SIDE_NORTH => 3,
Vector3::SIDE_SOUTH => 2,
Vector3::SIDE_WEST => 1,
Vector3::SIDE_EAST => 0
];
$this->meta = $faces[$face];