From 77967e482b353e03c6763d7729e78af756bdeae9 Mon Sep 17 00:00:00 2001 From: ArkQuark <74979909+ArkQuark@users.noreply.github.com> Date: Fri, 21 Jan 2022 14:53:24 +0300 Subject: [PATCH] Added InfoUpdate, InfoUpdate2, Reserved6, InvisibleBedrock blocks --- src/constants/BlockIDs.php | 5 +++ src/material/Block.php | 5 +++ src/material/block/solid/InfoUpdate.php | 29 +++++++++++++++ src/material/block/solid/InfoUpdate2.php | 29 +++++++++++++++ src/material/block/solid/InvisibleBedrock.php | 36 +++++++++++++++++++ src/material/block/solid/Reserved6.php | 29 +++++++++++++++ 6 files changed, 133 insertions(+) create mode 100644 src/material/block/solid/InfoUpdate.php create mode 100644 src/material/block/solid/InfoUpdate2.php create mode 100644 src/material/block/solid/InvisibleBedrock.php create mode 100644 src/material/block/solid/Reserved6.php diff --git a/src/constants/BlockIDs.php b/src/constants/BlockIDs.php index 0285f1ab..0ab25e74 100644 --- a/src/constants/BlockIDs.php +++ b/src/constants/BlockIDs.php @@ -133,6 +133,7 @@ define("LIT_PUMPKIN", 91); define("JACK_O_LANTERN", 91); define("CAKE_BLOCK", 92); +define("INVISIBLE_BEDROCK", 95); define("TRAPDOOR", 96); define("STONE_BRICKS", 98); @@ -191,3 +192,7 @@ define("BEETROOT_BLOCK", 244); define("STONECUTTER", 245); define("GLOWING_OBSIDIAN", 246); define("NETHER_REACTOR", 247); +define("INFO_UPDATE", 248); +define("INFO_UPDATE2", 249); + +define("RESERVED6", 255); \ No newline at end of file diff --git a/src/material/Block.php b/src/material/Block.php index 223edc13..43d47f17 100644 --- a/src/material/Block.php +++ b/src/material/Block.php @@ -102,6 +102,8 @@ abstract class Block extends Position{ GLOWSTONE_BLOCK => "GlowstoneBlock", LIT_PUMPKIN => "LitPumpkinBlock", + INVISIBLE_BEDROCK => "InvisibleBedrockBlock", + CAKE_BLOCK => "CakeBlock", TRAPDOOR => "TrapdoorBlock", @@ -146,6 +148,9 @@ abstract class Block extends Position{ STONECUTTER => "StonecutterBlock", GLOWING_OBSIDIAN => "GlowingObsidianBlock", NETHER_REACTOR => "NetherReactorBlock", + INFO_UPDATE => "InfoUpdateBlock", + INFO_UPDATE2 => "InfoUpdate2Block", + RESERVED6 => "Reserved6Block", ); protected $id; protected $meta; diff --git a/src/material/block/solid/InfoUpdate.php b/src/material/block/solid/InfoUpdate.php new file mode 100644 index 00000000..0c725b50 --- /dev/null +++ b/src/material/block/solid/InfoUpdate.php @@ -0,0 +1,29 @@ +breakable = true; + $this->hardness = 0; + } + +} \ No newline at end of file diff --git a/src/material/block/solid/InfoUpdate2.php b/src/material/block/solid/InfoUpdate2.php new file mode 100644 index 00000000..38773b30 --- /dev/null +++ b/src/material/block/solid/InfoUpdate2.php @@ -0,0 +1,29 @@ +breakable = true; + $this->hardness = 0; + } + +} \ No newline at end of file diff --git a/src/material/block/solid/InvisibleBedrock.php b/src/material/block/solid/InvisibleBedrock.php new file mode 100644 index 00000000..848800f7 --- /dev/null +++ b/src/material/block/solid/InvisibleBedrock.php @@ -0,0 +1,36 @@ +breakable = false; + $this->hardness = 3600000; + } + + public function isBreakable(Item $item, Player $player){ + if(($player->gamemode & 0x01) === 0x01){ + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/src/material/block/solid/Reserved6.php b/src/material/block/solid/Reserved6.php new file mode 100644 index 00000000..9ed72e39 --- /dev/null +++ b/src/material/block/solid/Reserved6.php @@ -0,0 +1,29 @@ +breakable = true; + $this->hardness = 0; + } + +} \ No newline at end of file