diff --git a/src/pocketmine/block/Bedrock.php b/src/pocketmine/block/Bedrock.php index 127846c05..b7765bcb2 100644 --- a/src/pocketmine/block/Bedrock.php +++ b/src/pocketmine/block/Bedrock.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Bedrock extends Solid{ +class Bedrock extends Opaque{ /** @var bool */ private $burnsForever = false; diff --git a/src/pocketmine/block/BlockFactory.php b/src/pocketmine/block/BlockFactory.php index 839e39345..59e5aafaa 100644 --- a/src/pocketmine/block/BlockFactory.php +++ b/src/pocketmine/block/BlockFactory.php @@ -101,7 +101,7 @@ class BlockFactory{ $bricksBreakInfo = new BlockBreakInfo(2.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); self::register(new Stair(new BID(Ids::BRICK_STAIRS), "Brick Stairs", $bricksBreakInfo)); - self::register(new Solid(new BID(Ids::BRICK_BLOCK), "Bricks", $bricksBreakInfo)); + self::register(new Opaque(new BID(Ids::BRICK_BLOCK), "Bricks", $bricksBreakInfo)); self::register(new BrownMushroom(new BID(Ids::BROWN_MUSHROOM), "Brown Mushroom")); self::register(new BrownMushroomBlock(new BID(Ids::BROWN_MUSHROOM_BLOCK), "Brown Mushroom Block")); @@ -115,8 +115,8 @@ class BlockFactory{ self::register(new CoarseDirt(new BID(Ids::DIRT, Meta::DIRT_COARSE), "Coarse Dirt")); $cobblestoneBreakInfo = new BlockBreakInfo(2.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); - self::register(new Solid(new BID(Ids::COBBLESTONE), "Cobblestone", $cobblestoneBreakInfo)); - self::register(new Solid(new BID(Ids::MOSSY_COBBLESTONE), "Mossy Cobblestone", $cobblestoneBreakInfo)); + self::register(new Opaque(new BID(Ids::COBBLESTONE), "Cobblestone", $cobblestoneBreakInfo)); + self::register(new Opaque(new BID(Ids::MOSSY_COBBLESTONE), "Mossy Cobblestone", $cobblestoneBreakInfo)); self::register(new Stair(new BID(Ids::COBBLESTONE_STAIRS), "Cobblestone Stairs", $cobblestoneBreakInfo)); self::register(new Stair(new BID(Ids::MOSSY_COBBLESTONE_STAIRS), "Mossy Cobblestone Stairs", $cobblestoneBreakInfo)); @@ -127,7 +127,7 @@ class BlockFactory{ self::register(new DeadBush(new BID(Ids::DEADBUSH), "Dead Bush")); self::register(new DetectorRail(new BID(Ids::DETECTOR_RAIL), "Detector Rail")); - self::register(new Solid(new BID(Ids::DIAMOND_BLOCK), "Diamond Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); + self::register(new Opaque(new BID(Ids::DIAMOND_BLOCK), "Diamond Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); self::register(new DiamondOre(new BID(Ids::DIAMOND_ORE), "Diamond Ore")); self::register(new Dirt(new BID(Ids::DIRT, Meta::DIRT_NORMAL), "Dirt")); self::register(new DoublePlant(new BID(Ids::DOUBLE_PLANT, Meta::DOUBLE_PLANT_SUNFLOWER), "Sunflower")); @@ -138,15 +138,15 @@ class BlockFactory{ self::register(new DoubleTallGrass(new BID(Ids::DOUBLE_PLANT, Meta::DOUBLE_PLANT_LARGE_FERN), "Large Fern")); self::register(new DragonEgg(new BID(Ids::DRAGON_EGG), "Dragon Egg")); self::register(new DriedKelp(new BID(Ids::DRIED_KELP_BLOCK), "Dried Kelp Block", new BlockBreakInfo(0.5, BlockToolType::NONE, 0, 12.5))); - self::register(new Solid(new BID(Ids::EMERALD_BLOCK), "Emerald Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); + self::register(new Opaque(new BID(Ids::EMERALD_BLOCK), "Emerald Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); self::register(new EmeraldOre(new BID(Ids::EMERALD_ORE), "Emerald Ore")); self::register(new EnchantingTable(new BID(Ids::ENCHANTING_TABLE, 0, null, TileEnchantingTable::class), "Enchanting Table")); self::register(new EndPortalFrame(new BID(Ids::END_PORTAL_FRAME), "End Portal Frame")); self::register(new EndRod(new BID(Ids::END_ROD), "End Rod")); - self::register(new Solid(new BID(Ids::END_STONE), "End Stone", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 45.0))); + self::register(new Opaque(new BID(Ids::END_STONE), "End Stone", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 45.0))); $endBrickBreakInfo = new BlockBreakInfo(0.8, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 4.0); - self::register(new Solid(new BID(Ids::END_BRICKS), "End Stone Bricks", $endBrickBreakInfo)); + self::register(new Opaque(new BID(Ids::END_BRICKS), "End Stone Bricks", $endBrickBreakInfo)); self::register(new Stair(new BID(Ids::END_BRICK_STAIRS), "End Stone Brick Stairs", $endBrickBreakInfo)); self::register(new EnderChest(new BID(Ids::ENDER_CHEST, 0, null, TileEnderChest::class), "Ender Chest")); @@ -171,8 +171,8 @@ class BlockFactory{ self::register(new GlassPane(new BID(Ids::GLASS_PANE), "Glass Pane")); self::register(new GlowingObsidian(new BID(Ids::GLOWINGOBSIDIAN), "Glowing Obsidian")); self::register(new Glowstone(new BID(Ids::GLOWSTONE), "Glowstone")); - self::register(new Solid(new BID(Ids::GOLD_BLOCK), "Gold Block", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); - self::register(new Solid(new BID(Ids::GOLD_ORE), "Gold Ore", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel()))); + self::register(new Opaque(new BID(Ids::GOLD_BLOCK), "Gold Block", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel(), 30.0))); + self::register(new Opaque(new BID(Ids::GOLD_ORE), "Gold Ore", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel()))); self::register(new Grass(new BID(Ids::GRASS), "Grass")); self::register(new GrassPath(new BID(Ids::GRASS_PATH), "Grass Path")); self::register(new Gravel(new BID(Ids::GRAVEL), "Gravel")); @@ -214,18 +214,18 @@ class BlockFactory{ }); $updateBlockBreakInfo = new BlockBreakInfo(1.0); - self::register(new Solid(new BID(Ids::INFO_UPDATE), "update!", $updateBlockBreakInfo)); - self::register(new Solid(new BID(Ids::INFO_UPDATE2), "ate!upd", $updateBlockBreakInfo)); + self::register(new Opaque(new BID(Ids::INFO_UPDATE), "update!", $updateBlockBreakInfo)); + self::register(new Opaque(new BID(Ids::INFO_UPDATE2), "ate!upd", $updateBlockBreakInfo)); self::register(new Transparent(new BID(Ids::INVISIBLEBEDROCK), "Invisible Bedrock", BlockBreakInfo::indestructible())); - self::register(new Solid(new BID(Ids::IRON_BLOCK), "Iron Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel(), 30.0))); + self::register(new Opaque(new BID(Ids::IRON_BLOCK), "Iron Block", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel(), 30.0))); self::register(new Thin(new BID(Ids::IRON_BARS), "Iron Bars", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0))); self::register(new Door(new BID(Ids::IRON_DOOR_BLOCK, 0, ItemIds::IRON_DOOR), "Iron Door", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 25.0))); - self::register(new Solid(new BID(Ids::IRON_ORE), "Iron Ore", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); + self::register(new Opaque(new BID(Ids::IRON_ORE), "Iron Ore", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); self::register(new Trapdoor(new BID(Ids::IRON_TRAPDOOR), "Iron Trapdoor", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 25.0))); self::register(new ItemFrame(new BID(Ids::FRAME_BLOCK, 0, ItemIds::FRAME, TileItemFrame::class), "Item Frame")); self::register(new Ladder(new BID(Ids::LADDER), "Ladder")); self::register(new Lantern(new BID(Ids::LANTERN), "Lantern", new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); - self::register(new Solid(new BID(Ids::LAPIS_BLOCK), "Lapis Lazuli Block", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); + self::register(new Opaque(new BID(Ids::LAPIS_BLOCK), "Lapis Lazuli Block", new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel()))); self::register(new LapisOre(new BID(Ids::LAPIS_ORE), "Lapis Lazuli Ore")); self::register(new Lava(new BIDFlattened(Ids::FLOWING_LAVA, Ids::STILL_LAVA), "Lava")); self::register(new Lever(new BID(Ids::LEVER), "Lever")); @@ -236,34 +236,34 @@ class BlockFactory{ self::register(new Mycelium(new BID(Ids::MYCELIUM), "Mycelium")); $netherBrickBreakInfo = new BlockBreakInfo(2.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); - self::register(new Solid(new BID(Ids::NETHER_BRICK_BLOCK), "Nether Bricks", $netherBrickBreakInfo)); - self::register(new Solid(new BID(Ids::RED_NETHER_BRICK), "Red Nether Bricks", $netherBrickBreakInfo)); + self::register(new Opaque(new BID(Ids::NETHER_BRICK_BLOCK), "Nether Bricks", $netherBrickBreakInfo)); + self::register(new Opaque(new BID(Ids::RED_NETHER_BRICK), "Red Nether Bricks", $netherBrickBreakInfo)); self::register(new Fence(new BID(Ids::NETHER_BRICK_FENCE), "Nether Brick Fence", $netherBrickBreakInfo)); self::register(new Stair(new BID(Ids::NETHER_BRICK_STAIRS), "Nether Brick Stairs", $netherBrickBreakInfo)); self::register(new Stair(new BID(Ids::RED_NETHER_BRICK_STAIRS), "Red Nether Brick Stairs", $netherBrickBreakInfo)); self::register(new NetherPortal(new BID(Ids::PORTAL), "Nether Portal")); self::register(new NetherQuartzOre(new BID(Ids::NETHER_QUARTZ_ORE), "Nether Quartz Ore")); self::register(new NetherReactor(new BID(Ids::NETHERREACTOR), "Nether Reactor Core")); - self::register(new Solid(new BID(Ids::NETHER_WART_BLOCK), "Nether Wart Block", new BlockBreakInfo(1.0))); + self::register(new Opaque(new BID(Ids::NETHER_WART_BLOCK), "Nether Wart Block", new BlockBreakInfo(1.0))); self::register(new NetherWartPlant(new BID(Ids::NETHER_WART_PLANT, 0, ItemIds::NETHER_WART), "Nether Wart")); self::register(new Netherrack(new BID(Ids::NETHERRACK), "Netherrack")); self::register(new Note(new BID(Ids::NOTEBLOCK, 0, null, TileNote::class), "Note Block")); - self::register(new Solid(new BID(Ids::OBSIDIAN), "Obsidian", new BlockBreakInfo(35.0 /* 50 in PC */, BlockToolType::PICKAXE, ToolTier::DIAMOND()->getHarvestLevel(), 6000.0))); + self::register(new Opaque(new BID(Ids::OBSIDIAN), "Obsidian", new BlockBreakInfo(35.0 /* 50 in PC */, BlockToolType::PICKAXE, ToolTier::DIAMOND()->getHarvestLevel(), 6000.0))); self::register(new PackedIce(new BID(Ids::PACKED_ICE), "Packed Ice")); self::register(new Podzol(new BID(Ids::PODZOL), "Podzol")); self::register(new Potato(new BID(Ids::POTATOES), "Potato Block")); self::register(new PoweredRail(new BID(Ids::GOLDEN_RAIL, Meta::RAIL_STRAIGHT_NORTH_SOUTH), "Powered Rail")); $prismarineBreakInfo = new BlockBreakInfo(1.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); - self::register(new Solid(new BID(Ids::PRISMARINE, Meta::PRISMARINE_BRICKS), "Prismarine Bricks", $prismarineBreakInfo)); + self::register(new Opaque(new BID(Ids::PRISMARINE, Meta::PRISMARINE_BRICKS), "Prismarine Bricks", $prismarineBreakInfo)); self::register(new Stair(new BID(Ids::PRISMARINE_BRICKS_STAIRS), "Prismarine Bricks Stairs", $prismarineBreakInfo)); - self::register(new Solid(new BID(Ids::PRISMARINE, Meta::PRISMARINE_DARK), "Dark Prismarine", $prismarineBreakInfo)); + self::register(new Opaque(new BID(Ids::PRISMARINE, Meta::PRISMARINE_DARK), "Dark Prismarine", $prismarineBreakInfo)); self::register(new Stair(new BID(Ids::DARK_PRISMARINE_STAIRS), "Dark Prismarine Stairs", $prismarineBreakInfo)); - self::register(new Solid(new BID(Ids::PRISMARINE, Meta::PRISMARINE_NORMAL), "Prismarine", $prismarineBreakInfo)); + self::register(new Opaque(new BID(Ids::PRISMARINE, Meta::PRISMARINE_NORMAL), "Prismarine", $prismarineBreakInfo)); self::register(new Stair(new BID(Ids::PRISMARINE_STAIRS), "Prismarine Stairs", $prismarineBreakInfo)); $pumpkinBreakInfo = new BlockBreakInfo(1.0, BlockToolType::AXE); - self::register($pumpkin = new Solid(new BID(Ids::PUMPKIN), "Pumpkin", $pumpkinBreakInfo)); + self::register($pumpkin = new Opaque(new BID(Ids::PUMPKIN), "Pumpkin", $pumpkinBreakInfo)); for($i = 1; $i <= 3; ++$i){ self::remap(Ids::PUMPKIN, $i, $pumpkin); } @@ -273,22 +273,22 @@ class BlockFactory{ self::register(new PumpkinStem(new BID(Ids::PUMPKIN_STEM, 0, ItemIds::PUMPKIN_SEEDS), "Pumpkin Stem")); $purpurBreakInfo = new BlockBreakInfo(1.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); - self::register(new Solid(new BID(Ids::PURPUR_BLOCK, Meta::PURPUR_NORMAL), "Purpur Block", $purpurBreakInfo)); - self::register(new class(new BID(Ids::PURPUR_BLOCK, Meta::PURPUR_PILLAR), "Purpur Pillar", $purpurBreakInfo) extends Solid{ + self::register(new Opaque(new BID(Ids::PURPUR_BLOCK, Meta::PURPUR_NORMAL), "Purpur Block", $purpurBreakInfo)); + self::register(new class(new BID(Ids::PURPUR_BLOCK, Meta::PURPUR_PILLAR), "Purpur Pillar", $purpurBreakInfo) extends Opaque{ use PillarRotationTrait; }); self::register(new Stair(new BID(Ids::PURPUR_STAIRS), "Purpur Stairs", $purpurBreakInfo)); $quartzBreakInfo = new BlockBreakInfo(0.8, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()); - self::register(new Solid(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_NORMAL), "Quartz Block", $quartzBreakInfo)); + self::register(new Opaque(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_NORMAL), "Quartz Block", $quartzBreakInfo)); self::register(new Stair(new BID(Ids::QUARTZ_STAIRS), "Quartz Stairs", $quartzBreakInfo)); - self::register(new class(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_CHISELED), "Chiseled Quartz Block", $quartzBreakInfo) extends Solid{ + self::register(new class(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_CHISELED), "Chiseled Quartz Block", $quartzBreakInfo) extends Opaque{ use PillarRotationTrait; }); - self::register(new class(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_PILLAR), "Quartz Pillar", $quartzBreakInfo) extends Solid{ + self::register(new class(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_PILLAR), "Quartz Pillar", $quartzBreakInfo) extends Opaque{ use PillarRotationTrait; }); - self::register(new Solid(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_SMOOTH), "Smooth Quartz Block", $quartzBreakInfo)); //TODO: this has axis rotation in 1.9, unsure if a bug (https://bugs.mojang.com/browse/MCPE-39074) + self::register(new Opaque(new BID(Ids::QUARTZ_BLOCK, Meta::QUARTZ_SMOOTH), "Smooth Quartz Block", $quartzBreakInfo)); //TODO: this has axis rotation in 1.9, unsure if a bug (https://bugs.mojang.com/browse/MCPE-39074) self::register(new Stair(new BID(Ids::SMOOTH_QUARTZ_STAIRS), "Smooth Quartz Stairs", $quartzBreakInfo)); self::register(new Rail(new BID(Ids::RAIL), "Rail")); @@ -316,31 +316,31 @@ class BlockFactory{ self::register(new Sponge(new BID(Ids::SPONGE), "Sponge")); $stoneBreakInfo = new BlockBreakInfo(1.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0); - self::register(new class(new BID(Ids::STONE, Meta::STONE_NORMAL), "Stone", $stoneBreakInfo) extends Solid{ + self::register(new class(new BID(Ids::STONE, Meta::STONE_NORMAL), "Stone", $stoneBreakInfo) extends Opaque{ public function getDropsForCompatibleTool(Item $item) : array{ return [VanillaBlocks::COBBLESTONE()->asItem()]; } }); self::register(new Stair(new BID(Ids::NORMAL_STONE_STAIRS), "Stone Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::SMOOTH_STONE), "Smooth Stone", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_ANDESITE), "Andesite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::SMOOTH_STONE), "Smooth Stone", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_ANDESITE), "Andesite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::ANDESITE_STAIRS), "Andesite Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_DIORITE), "Diorite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_DIORITE), "Diorite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::DIORITE_STAIRS), "Diorite Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_GRANITE), "Granite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_GRANITE), "Granite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::GRANITE_STAIRS), "Granite Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_POLISHED_ANDESITE), "Polished Andesite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_POLISHED_ANDESITE), "Polished Andesite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::POLISHED_ANDESITE_STAIRS), "Polished Andesite Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_POLISHED_DIORITE), "Polished Diorite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_POLISHED_DIORITE), "Polished Diorite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::POLISHED_DIORITE_STAIRS), "Polished Diorite Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONE, Meta::STONE_POLISHED_GRANITE), "Polished Granite", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONE, Meta::STONE_POLISHED_GRANITE), "Polished Granite", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::POLISHED_GRANITE_STAIRS), "Polished Granite Stairs", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::STONE_BRICK_STAIRS), "Stone Brick Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_CHISELED), "Chiseled Stone Bricks", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_CRACKED), "Cracked Stone Bricks", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_MOSSY), "Mossy Stone Bricks", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_CHISELED), "Chiseled Stone Bricks", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_CRACKED), "Cracked Stone Bricks", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_MOSSY), "Mossy Stone Bricks", $stoneBreakInfo)); self::register(new Stair(new BID(Ids::MOSSY_STONE_BRICK_STAIRS), "Mossy Stone Brick Stairs", $stoneBreakInfo)); - self::register(new Solid(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_NORMAL), "Stone Bricks", $stoneBreakInfo)); + self::register(new Opaque(new BID(Ids::STONEBRICK, Meta::STONE_BRICK_NORMAL), "Stone Bricks", $stoneBreakInfo)); self::register(new StoneButton(new BID(Ids::STONE_BUTTON), "Stone Button")); self::register(new StonePressurePlate(new BID(Ids::STONE_PRESSURE_PLATE), "Stone Pressure Plate")); @@ -375,7 +375,7 @@ class BlockFactory{ self::register(new Slab(new BIDFlattened(Ids::STONE_SLAB4, Ids::DOUBLE_STONE_SLAB4, Meta::STONE_SLAB4_MOSSY_STONE_BRICK), "Mossy Stone Brick", $stoneSlabBreakInfo)); self::register(new Slab(new BIDFlattened(Ids::STONE_SLAB4, Ids::DOUBLE_STONE_SLAB4, Meta::STONE_SLAB4_SMOOTH_QUARTZ), "Smooth Quartz", $stoneSlabBreakInfo)); self::register(new Slab(new BIDFlattened(Ids::STONE_SLAB4, Ids::DOUBLE_STONE_SLAB4, Meta::STONE_SLAB4_STONE), "Stone", $stoneSlabBreakInfo)); - self::register(new Solid(new BID(Ids::STONECUTTER), "Stonecutter", new BlockBreakInfo(3.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); + self::register(new Opaque(new BID(Ids::STONECUTTER), "Stonecutter", new BlockBreakInfo(3.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel()))); self::register(new Sugarcane(new BID(Ids::REEDS_BLOCK, 0, ItemIds::REEDS), "Sugarcane")); self::register(new TNT(new BID(Ids::TNT), "TNT")); @@ -505,8 +505,8 @@ class BlockFactory{ self::register(new Stair(new BID(Ids::SANDSTONE_STAIRS), "Sandstone Stairs", $sandstoneBreakInfo)); self::register(new Stair(new BID(Ids::SMOOTH_SANDSTONE_STAIRS), "Smooth Sandstone Stairs", $sandstoneBreakInfo)); foreach($sandstoneTypes as $variant => $prefix){ - self::register(new Solid(new BID(Ids::SANDSTONE, $variant), $prefix . "Sandstone", $sandstoneBreakInfo)); - self::register(new Solid(new BID(Ids::RED_SANDSTONE, $variant), $prefix . "Red Sandstone", $sandstoneBreakInfo)); + self::register(new Opaque(new BID(Ids::SANDSTONE, $variant), $prefix . "Sandstone", $sandstoneBreakInfo)); + self::register(new Opaque(new BID(Ids::RED_SANDSTONE, $variant), $prefix . "Red Sandstone", $sandstoneBreakInfo)); } //region ugly glazed-terracotta colour -> ID mapping table @@ -632,7 +632,7 @@ class BlockFactory{ } private static function registerElements() : void{ - self::register(new Solid(new BID(Ids::ELEMENT_0), "???", BlockBreakInfo::instant())); + self::register(new Opaque(new BID(Ids::ELEMENT_0), "???", BlockBreakInfo::instant())); self::register(new Element(new BID(Ids::ELEMENT_1), "Hydrogen", BlockBreakInfo::instant(), "h", 1, 5)); self::register(new Element(new BID(Ids::ELEMENT_2), "Helium", BlockBreakInfo::instant(), "he", 2, 7)); diff --git a/src/pocketmine/block/BlueIce.php b/src/pocketmine/block/BlueIce.php index bb6c0b152..7339f8271 100644 --- a/src/pocketmine/block/BlueIce.php +++ b/src/pocketmine/block/BlueIce.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\Item; -class BlueIce extends Solid{ +class BlueIce extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(2.8, BlockToolType::PICKAXE)); diff --git a/src/pocketmine/block/BoneBlock.php b/src/pocketmine/block/BoneBlock.php index 35d1f7bce..458103852 100644 --- a/src/pocketmine/block/BoneBlock.php +++ b/src/pocketmine/block/BoneBlock.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\block\utils\PillarRotationTrait; use pocketmine\item\ToolTier; -class BoneBlock extends Solid{ +class BoneBlock extends Opaque{ use PillarRotationTrait; public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ diff --git a/src/pocketmine/block/Bookshelf.php b/src/pocketmine/block/Bookshelf.php index fba6053e3..f4af2e111 100644 --- a/src/pocketmine/block/Bookshelf.php +++ b/src/pocketmine/block/Bookshelf.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\item\VanillaItems; -class Bookshelf extends Solid{ +class Bookshelf extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(1.5, BlockToolType::AXE)); diff --git a/src/pocketmine/block/CarvedPumpkin.php b/src/pocketmine/block/CarvedPumpkin.php index 8c3f66a72..621ae9c3f 100644 --- a/src/pocketmine/block/CarvedPumpkin.php +++ b/src/pocketmine/block/CarvedPumpkin.php @@ -31,7 +31,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use pocketmine\world\BlockTransaction; -class CarvedPumpkin extends Solid{ +class CarvedPumpkin extends Opaque{ /** @var int */ protected $facing = Facing::NORTH; diff --git a/src/pocketmine/block/Clay.php b/src/pocketmine/block/Clay.php index 41560db3b..b3b51e2dd 100644 --- a/src/pocketmine/block/Clay.php +++ b/src/pocketmine/block/Clay.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use pocketmine\item\VanillaItems; -class Clay extends Solid{ +class Clay extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.6, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/Coal.php b/src/pocketmine/block/Coal.php index 8b3d4257e..27e86bc03 100644 --- a/src/pocketmine/block/Coal.php +++ b/src/pocketmine/block/Coal.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class Coal extends Solid{ +class Coal extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0)); diff --git a/src/pocketmine/block/CoalOre.php b/src/pocketmine/block/CoalOre.php index 5643d8d54..434e5ee0b 100644 --- a/src/pocketmine/block/CoalOre.php +++ b/src/pocketmine/block/CoalOre.php @@ -28,7 +28,7 @@ use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; use function mt_rand; -class CoalOre extends Solid{ +class CoalOre extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/Concrete.php b/src/pocketmine/block/Concrete.php index 93243fee1..67c18a4c8 100644 --- a/src/pocketmine/block/Concrete.php +++ b/src/pocketmine/block/Concrete.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class Concrete extends Solid{ +class Concrete extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(1.8, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/ConcretePowder.php b/src/pocketmine/block/ConcretePowder.php index d4adec673..881b864ba 100644 --- a/src/pocketmine/block/ConcretePowder.php +++ b/src/pocketmine/block/ConcretePowder.php @@ -27,7 +27,7 @@ use pocketmine\block\utils\Fallable; use pocketmine\block\utils\FallableTrait; use pocketmine\math\Facing; -class ConcretePowder extends Solid implements Fallable{ +class ConcretePowder extends Opaque implements Fallable{ use FallableTrait { onNearbyBlockChange as protected startFalling; } diff --git a/src/pocketmine/block/CraftingTable.php b/src/pocketmine/block/CraftingTable.php index e63fd3f10..d4f0259ed 100644 --- a/src/pocketmine/block/CraftingTable.php +++ b/src/pocketmine/block/CraftingTable.php @@ -28,7 +28,7 @@ use pocketmine\item\Item; use pocketmine\math\Vector3; use pocketmine\player\Player; -class CraftingTable extends Solid{ +class CraftingTable extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(2.5, BlockToolType::AXE)); diff --git a/src/pocketmine/block/DiamondOre.php b/src/pocketmine/block/DiamondOre.php index ff0ea297e..44d89c966 100644 --- a/src/pocketmine/block/DiamondOre.php +++ b/src/pocketmine/block/DiamondOre.php @@ -28,7 +28,7 @@ use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; use function mt_rand; -class DiamondOre extends Solid{ +class DiamondOre extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel())); diff --git a/src/pocketmine/block/Dirt.php b/src/pocketmine/block/Dirt.php index 5511d9b6d..5d035b318 100644 --- a/src/pocketmine/block/Dirt.php +++ b/src/pocketmine/block/Dirt.php @@ -29,7 +29,7 @@ use pocketmine\math\Facing; use pocketmine\math\Vector3; use pocketmine\player\Player; -class Dirt extends Solid{ +class Dirt extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.5, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/DriedKelp.php b/src/pocketmine/block/DriedKelp.php index fbc0411d7..b5a05efa5 100644 --- a/src/pocketmine/block/DriedKelp.php +++ b/src/pocketmine/block/DriedKelp.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class DriedKelp extends Solid{ +class DriedKelp extends Opaque{ public function getFlameEncouragement() : int{ return 30; diff --git a/src/pocketmine/block/Element.php b/src/pocketmine/block/Element.php index fa0cd2d66..16234b308 100644 --- a/src/pocketmine/block/Element.php +++ b/src/pocketmine/block/Element.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Element extends Solid{ +class Element extends Opaque{ /** @var int */ private $atomicWeight; diff --git a/src/pocketmine/block/EmeraldOre.php b/src/pocketmine/block/EmeraldOre.php index 4345ada46..aa9b95c27 100644 --- a/src/pocketmine/block/EmeraldOre.php +++ b/src/pocketmine/block/EmeraldOre.php @@ -28,7 +28,7 @@ use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; use function mt_rand; -class EmeraldOre extends Solid{ +class EmeraldOre extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::IRON()->getHarvestLevel())); diff --git a/src/pocketmine/block/EndPortalFrame.php b/src/pocketmine/block/EndPortalFrame.php index 70e5f5aef..9f031e33a 100644 --- a/src/pocketmine/block/EndPortalFrame.php +++ b/src/pocketmine/block/EndPortalFrame.php @@ -32,7 +32,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use pocketmine\world\BlockTransaction; -class EndPortalFrame extends Solid{ +class EndPortalFrame extends Opaque{ /** @var int */ protected $facing = Facing::NORTH; diff --git a/src/pocketmine/block/Furnace.php b/src/pocketmine/block/Furnace.php index 3864118c8..1d3af756e 100644 --- a/src/pocketmine/block/Furnace.php +++ b/src/pocketmine/block/Furnace.php @@ -32,7 +32,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use pocketmine\world\BlockTransaction; -class Furnace extends Solid{ +class Furnace extends Opaque{ /** @var BlockIdentifierFlattened */ protected $idInfo; diff --git a/src/pocketmine/block/GlazedTerracotta.php b/src/pocketmine/block/GlazedTerracotta.php index 5f680e036..9efb9c347 100644 --- a/src/pocketmine/block/GlazedTerracotta.php +++ b/src/pocketmine/block/GlazedTerracotta.php @@ -32,7 +32,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use pocketmine\world\BlockTransaction; -class GlazedTerracotta extends Solid{ +class GlazedTerracotta extends Opaque{ /** @var int */ protected $facing = Facing::NORTH; diff --git a/src/pocketmine/block/GlowingObsidian.php b/src/pocketmine/block/GlowingObsidian.php index 74f5ba694..036459eae 100644 --- a/src/pocketmine/block/GlowingObsidian.php +++ b/src/pocketmine/block/GlowingObsidian.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class GlowingObsidian extends Solid{ +class GlowingObsidian extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(10.0, BlockToolType::PICKAXE, ToolTier::DIAMOND()->getHarvestLevel(), 50.0)); diff --git a/src/pocketmine/block/Grass.php b/src/pocketmine/block/Grass.php index 25b9188e4..2e1485a3e 100644 --- a/src/pocketmine/block/Grass.php +++ b/src/pocketmine/block/Grass.php @@ -35,7 +35,7 @@ use pocketmine\utils\Random; use pocketmine\world\generator\object\TallGrass as TallGrassObject; use function mt_rand; -class Grass extends Solid{ +class Grass extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.6, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/Gravel.php b/src/pocketmine/block/Gravel.php index a93173ffb..1089b5893 100644 --- a/src/pocketmine/block/Gravel.php +++ b/src/pocketmine/block/Gravel.php @@ -29,7 +29,7 @@ use pocketmine\item\Item; use pocketmine\item\VanillaItems; use function mt_rand; -class Gravel extends Solid implements Fallable{ +class Gravel extends Opaque implements Fallable{ use FallableTrait; public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ diff --git a/src/pocketmine/block/HardenedClay.php b/src/pocketmine/block/HardenedClay.php index 293d2f4ec..1617a738c 100644 --- a/src/pocketmine/block/HardenedClay.php +++ b/src/pocketmine/block/HardenedClay.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class HardenedClay extends Solid{ +class HardenedClay extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(1.25, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 21.0)); diff --git a/src/pocketmine/block/HayBale.php b/src/pocketmine/block/HayBale.php index 38e480a9e..d6c1be286 100644 --- a/src/pocketmine/block/HayBale.php +++ b/src/pocketmine/block/HayBale.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\block\utils\PillarRotationTrait; -class HayBale extends Solid{ +class HayBale extends Opaque{ use PillarRotationTrait; public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ diff --git a/src/pocketmine/block/InfestedStone.php b/src/pocketmine/block/InfestedStone.php index c08a0c5c7..1457daf4c 100644 --- a/src/pocketmine/block/InfestedStone.php +++ b/src/pocketmine/block/InfestedStone.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\Item; -abstract class InfestedStone extends Solid{ +abstract class InfestedStone extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.75)); diff --git a/src/pocketmine/block/LapisOre.php b/src/pocketmine/block/LapisOre.php index a1e49f227..f79a95239 100644 --- a/src/pocketmine/block/LapisOre.php +++ b/src/pocketmine/block/LapisOre.php @@ -28,7 +28,7 @@ use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; use function mt_rand; -class LapisOre extends Solid{ +class LapisOre extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::STONE()->getHarvestLevel())); diff --git a/src/pocketmine/block/Magma.php b/src/pocketmine/block/Magma.php index 16f1e4435..fd3437bc4 100644 --- a/src/pocketmine/block/Magma.php +++ b/src/pocketmine/block/Magma.php @@ -28,7 +28,7 @@ use pocketmine\event\entity\EntityDamageByBlockEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\item\ToolTier; -class Magma extends Solid{ +class Magma extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.5, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/Mycelium.php b/src/pocketmine/block/Mycelium.php index fa1a4e12e..93a7c11b1 100644 --- a/src/pocketmine/block/Mycelium.php +++ b/src/pocketmine/block/Mycelium.php @@ -28,7 +28,7 @@ use pocketmine\item\Item; use pocketmine\math\Facing; use function mt_rand; -class Mycelium extends Solid{ +class Mycelium extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.6, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/NetherQuartzOre.php b/src/pocketmine/block/NetherQuartzOre.php index 7c55be08f..598ded41d 100644 --- a/src/pocketmine/block/NetherQuartzOre.php +++ b/src/pocketmine/block/NetherQuartzOre.php @@ -28,7 +28,7 @@ use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; use function mt_rand; -class NetherQuartzOre extends Solid{ +class NetherQuartzOre extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(3.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/NetherReactor.php b/src/pocketmine/block/NetherReactor.php index 800ac583d..90045427d 100644 --- a/src/pocketmine/block/NetherReactor.php +++ b/src/pocketmine/block/NetherReactor.php @@ -28,7 +28,7 @@ use pocketmine\item\Item; use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; -class NetherReactor extends Solid{ +class NetherReactor extends Opaque{ /** @var int */ protected $state = BlockLegacyMetadata::NETHER_REACTOR_INACTIVE; diff --git a/src/pocketmine/block/Netherrack.php b/src/pocketmine/block/Netherrack.php index f1db4323f..895a07802 100644 --- a/src/pocketmine/block/Netherrack.php +++ b/src/pocketmine/block/Netherrack.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class Netherrack extends Solid{ +class Netherrack extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.4, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/Note.php b/src/pocketmine/block/Note.php index ca298c551..da65aab21 100644 --- a/src/pocketmine/block/Note.php +++ b/src/pocketmine/block/Note.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\block\tile\Note as TileNote; use function assert; -class Note extends Solid{ +class Note extends Opaque{ public const MIN_PITCH = 0; public const MAX_PITCH = 24; diff --git a/src/pocketmine/block/Solid.php b/src/pocketmine/block/Opaque.php similarity index 96% rename from src/pocketmine/block/Solid.php rename to src/pocketmine/block/Opaque.php index 1184022aa..19e16292e 100644 --- a/src/pocketmine/block/Solid.php +++ b/src/pocketmine/block/Opaque.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Solid extends Block{ +class Opaque extends Block{ public function isSolid() : bool{ return true; diff --git a/src/pocketmine/block/PackedIce.php b/src/pocketmine/block/PackedIce.php index a5bca2726..852b07e3c 100644 --- a/src/pocketmine/block/PackedIce.php +++ b/src/pocketmine/block/PackedIce.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\Item; -class PackedIce extends Solid{ +class PackedIce extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.5, BlockToolType::PICKAXE)); diff --git a/src/pocketmine/block/Planks.php b/src/pocketmine/block/Planks.php index 593d21147..e7632f87a 100644 --- a/src/pocketmine/block/Planks.php +++ b/src/pocketmine/block/Planks.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Planks extends Solid{ +class Planks extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(2.0, BlockToolType::AXE, 0, 15.0)); diff --git a/src/pocketmine/block/Podzol.php b/src/pocketmine/block/Podzol.php index 20e55c1b0..48edfec50 100644 --- a/src/pocketmine/block/Podzol.php +++ b/src/pocketmine/block/Podzol.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Podzol extends Solid{ +class Podzol extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(2.5, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/RedMushroomBlock.php b/src/pocketmine/block/RedMushroomBlock.php index c1bbada6a..2e9a43fa7 100644 --- a/src/pocketmine/block/RedMushroomBlock.php +++ b/src/pocketmine/block/RedMushroomBlock.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\item\Item; use function mt_rand; -class RedMushroomBlock extends Solid{ +class RedMushroomBlock extends Opaque{ /** * @var int diff --git a/src/pocketmine/block/Redstone.php b/src/pocketmine/block/Redstone.php index 6c22fbc56..7f06a706c 100644 --- a/src/pocketmine/block/Redstone.php +++ b/src/pocketmine/block/Redstone.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\ToolTier; -class Redstone extends Solid{ +class Redstone extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(5.0, BlockToolType::PICKAXE, ToolTier::WOOD()->getHarvestLevel(), 30.0)); diff --git a/src/pocketmine/block/RedstoneLamp.php b/src/pocketmine/block/RedstoneLamp.php index b896ad03d..d16ca52e8 100644 --- a/src/pocketmine/block/RedstoneLamp.php +++ b/src/pocketmine/block/RedstoneLamp.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class RedstoneLamp extends Solid{ +class RedstoneLamp extends Opaque{ /** @var BlockIdentifierFlattened */ protected $idInfo; diff --git a/src/pocketmine/block/RedstoneOre.php b/src/pocketmine/block/RedstoneOre.php index 8fe05ed25..92cfc0577 100644 --- a/src/pocketmine/block/RedstoneOre.php +++ b/src/pocketmine/block/RedstoneOre.php @@ -30,7 +30,7 @@ use pocketmine\math\Vector3; use pocketmine\player\Player; use function mt_rand; -class RedstoneOre extends Solid{ +class RedstoneOre extends Opaque{ /** @var BlockIdentifierFlattened */ protected $idInfo; diff --git a/src/pocketmine/block/Reserved6.php b/src/pocketmine/block/Reserved6.php index 85d6b6b47..940fbf33e 100644 --- a/src/pocketmine/block/Reserved6.php +++ b/src/pocketmine/block/Reserved6.php @@ -23,7 +23,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Reserved6 extends Solid{ +class Reserved6 extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? BlockBreakInfo::instant()); diff --git a/src/pocketmine/block/Sand.php b/src/pocketmine/block/Sand.php index ce13cabcc..8516fdca9 100644 --- a/src/pocketmine/block/Sand.php +++ b/src/pocketmine/block/Sand.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\block\utils\Fallable; use pocketmine\block\utils\FallableTrait; -class Sand extends Solid implements Fallable{ +class Sand extends Opaque implements Fallable{ use FallableTrait; public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ diff --git a/src/pocketmine/block/Snow.php b/src/pocketmine/block/Snow.php index 02e98af2e..9d227333a 100644 --- a/src/pocketmine/block/Snow.php +++ b/src/pocketmine/block/Snow.php @@ -27,7 +27,7 @@ use pocketmine\item\Item; use pocketmine\item\ToolTier; use pocketmine\item\VanillaItems; -class Snow extends Solid{ +class Snow extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.2, BlockToolType::SHOVEL, ToolTier::WOOD()->getHarvestLevel())); diff --git a/src/pocketmine/block/SoulSand.php b/src/pocketmine/block/SoulSand.php index b613a9f5e..bc60ad9ec 100644 --- a/src/pocketmine/block/SoulSand.php +++ b/src/pocketmine/block/SoulSand.php @@ -26,7 +26,7 @@ namespace pocketmine\block; use pocketmine\math\AxisAlignedBB; use pocketmine\math\Facing; -class SoulSand extends Solid{ +class SoulSand extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.5, BlockToolType::SHOVEL)); diff --git a/src/pocketmine/block/Sponge.php b/src/pocketmine/block/Sponge.php index 1b78bac47..f95a7128c 100644 --- a/src/pocketmine/block/Sponge.php +++ b/src/pocketmine/block/Sponge.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace pocketmine\block; -class Sponge extends Solid{ +class Sponge extends Opaque{ /** @var bool */ protected $wet = false; diff --git a/src/pocketmine/block/TNT.php b/src/pocketmine/block/TNT.php index 4aa5fd250..e263d7cba 100644 --- a/src/pocketmine/block/TNT.php +++ b/src/pocketmine/block/TNT.php @@ -38,7 +38,7 @@ use function cos; use function sin; use const M_PI; -class TNT extends Solid{ +class TNT extends Opaque{ /** @var bool */ protected $unstable = false; //TODO: Usage unclear, seems to be a weird hack in vanilla diff --git a/src/pocketmine/block/VanillaBlocks.php b/src/pocketmine/block/VanillaBlocks.php index d14c05149..605c629d6 100644 --- a/src/pocketmine/block/VanillaBlocks.php +++ b/src/pocketmine/block/VanillaBlocks.php @@ -49,7 +49,7 @@ use function assert; * @method static ActivatorRail ACTIVATOR_RAIL() * @method static Air AIR() * @method static Flower ALLIUM() - * @method static Solid ANDESITE() + * @method static Opaque ANDESITE() * @method static Slab ANDESITE_SLAB() * @method static Stair ANDESITE_STAIRS() * @method static Wall ANDESITE_WALL() @@ -99,7 +99,7 @@ use function assert; * @method static Slab BRICK_SLAB() * @method static Stair BRICK_STAIRS() * @method static Wall BRICK_WALL() - * @method static Solid BRICKS() + * @method static Opaque BRICKS() * @method static Carpet BROWN_CARPET() * @method static Concrete BROWN_CONCRETE() * @method static ConcretePowder BROWN_CONCRETE_POWDER() @@ -115,26 +115,26 @@ use function assert; * @method static Carrot CARROTS() * @method static CarvedPumpkin CARVED_PUMPKIN() * @method static Chest CHEST() - * @method static Solid CHISELED_QUARTZ() - * @method static Solid CHISELED_RED_SANDSTONE() - * @method static Solid CHISELED_SANDSTONE() - * @method static Solid CHISELED_STONE_BRICKS() + * @method static Opaque CHISELED_QUARTZ() + * @method static Opaque CHISELED_RED_SANDSTONE() + * @method static Opaque CHISELED_SANDSTONE() + * @method static Opaque CHISELED_STONE_BRICKS() * @method static Clay CLAY() * @method static Coal COAL() * @method static CoalOre COAL_ORE() * @method static CoarseDirt COARSE_DIRT() - * @method static Solid COBBLESTONE() + * @method static Opaque COBBLESTONE() * @method static Slab COBBLESTONE_SLAB() * @method static Stair COBBLESTONE_STAIRS() * @method static Wall COBBLESTONE_WALL() * @method static Cobweb COBWEB() * @method static CocoaBlock COCOA_POD() * @method static Flower CORNFLOWER() - * @method static Solid CRACKED_STONE_BRICKS() + * @method static Opaque CRACKED_STONE_BRICKS() * @method static CraftingTable CRAFTING_TABLE() - * @method static Solid CUT_RED_SANDSTONE() + * @method static Opaque CUT_RED_SANDSTONE() * @method static Slab CUT_RED_SANDSTONE_SLAB() - * @method static Solid CUT_SANDSTONE() + * @method static Opaque CUT_SANDSTONE() * @method static Slab CUT_SANDSTONE_SLAB() * @method static Carpet CYAN_CARPET() * @method static Concrete CYAN_CONCRETE() @@ -159,15 +159,15 @@ use function assert; * @method static WoodenStairs DARK_OAK_STAIRS() * @method static WoodenTrapdoor DARK_OAK_TRAPDOOR() * @method static Wood DARK_OAK_WOOD() - * @method static Solid DARK_PRISMARINE() + * @method static Opaque DARK_PRISMARINE() * @method static Slab DARK_PRISMARINE_SLAB() * @method static Stair DARK_PRISMARINE_STAIRS() * @method static DaylightSensor DAYLIGHT_SENSOR() * @method static DeadBush DEAD_BUSH() * @method static DetectorRail DETECTOR_RAIL() - * @method static Solid DIAMOND() + * @method static Opaque DIAMOND() * @method static DiamondOre DIAMOND_ORE() - * @method static Solid DIORITE() + * @method static Opaque DIORITE() * @method static Slab DIORITE_SLAB() * @method static Stair DIORITE_STAIRS() * @method static Wall DIORITE_WALL() @@ -291,19 +291,19 @@ use function assert; * @method static Element ELEMENT_XENON() * @method static Element ELEMENT_YTTERBIUM() * @method static Element ELEMENT_YTTRIUM() - * @method static Solid ELEMENT_ZERO() + * @method static Opaque ELEMENT_ZERO() * @method static Element ELEMENT_ZINC() * @method static Element ELEMENT_ZIRCONIUM() - * @method static Solid EMERALD() + * @method static Opaque EMERALD() * @method static EmeraldOre EMERALD_ORE() * @method static EnchantingTable ENCHANTING_TABLE() * @method static EndPortalFrame END_PORTAL_FRAME() * @method static EndRod END_ROD() - * @method static Solid END_STONE() + * @method static Opaque END_STONE() * @method static Slab END_STONE_BRICK_SLAB() * @method static Stair END_STONE_BRICK_STAIRS() * @method static Wall END_STONE_BRICK_WALL() - * @method static Solid END_STONE_BRICKS() + * @method static Opaque END_STONE_BRICKS() * @method static EnderChest ENDER_CHEST() * @method static Slab FAKE_WOODEN_SLAB() * @method static Farmland FARMLAND() @@ -316,9 +316,9 @@ use function assert; * @method static GlassPane GLASS_PANE() * @method static GlowingObsidian GLOWING_OBSIDIAN() * @method static Glowstone GLOWSTONE() - * @method static Solid GOLD() - * @method static Solid GOLD_ORE() - * @method static Solid GRANITE() + * @method static Opaque GOLD() + * @method static Opaque GOLD_ORE() + * @method static Opaque GRANITE() * @method static Slab GRANITE_SLAB() * @method static Stair GRANITE_STAIRS() * @method static Wall GRANITE_WALL() @@ -386,13 +386,13 @@ use function assert; * @method static InfestedStone INFESTED_MOSSY_STONE_BRICK() * @method static InfestedStone INFESTED_STONE() * @method static InfestedStone INFESTED_STONE_BRICK() - * @method static Solid INFO_UPDATE() - * @method static Solid INFO_UPDATE2() + * @method static Opaque INFO_UPDATE() + * @method static Opaque INFO_UPDATE2() * @method static Transparent INVISIBLE_BEDROCK() - * @method static Solid IRON() + * @method static Opaque IRON() * @method static Thin IRON_BARS() * @method static Door IRON_DOOR() - * @method static Solid IRON_ORE() + * @method static Opaque IRON_ORE() * @method static Trapdoor IRON_TRAPDOOR() * @method static ItemFrame ITEM_FRAME() * @method static WoodenButton JUNGLE_BUTTON() @@ -411,11 +411,11 @@ use function assert; * @method static Wood JUNGLE_WOOD() * @method static Ladder LADDER() * @method static Lantern LANTERN() - * @method static Solid LAPIS_LAZULI() + * @method static Opaque LAPIS_LAZULI() * @method static LapisOre LAPIS_LAZULI_ORE() * @method static DoubleTallGrass LARGE_FERN() * @method static Lava LAVA() - * @method static Solid LEGACY_STONECUTTER() + * @method static Opaque LEGACY_STONECUTTER() * @method static Lever LEVER() * @method static Carpet LIGHT_BLUE_CARPET() * @method static Concrete LIGHT_BLUE_CONCRETE() @@ -458,25 +458,25 @@ use function assert; * @method static MelonStem MELON_STEM() * @method static Skull MOB_HEAD() * @method static MonsterSpawner MONSTER_SPAWNER() - * @method static Solid MOSSY_COBBLESTONE() + * @method static Opaque MOSSY_COBBLESTONE() * @method static Slab MOSSY_COBBLESTONE_SLAB() * @method static Stair MOSSY_COBBLESTONE_STAIRS() * @method static Wall MOSSY_COBBLESTONE_WALL() * @method static Slab MOSSY_STONE_BRICK_SLAB() * @method static Stair MOSSY_STONE_BRICK_STAIRS() * @method static Wall MOSSY_STONE_BRICK_WALL() - * @method static Solid MOSSY_STONE_BRICKS() + * @method static Opaque MOSSY_STONE_BRICKS() * @method static Mycelium MYCELIUM() * @method static Fence NETHER_BRICK_FENCE() * @method static Slab NETHER_BRICK_SLAB() * @method static Stair NETHER_BRICK_STAIRS() * @method static Wall NETHER_BRICK_WALL() - * @method static Solid NETHER_BRICKS() + * @method static Opaque NETHER_BRICKS() * @method static NetherPortal NETHER_PORTAL() * @method static NetherQuartzOre NETHER_QUARTZ_ORE() * @method static NetherReactor NETHER_REACTOR_CORE() * @method static NetherWartPlant NETHER_WART() - * @method static Solid NETHER_WART_BLOCK() + * @method static Opaque NETHER_WART_BLOCK() * @method static Netherrack NETHERRACK() * @method static Note NOTE_BLOCK() * @method static WoodenButton OAK_BUTTON() @@ -493,7 +493,7 @@ use function assert; * @method static WoodenStairs OAK_STAIRS() * @method static WoodenTrapdoor OAK_TRAPDOOR() * @method static Wood OAK_WOOD() - * @method static Solid OBSIDIAN() + * @method static Opaque OBSIDIAN() * @method static Carpet ORANGE_CARPET() * @method static Concrete ORANGE_CONCRETE() * @method static ConcretePowder ORANGE_CONCRETE_POWDER() @@ -516,26 +516,26 @@ use function assert; * @method static Flower PINK_TULIP() * @method static Wool PINK_WOOL() * @method static Podzol PODZOL() - * @method static Solid POLISHED_ANDESITE() + * @method static Opaque POLISHED_ANDESITE() * @method static Slab POLISHED_ANDESITE_SLAB() * @method static Stair POLISHED_ANDESITE_STAIRS() - * @method static Solid POLISHED_DIORITE() + * @method static Opaque POLISHED_DIORITE() * @method static Slab POLISHED_DIORITE_SLAB() * @method static Stair POLISHED_DIORITE_STAIRS() - * @method static Solid POLISHED_GRANITE() + * @method static Opaque POLISHED_GRANITE() * @method static Slab POLISHED_GRANITE_SLAB() * @method static Stair POLISHED_GRANITE_STAIRS() * @method static Flower POPPY() * @method static Potato POTATOES() * @method static PoweredRail POWERED_RAIL() - * @method static Solid PRISMARINE() - * @method static Solid PRISMARINE_BRICKS() + * @method static Opaque PRISMARINE() + * @method static Opaque PRISMARINE_BRICKS() * @method static Slab PRISMARINE_BRICKS_SLAB() * @method static Stair PRISMARINE_BRICKS_STAIRS() * @method static Slab PRISMARINE_SLAB() * @method static Stair PRISMARINE_STAIRS() * @method static Wall PRISMARINE_WALL() - * @method static Solid PUMPKIN() + * @method static Opaque PUMPKIN() * @method static PumpkinStem PUMPKIN_STEM() * @method static Carpet PURPLE_CARPET() * @method static Concrete PURPLE_CONCRETE() @@ -546,12 +546,12 @@ use function assert; * @method static GlassPane PURPLE_STAINED_GLASS_PANE() * @method static Torch PURPLE_TORCH() * @method static Wool PURPLE_WOOL() - * @method static Solid PURPUR() - * @method static Solid PURPUR_PILLAR() + * @method static Opaque PURPUR() + * @method static Opaque PURPUR_PILLAR() * @method static Slab PURPUR_SLAB() * @method static Stair PURPUR_STAIRS() - * @method static Solid QUARTZ() - * @method static Solid QUARTZ_PILLAR() + * @method static Opaque QUARTZ() + * @method static Opaque QUARTZ_PILLAR() * @method static Slab QUARTZ_SLAB() * @method static Stair QUARTZ_STAIRS() * @method static Rail RAIL() @@ -564,9 +564,9 @@ use function assert; * @method static Slab RED_NETHER_BRICK_SLAB() * @method static Stair RED_NETHER_BRICK_STAIRS() * @method static Wall RED_NETHER_BRICK_WALL() - * @method static Solid RED_NETHER_BRICKS() + * @method static Opaque RED_NETHER_BRICKS() * @method static Sand RED_SAND() - * @method static Solid RED_SANDSTONE() + * @method static Opaque RED_SANDSTONE() * @method static Slab RED_SANDSTONE_SLAB() * @method static Stair RED_SANDSTONE_STAIRS() * @method static Wall RED_SANDSTONE_WALL() @@ -586,23 +586,23 @@ use function assert; * @method static Reserved6 RESERVED6() * @method static DoublePlant ROSE_BUSH() * @method static Sand SAND() - * @method static Solid SANDSTONE() + * @method static Opaque SANDSTONE() * @method static Slab SANDSTONE_SLAB() * @method static Stair SANDSTONE_STAIRS() * @method static Wall SANDSTONE_WALL() * @method static SeaLantern SEA_LANTERN() * @method static SeaPickle SEA_PICKLE() * @method static Anvil SLIGHTLY_DAMAGED_ANVIL() - * @method static Solid SMOOTH_QUARTZ() + * @method static Opaque SMOOTH_QUARTZ() * @method static Slab SMOOTH_QUARTZ_SLAB() * @method static Stair SMOOTH_QUARTZ_STAIRS() - * @method static Solid SMOOTH_RED_SANDSTONE() + * @method static Opaque SMOOTH_RED_SANDSTONE() * @method static Slab SMOOTH_RED_SANDSTONE_SLAB() * @method static Stair SMOOTH_RED_SANDSTONE_STAIRS() - * @method static Solid SMOOTH_SANDSTONE() + * @method static Opaque SMOOTH_SANDSTONE() * @method static Slab SMOOTH_SANDSTONE_SLAB() * @method static Stair SMOOTH_SANDSTONE_STAIRS() - * @method static Solid SMOOTH_STONE() + * @method static Opaque SMOOTH_STONE() * @method static Slab SMOOTH_STONE_SLAB() * @method static Snow SNOW() * @method static SnowLayer SNOW_LAYER() @@ -622,11 +622,11 @@ use function assert; * @method static WoodenStairs SPRUCE_STAIRS() * @method static WoodenTrapdoor SPRUCE_TRAPDOOR() * @method static Wood SPRUCE_WOOD() - * @method static Solid STONE() + * @method static Opaque STONE() * @method static Slab STONE_BRICK_SLAB() * @method static Stair STONE_BRICK_STAIRS() * @method static Wall STONE_BRICK_WALL() - * @method static Solid STONE_BRICKS() + * @method static Opaque STONE_BRICKS() * @method static StoneButton STONE_BUTTON() * @method static StonePressurePlate STONE_PRESSURE_PLATE() * @method static Slab STONE_SLAB() diff --git a/src/pocketmine/block/Wood.php b/src/pocketmine/block/Wood.php index 31bbeb7df..a4650749b 100644 --- a/src/pocketmine/block/Wood.php +++ b/src/pocketmine/block/Wood.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\block\utils\TreeType; -class Wood extends Solid{ +class Wood extends Opaque{ /** @var TreeType */ private $treeType; diff --git a/src/pocketmine/block/Wool.php b/src/pocketmine/block/Wool.php index 63f6bf531..015442484 100644 --- a/src/pocketmine/block/Wool.php +++ b/src/pocketmine/block/Wool.php @@ -25,7 +25,7 @@ namespace pocketmine\block; use pocketmine\item\Item; -class Wool extends Solid{ +class Wool extends Opaque{ public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){ parent::__construct($idInfo, $name, $breakInfo ?? new class(0.8, BlockToolType::SHEARS) extends BlockBreakInfo{ diff --git a/tests/phpunit/block/MyCustomBlock.php b/tests/phpunit/block/MyCustomBlock.php index 7d21c0404..d0df0261d 100644 --- a/tests/phpunit/block/MyCustomBlock.php +++ b/tests/phpunit/block/MyCustomBlock.php @@ -23,6 +23,6 @@ declare(strict_types=1); namespace pocketmine\block; -class MyCustomBlock extends Solid{ +class MyCustomBlock extends Opaque{ } diff --git a/tests/phpunit/block/StrangeNewBlock.php b/tests/phpunit/block/StrangeNewBlock.php index 3ffa82020..c505184d0 100644 --- a/tests/phpunit/block/StrangeNewBlock.php +++ b/tests/phpunit/block/StrangeNewBlock.php @@ -23,6 +23,6 @@ declare(strict_types=1); namespace pocketmine\block; -class StrangeNewBlock extends Solid{ +class StrangeNewBlock extends Opaque{ }