Stripped redundant trailing commas

This commit is contained in:
Dylan K. Taylor 2017-08-25 12:41:49 +01:00
parent ba27fff853
commit 8ce833bf74
25 changed files with 27 additions and 27 deletions

View File

@ -84,7 +84,7 @@ class Anvil extends Fallable{
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
ItemFactory::get($this->getItemId(), $this->getDamage() & 0x0c, 1),
ItemFactory::get($this->getItemId(), $this->getDamage() & 0x0c, 1)
];
}

View File

@ -189,7 +189,7 @@ class Bed extends Transparent{
new ByteTag("color", $item->getDamage() & 0x0f),
new IntTag("x", $block->x),
new IntTag("y", $block->y),
new IntTag("z", $block->z),
new IntTag("z", $block->z)
]);
$nbt2 = clone $nbt;

View File

@ -351,7 +351,7 @@ class Block extends Position implements BlockIds, Metadatable{
*/
public function getDrops(Item $item) : array{
return [
ItemFactory::get($this->getItemId(), $this->getDamage() & $this->getVariantBitmask(), 1),
ItemFactory::get($this->getItemId(), $this->getDamage() & $this->getVariantBitmask(), 1)
];
}

View File

@ -64,7 +64,7 @@ class BurningFurnace extends Solid{
0 => 4,
1 => 2,
2 => 5,
3 => 3,
3 => 3
];
$this->meta = $faces[$player instanceof Player ? $player->getDirection() : 0];
$this->getLevel()->setBlock($block, $this, true, true);

View File

@ -72,7 +72,7 @@ class Chest extends Transparent{
0 => 4,
1 => 2,
2 => 5,
3 => 3,
3 => 3
];
$chest = null;

View File

@ -228,7 +228,7 @@ abstract class Door extends Transparent{
0 => 3,
1 => 4,
2 => 2,
3 => 5,
3 => 5
];
$next = $this->getSide($faces[($direction + 2) % 4]);
$next2 = $this->getSide($faces[$direction]);

View File

@ -52,7 +52,7 @@ class DoubleStoneSlab extends Solid{
4 => "Brick",
5 => "Stone Brick",
6 => "Quartz",
7 => "Nether Brick",
7 => "Nether Brick"
];
return "Double " . $names[$this->meta & 0x07] . " Slab";
}
@ -60,7 +60,7 @@ class DoubleStoneSlab extends Solid{
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= Tool::TIER_WOODEN){
return [
ItemFactory::get(Item::STONE_SLAB, $this->getDamage() & 0x07, 2),
ItemFactory::get(Item::STONE_SLAB, $this->getDamage() & 0x07, 2)
];
}

View File

@ -50,7 +50,7 @@ class EmeraldOre extends Solid{
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= Tool::TIER_IRON){
return [
ItemFactory::get(Item::EMERALD, 0, 1),
ItemFactory::get(Item::EMERALD, 0, 1)
];
}

View File

@ -56,7 +56,7 @@ abstract class Fallable extends Solid{
new FloatTag("", 0)
]),
new IntTag("TileID", $this->getId()),
new ByteTag("Data", $this->getDamage()),
new ByteTag("Data", $this->getDamage())
]));
$fall->spawnToAll();

View File

@ -76,7 +76,7 @@ class FlowerPot extends Flowable{
new IntTag("y", $block->y),
new IntTag("z", $block->z),
new ShortTag("item", 0),
new IntTag("mData", 0),
new IntTag("mData", 0)
]);
if($item->hasCustomBlockData()){

View File

@ -55,7 +55,7 @@ class Grass extends Solid{
public function getDrops(Item $item) : array{
return [
ItemFactory::get(Item::DIRT, 0, 1),
ItemFactory::get(Item::DIRT, 0, 1)
];
}

View File

@ -50,7 +50,7 @@ class HayBale extends Solid{
2 => 0b1000,
3 => 0b1000,
4 => 0b0100,
5 => 0b0100,
5 => 0b0100
];
$this->meta = ($this->meta & 0x03) | $faces[$face];

View File

@ -116,7 +116,7 @@ class Ladder extends Transparent{
2 => 2,
3 => 3,
4 => 4,
5 => 5,
5 => 5
];
if(isset($faces[$face])){
$this->meta = $faces[$face];

View File

@ -59,7 +59,7 @@ class Leaves extends Transparent{
self::OAK => "Oak Leaves",
self::SPRUCE => "Spruce Leaves",
self::BIRCH => "Birch Leaves",
self::JUNGLE => "Jungle Leaves",
self::JUNGLE => "Jungle Leaves"
];
return $names[$this->meta & 0x03];
}

View File

@ -34,7 +34,7 @@ class Leaves2 extends Leaves{
public function getName() : string{
static $names = [
self::ACACIA => "Acacia Leaves",
self::DARK_OAK => "Dark Oak Leaves",
self::DARK_OAK => "Dark Oak Leaves"
];
return $names[$this->meta & 0x03] ?? "Unknown";
}

View File

@ -46,7 +46,7 @@ class Prismarine extends Solid{
static $names = [
self::NORMAL => "Prismarine",
self::DARK => "Dark Prismarine",
self::BRICKS => "Prismarine Bricks",
self::BRICKS => "Prismarine Bricks"
];
return $names[$this->meta & 0x03] ?? "Unknown";
}

View File

@ -48,7 +48,7 @@ class Quartz extends Solid{
self::QUARTZ_NORMAL => "Quartz Block",
self::QUARTZ_CHISELED => "Chiseled Quartz Block",
self::QUARTZ_PILLAR => "Quartz Pillar",
self::QUARTZ_PILLAR2 => "Quartz Pillar",
self::QUARTZ_PILLAR2 => "Quartz Pillar"
];
return $names[$this->meta & 0x03];
}

View File

@ -135,7 +135,7 @@ abstract class Stair extends Transparent{
0 => 0,
1 => 2,
2 => 1,
3 => 3,
3 => 3
];
$this->meta = $faces[$player->getDirection()] & 0x03;
if(($facePos->y > 0.5 and $face !== Vector3::SIDE_UP) or $face === Vector3::SIDE_DOWN){

View File

@ -51,7 +51,7 @@ class StoneBricks extends Solid{
self::NORMAL => "Stone Bricks",
self::MOSSY => "Mossy Stone Bricks",
self::CRACKED => "Cracked Stone Bricks",
self::CHISELED => "Chiseled Stone Bricks",
self::CHISELED => "Chiseled Stone Bricks"
];
return $names[$this->meta & 0x03];
}

View File

@ -53,7 +53,7 @@ class StoneSlab extends WoodenSlab{
self::BRICK => "Brick",
self::STONE_BRICK => "Stone Brick",
self::QUARTZ => "Quartz",
self::NETHER_BRICK => "Nether Brick",
self::NETHER_BRICK => "Nether Brick"
];
return (($this->meta & 0x08) > 0 ? "Upper " : "") . $names[$this->meta & 0x07] . " Slab";
}

View File

@ -77,7 +77,7 @@ class Torch extends Flowable{
Vector3::SIDE_NORTH => 4,
Vector3::SIDE_SOUTH => 3,
Vector3::SIDE_WEST => 2,
Vector3::SIDE_EAST => 1,
Vector3::SIDE_EAST => 1
];
$this->meta = $faces[$face];
$this->getLevel()->setBlock($block, $this, true, true);

View File

@ -143,7 +143,7 @@ class Vine extends Transparent{
2 => self::FLAG_SOUTH,
3 => self::FLAG_NORTH,
4 => self::FLAG_EAST,
5 => self::FLAG_WEST,
5 => self::FLAG_WEST
];
if(isset($faces[$face])){
$this->meta = $faces[$face];

View File

@ -38,7 +38,7 @@ class WallSign extends SignPost{
2 => 3,
3 => 2,
4 => 5,
5 => 4,
5 => 4
];
if($type === Level::BLOCK_UPDATE_NORMAL){
if(isset($faces[$this->meta])){

View File

@ -49,7 +49,7 @@ class Wood extends Solid{
self::OAK => "Oak Wood",
self::SPRUCE => "Spruce Wood",
self::BIRCH => "Birch Wood",
self::JUNGLE => "Jungle Wood",
self::JUNGLE => "Jungle Wood"
];
return $names[$this->meta & 0x03];
}
@ -61,7 +61,7 @@ class Wood extends Solid{
Vector3::SIDE_NORTH => 0b1000,
Vector3::SIDE_SOUTH => 0b1000,
Vector3::SIDE_WEST => 0b0100,
Vector3::SIDE_EAST => 0b0100,
Vector3::SIDE_EAST => 0b0100
];
$this->meta = ($this->meta & 0x03) | $faces[$face];

View File

@ -42,7 +42,7 @@ class ColorBlockMetaHelper{
12 => "Brown",
13 => "Green",
14 => "Red",
15 => "Black",
15 => "Black"
];
return $names[$meta] ?? "Unknown";