From a8f4a287eab217b9aeadfbfaa7ee6a7f6209c828 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 28 Aug 2023 02:44:39 +0300 Subject: [PATCH 1/9] test --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d230f8df..bf438b41 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ NostalgiaCore is a fork of Legacy PocketMine-MP 1.3.12, which fixes bugs of Legacy PocketMine-MP, and adds new content -Supported MCPE versions: 0.9.5 and maybe other 0.9.x versions +Supported MCPE versions: 0.10.x (Special thx to GullCraft Network and DartMiner43) -

Why should you use NostalgiaCore to run a Minecraft Pocket Edition 0.9.5 server?

+

Why should you use NostalgiaCore to run a Minecraft Pocket Edition 0.10.x server?

You should not use it now.

Download Stable NostalgiaCore

From c96a8f34916c17bb8bc01a33f764873d4435fde7 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 28 Aug 2023 02:45:49 +0300 Subject: [PATCH 2/9] added src of freehij --- src/config.php | 8 ++++---- src/network/protocol/ProtocolInfo.php | 2 +- src/network/protocol/packet/MovePlayerPacket.php | 3 ++- src/network/protocol/packet/UseItemPacket.php | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/config.php b/src/config.php index a53cf9d0..b87c3fb9 100644 --- a/src/config.php +++ b/src/config.php @@ -48,11 +48,11 @@ set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH); ini_set("memory_limit", "256M"); //Default define("LOG", true); define("START_TIME", microtime(true)); -define("MAJOR_VERSION", "2.0.0dev"); -define("CODENAME", "Breadfence"); //i'm not very creative - kotyaralih -define("CURRENT_MINECRAFT_VERSION", "v0.9.5 alpha"); +define("MAJOR_VERSION", "3.0.0dev"); +define("CODENAME", "Pumpkin Pie"); //i'm not very creative - kotyaralih +define("CURRENT_MINECRAFT_VERSION", "v0.10.5 alpha"); define("CURRENT_API_VERSION", '13.1'); -define("CURRENT_PHP_VERSION", "5.5"); +define("CURRENT_PHP_VERSION", "8.0"); $gitsha1 = false; if(file_exists(FILE_PATH . ".git/refs/heads/master")){ //Found Git information! define("GIT_COMMIT", strtolower(trim(file_get_contents(FILE_PATH . ".git/refs/heads/master")))); diff --git a/src/network/protocol/ProtocolInfo.php b/src/network/protocol/ProtocolInfo.php index d59cb9e2..e8331bc1 100644 --- a/src/network/protocol/ProtocolInfo.php +++ b/src/network/protocol/ProtocolInfo.php @@ -1,7 +1,7 @@ y = $this->getFloat(); $this->z = $this->getFloat(); $this->yaw = $this->getFloat(); - $this->bodyYaw = $this->getFloat(); $this->pitch = $this->getFloat(); + $this->bodyYaw = $this->getFloat(); + $flags = $this->getByte(); $this->teleport = ($this->getByte() & 0x80) > 0; } diff --git a/src/network/protocol/packet/UseItemPacket.php b/src/network/protocol/packet/UseItemPacket.php index b4807724..584ff0fa 100644 --- a/src/network/protocol/packet/UseItemPacket.php +++ b/src/network/protocol/packet/UseItemPacket.php @@ -23,7 +23,7 @@ class UseItemPacket extends RakNetDataPacket{ $this->x = $this->getInt(); $this->y = $this->getInt(); $this->z = $this->getInt(); - $this->face = $this->getInt(); + $this->face = $this->getByte(); $this->item = $this->getShort(); $this->meta = $this->getShort(); $this->eid = $this->getInt(); From be12c3a3bf55ea0cc1d22036c15729dba01f324b Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 28 Aug 2023 23:32:37 +0300 Subject: [PATCH 3/9] i commited a crime --- src/Player.php | 1 - src/entity/Entity.php | 5 ++--- src/network/protocol/packet/MovePlayerPacket.php | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Player.php b/src/Player.php index d9c14a5d..cad8d010 100755 --- a/src/Player.php +++ b/src/Player.php @@ -256,7 +256,6 @@ class Player{ if($this->connected === false){ return false; } - if(EventHandler::callEvent(new DataPacketSendEvent($this, $packet)) === BaseEvent::DENY){ return; } diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 89c101b0..bb0ea934 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -736,7 +736,7 @@ class Entity extends Position if($this->lastHeadYaw != $this->headYaw){ $this->sendHeadYaw(); } - if($this->class !== ENTITY_PLAYER && $update){ + if($this->class === ENTITY_PLAYER || $update){ $this->updateMovement(); } @@ -770,14 +770,13 @@ class Entity extends Position $pk = new MovePlayerPacket(); $pk->eid = $this->eid; $pk->x = $this->x; - $pk->y = $this->y + $this->getEyeHeight(); + $pk->y = $this->y; $pk->z = $this->z; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; $pk->bodyYaw = $this->yaw; $this->server->api->player->broadcastPacket($players, $pk); } else{ - $pk = new MoveEntityPacket; $pk->entities = [[$this->eid, $this->x, $this->y, $this->z, $this->yaw, $this->pitch]]; $this->server->api->player->broadcastPacket($players, $pk); diff --git a/src/network/protocol/packet/MovePlayerPacket.php b/src/network/protocol/packet/MovePlayerPacket.php index a38e8de5..b2f6f30a 100644 --- a/src/network/protocol/packet/MovePlayerPacket.php +++ b/src/network/protocol/packet/MovePlayerPacket.php @@ -21,7 +21,6 @@ class MovePlayerPacket extends RakNetDataPacket{ $this->yaw = $this->getFloat(); $this->pitch = $this->getFloat(); $this->bodyYaw = $this->getFloat(); - $flags = $this->getByte(); $this->teleport = ($this->getByte() & 0x80) > 0; } From daea45c0d39e125977eca1d83fab539adc0547ed Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Wed, 30 Aug 2023 08:21:10 +0300 Subject: [PATCH 4/9] c --- src/API/PluginAPI.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index f8b87aa8..808a3a26 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -148,7 +148,8 @@ class PluginAPI extends stdClass{ $aver = CURRENT_API_VERSION; if(!in_array((string) CURRENT_API_VERSION, $pluginInfo["api"])){ - console("[WARNING] API is not the same as Core, might cause bugs({$pluginInfo["api"]} != {$aver})"); + $s = implode(", ", $pluginInfo["api"]); + console("[WARNING] API is not the same as Core, might cause bugs({$s} != {$aver})"); } $phr = "phar://$filePath/"; From a778de1ff31d1e0f91a2c82b6934cbc5a02ff853 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Wed, 30 Aug 2023 08:24:17 +0300 Subject: [PATCH 5/9] d --- src/API/PluginAPI.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index 808a3a26..04d65d53 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -148,7 +148,8 @@ class PluginAPI extends stdClass{ $aver = CURRENT_API_VERSION; if(!in_array((string) CURRENT_API_VERSION, $pluginInfo["api"])){ - $s = implode(", ", $pluginInfo["api"]); + if(is_array($pluginInfo)) $s = implode(",",$pluginInfo["api"]); + else $s = $pluginInfo["api"]; console("[WARNING] API is not the same as Core, might cause bugs({$s} != {$aver})"); } From e3ecebb17b086eb0d7047bac5b495c0ae121609b Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 8 Oct 2023 13:47:17 +0300 Subject: [PATCH 6/9] sign fix --- src/recipes/CraftingRecipes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recipes/CraftingRecipes.php b/src/recipes/CraftingRecipes.php index 02c6ed81..666719f9 100644 --- a/src/recipes/CraftingRecipes.php +++ b/src/recipes/CraftingRecipes.php @@ -182,7 +182,7 @@ class CraftingRecipes{ "DYE:4x9=>LAPIS_BLOCK:0x1", "WOOL:?x1,STICK:?x8=>PAINTING:0x1", "SUGARCANE:?x3=>PAPER:0x3", - "WOODEN_PLANKS:?x6,STICK:?x1=>SIGN:0x1", + "WOODEN_PLANKS:?x6,STICK:?x1=>SIGN:0x3", "IRON_INGOT:?x6=>IRON_BARS:0x16", "COAL:0x9=>COAL_BLOCK:0x1", "COAL_BLOCK:?x1=>COAL:0x9", From edcf1d0556c74a09b7d7b25c003da31c15d46314 Mon Sep 17 00:00:00 2001 From: FreeHij Date: Sun, 8 Oct 2023 14:10:04 +0300 Subject: [PATCH 7/9] fence --- src/API/BlockAPI.php | 10 +++++ src/constants/BlockIDs.php | 10 +++++ src/material/Block.php | 5 +++ .../block/nonfull/AcaciaFenceGateBlock.php | 44 +++++++++++++++++++ .../block/nonfull/BirchFenceGateBlock.php | 44 +++++++++++++++++++ .../block/nonfull/DarkOakFenceGateBlock.php | 44 +++++++++++++++++++ src/material/block/nonfull/FenceBlock.php | 13 +++++- .../block/nonfull/JungleFenceGateBlock.php | 44 +++++++++++++++++++ .../block/nonfull/SpruceFenceGateBlock.php | 44 +++++++++++++++++++ src/recipes/CraftingRecipes.php | 14 +++++- src/recipes/FuelData.php | 5 +++ 11 files changed, 273 insertions(+), 4 deletions(-) create mode 100644 src/material/block/nonfull/AcaciaFenceGateBlock.php create mode 100644 src/material/block/nonfull/BirchFenceGateBlock.php create mode 100644 src/material/block/nonfull/DarkOakFenceGateBlock.php create mode 100644 src/material/block/nonfull/JungleFenceGateBlock.php create mode 100644 src/material/block/nonfull/SpruceFenceGateBlock.php diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index d15fda93..7446d159 100755 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -139,7 +139,17 @@ class BlockAPI{ [WOODEN_DOOR, 0], [TRAPDOOR, 0], [FENCE, 0], + [FENCE, 1], + [FENCE, 2], + [FENCE, 3], + [FENCE, 4], + [FENCE, 5], [FENCE_GATE, 0], + [SPRUCE_FENCE_GATE, 0], + [BIRCH_FENCE_GATE, 0], + [JUNGLE_FENCE_GATE, 0], + [ACACIA_FENCE_GATE, 0], + [DARK_OAK_FENCE_GATE, 0], [IRON_BARS, 0], [BED, 0], [BOOKSHELF, 0], diff --git a/src/constants/BlockIDs.php b/src/constants/BlockIDs.php index 8b8c4797..c6042eaf 100755 --- a/src/constants/BlockIDs.php +++ b/src/constants/BlockIDs.php @@ -157,6 +157,11 @@ define("REEDS", 83); define("SUGARCANE_BLOCK", 83); define("FENCE", 85); +define("SPRUCE_FENCE", "85:1"); +define("BIRCH_FENCE", "85:2"); +define("JUNGLE_FENCE", "85:3"); +define("ACACIA_FENCE", "85:4"); +define("DARK_OAK_FENCE", "85:5"); define("PUMPKIN", 86); define("NETHERRACK", 87); define("SOUL_SAND", 88); @@ -184,6 +189,11 @@ define("PUMPKIN_STEM", 104); define("MELON_STEM", 105); define("VINES", 106); define("FENCE_GATE", 107); +define("SPRUCE_FENCE_GATE", 183); +define("BIRCH_FENCE_GATE", 184); +define("JUNGLE_FENCE_GATE", 185); +define("ACACIA_FENCE_GATE", 186); +define("DARK_OAK_FENCE_GATE", 187); define("BRICK_STAIRS", 108); define("STONE_BRICK_STAIRS", 109); define("MYCELIUM", 110); diff --git a/src/material/Block.php b/src/material/Block.php index eb93ac8c..466e9f3b 100755 --- a/src/material/Block.php +++ b/src/material/Block.php @@ -151,6 +151,11 @@ abstract class Block extends Position{ PODZOL => "PodzolBlock", STAINED_CLAY => "StainedClayBlock", LILY_PAD => "LilypadBlock", + SPRUCE_FENCE_GATE => "SpruceFenceGateBlock", + BIRCH_FENCE_GATE => "BirchFenceGateBlock", + JUNGLE_FENCE_GATE => "JungleFenceGateBlock", + ACACIA_FENCE_GATE => "AcaciaFenceGateBlock", + DARK_OAK_FENCE_GATE => "DarkOakFenceGate" ); protected $id; protected $meta; diff --git a/src/material/block/nonfull/AcaciaFenceGateBlock.php b/src/material/block/nonfull/AcaciaFenceGateBlock.php new file mode 100644 index 00000000..244af041 --- /dev/null +++ b/src/material/block/nonfull/AcaciaFenceGateBlock.php @@ -0,0 +1,44 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 3, + 1 => 0, + 2 => 1, + 3 => 2, + ); + $this->meta = $faces[$player->entity->getDirection()] & 0x03; + $this->level->setBlock($block, $this, true, false, true); + return true; + } + public function getDrops(Item $item, Player $player){ + return array( + array($this->id, 0, 1), + ); + } + public function onActivate(Item $item, Player $player){ + $this->meta ^= 0x04; + $this->level->setBlock($this, $this, true, false, true); + $players = ServerAPI::request()->api->player->getAll($this->level); + unset($players[$player->CID]); + $pk = new LevelEventPacket; + $pk->x = $this->x; + $pk->y = $this->y; + $pk->z = $this->z; + $pk->evid = 1003; + $pk->data = 0; + ServerAPI::request()->api->player->broadcastPacket($players, $pk); + return true; + } +} diff --git a/src/material/block/nonfull/BirchFenceGateBlock.php b/src/material/block/nonfull/BirchFenceGateBlock.php new file mode 100644 index 00000000..3f31de1a --- /dev/null +++ b/src/material/block/nonfull/BirchFenceGateBlock.php @@ -0,0 +1,44 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 3, + 1 => 0, + 2 => 1, + 3 => 2, + ); + $this->meta = $faces[$player->entity->getDirection()] & 0x03; + $this->level->setBlock($block, $this, true, false, true); + return true; + } + public function getDrops(Item $item, Player $player){ + return array( + array($this->id, 0, 1), + ); + } + public function onActivate(Item $item, Player $player){ + $this->meta ^= 0x04; + $this->level->setBlock($this, $this, true, false, true); + $players = ServerAPI::request()->api->player->getAll($this->level); + unset($players[$player->CID]); + $pk = new LevelEventPacket; + $pk->x = $this->x; + $pk->y = $this->y; + $pk->z = $this->z; + $pk->evid = 1003; + $pk->data = 0; + ServerAPI::request()->api->player->broadcastPacket($players, $pk); + return true; + } +} diff --git a/src/material/block/nonfull/DarkOakFenceGateBlock.php b/src/material/block/nonfull/DarkOakFenceGateBlock.php new file mode 100644 index 00000000..94f21070 --- /dev/null +++ b/src/material/block/nonfull/DarkOakFenceGateBlock.php @@ -0,0 +1,44 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 3, + 1 => 0, + 2 => 1, + 3 => 2, + ); + $this->meta = $faces[$player->entity->getDirection()] & 0x03; + $this->level->setBlock($block, $this, true, false, true); + return true; + } + public function getDrops(Item $item, Player $player){ + return array( + array($this->id, 0, 1), + ); + } + public function onActivate(Item $item, Player $player){ + $this->meta ^= 0x04; + $this->level->setBlock($this, $this, true, false, true); + $players = ServerAPI::request()->api->player->getAll($this->level); + unset($players[$player->CID]); + $pk = new LevelEventPacket; + $pk->x = $this->x; + $pk->y = $this->y; + $pk->z = $this->z; + $pk->evid = 1003; + $pk->data = 0; + ServerAPI::request()->api->player->broadcastPacket($players, $pk); + return true; + } +} diff --git a/src/material/block/nonfull/FenceBlock.php b/src/material/block/nonfull/FenceBlock.php index 50e1d6cc..f38f7bf1 100644 --- a/src/material/block/nonfull/FenceBlock.php +++ b/src/material/block/nonfull/FenceBlock.php @@ -1,8 +1,17 @@ "Oak Fence", + 1 => "Spruce Fence", + 2 => "Birch Fence", + 3 => "Jungle Fence", + 4 => "Acacia Fence", + 5 => "Dark Oak Fence" + ]; + $this->name = $names[$this->meta & 0x07]; $this->isFullBlock = false; $this->hardness = 15; } diff --git a/src/material/block/nonfull/JungleFenceGateBlock.php b/src/material/block/nonfull/JungleFenceGateBlock.php new file mode 100644 index 00000000..28b346d4 --- /dev/null +++ b/src/material/block/nonfull/JungleFenceGateBlock.php @@ -0,0 +1,44 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 3, + 1 => 0, + 2 => 1, + 3 => 2, + ); + $this->meta = $faces[$player->entity->getDirection()] & 0x03; + $this->level->setBlock($block, $this, true, false, true); + return true; + } + public function getDrops(Item $item, Player $player){ + return array( + array($this->id, 0, 1), + ); + } + public function onActivate(Item $item, Player $player){ + $this->meta ^= 0x04; + $this->level->setBlock($this, $this, true, false, true); + $players = ServerAPI::request()->api->player->getAll($this->level); + unset($players[$player->CID]); + $pk = new LevelEventPacket; + $pk->x = $this->x; + $pk->y = $this->y; + $pk->z = $this->z; + $pk->evid = 1003; + $pk->data = 0; + ServerAPI::request()->api->player->broadcastPacket($players, $pk); + return true; + } +} diff --git a/src/material/block/nonfull/SpruceFenceGateBlock.php b/src/material/block/nonfull/SpruceFenceGateBlock.php new file mode 100644 index 00000000..2b7f6720 --- /dev/null +++ b/src/material/block/nonfull/SpruceFenceGateBlock.php @@ -0,0 +1,44 @@ +isActivable = true; + if(($this->meta & 0x04) === 0x04){ + $this->isFullBlock = true; + }else{ + $this->isFullBlock = false; + } + $this->hardness = 15; + } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 3, + 1 => 0, + 2 => 1, + 3 => 2, + ); + $this->meta = $faces[$player->entity->getDirection()] & 0x03; + $this->level->setBlock($block, $this, true, false, true); + return true; + } + public function getDrops(Item $item, Player $player){ + return array( + array($this->id, 0, 1), + ); + } + public function onActivate(Item $item, Player $player){ + $this->meta ^= 0x04; + $this->level->setBlock($this, $this, true, false, true); + $players = ServerAPI::request()->api->player->getAll($this->level); + unset($players[$player->CID]); + $pk = new LevelEventPacket; + $pk->x = $this->x; + $pk->y = $this->y; + $pk->z = $this->z; + $pk->evid = 1003; + $pk->data = 0; + ServerAPI::request()->api->player->broadcastPacket($players, $pk); + return true; + } +} diff --git a/src/recipes/CraftingRecipes.php b/src/recipes/CraftingRecipes.php index 666719f9..3dad0cd4 100644 --- a/src/recipes/CraftingRecipes.php +++ b/src/recipes/CraftingRecipes.php @@ -92,8 +92,18 @@ class CraftingRecipes{ //Building "WOOL:?x3,WOODEN_PLANKS:?x3=>BED:0x1", "WOODEN_PLANKS:?x8=>CHEST:0x1", - "STICK:?x6=>FENCE:0x2", - "STICK:?x4,WOODEN_PLANKS:?x2=>FENCE_GATE:0x1", + "STICK:?x2,WOODEN_PLANKS:0x4=>FENCE:0x3", + "STICK:?x2,WOODEN_PLANKS:1x4=>FENCE:1x3", + "STICK:?x2,WOODEN_PLANKS:2x4=>FENCE:2x3", + "STICK:?x2,WOODEN_PLANKS:3x4=>FENCE:3x3", + "STICK:?x2,WOODEN_PLANKS:4x4=>FENCE:4x3", + "STICK:?x2,WOODEN_PLANKS:5x4=>FENCE:5x3", + "STICK:?x4,WOODEN_PLANKS:0x2=>FENCE_GATE:0x1", + "STICK:?x4,WOODEN_PLANKS:1x2=>SPRUCE_FENCE_GATE:0x1", + "STICK:?x4,WOODEN_PLANKS:2x2=>BIRCH_FENCE_GATE:0x1", + "STICK:?x4,WOODEN_PLANKS:3x2=>JUNGLE_FENCE_GATE:0x1", + "STICK:?x4,WOODEN_PLANKS:4x2=>ACACIA_FENCE_GATE:0x1", + "STICK:?x4,WOODEN_PLANKS:5x2=>DARK_OAK_FENCE_GATE:0x1", "COBBLESTONE:?x8=>FURNACE:0x1", "GLASS:?x6=>GLASS_PANE:0x16", "STICK:?x7=>LADDER:0x2", diff --git a/src/recipes/FuelData.php b/src/recipes/FuelData.php index e0c61bab..e476cdbc 100644 --- a/src/recipes/FuelData.php +++ b/src/recipes/FuelData.php @@ -16,6 +16,11 @@ class FuelData{ STICK => 5, FENCE => 15, FENCE_GATE => 15, + SPRUCE_FENCE_GATE => 15, + BIRCH_FENCE_GATE => 15, + JUNGLE_FENCE_GATE => 15, + ACACIA_FENCE_GATE => 15, + DARK_OAK_FENCE_GATE => 15, WOODEN_STAIRS => 15, SPRUCE_WOOD_STAIRS => 15, BIRCH_WOOD_STAIRS => 15, From 6a59c31cd0631f3a1b7f7a1f36983dbef8951654 Mon Sep 17 00:00:00 2001 From: FreeHij Date: Sun, 8 Oct 2023 18:25:10 +0300 Subject: [PATCH 8/9] fix --- src/material/Block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/material/Block.php b/src/material/Block.php index 466e9f3b..c502cb78 100755 --- a/src/material/Block.php +++ b/src/material/Block.php @@ -155,7 +155,7 @@ abstract class Block extends Position{ BIRCH_FENCE_GATE => "BirchFenceGateBlock", JUNGLE_FENCE_GATE => "JungleFenceGateBlock", ACACIA_FENCE_GATE => "AcaciaFenceGateBlock", - DARK_OAK_FENCE_GATE => "DarkOakFenceGate" + DARK_OAK_FENCE_GATE => "DarkOakFenceGateBlock" ); protected $id; protected $meta; From 910b04c7529c7756da3d1a8bb36a4e8d9cc7040c Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Tue, 28 Nov 2023 03:39:56 +0300 Subject: [PATCH 9/9] emojis are taken from nc discord --- src/PocketMinecraftServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 03c36eb9..86a371d2 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -225,7 +225,7 @@ class PocketMinecraftServer{ "url" => $url, "data" => [ "username" => $name, - "content" => $this->extraprops->get("discord-ru-smiles") ? str_replace("@", " ", str_replace("Ы", "<:ru_cool:960113011383738369>", str_replace("Ь", "<:ru_cry:960112920346390548>", str_replace("Ъ", "<:ru_happy:960112868601237504>", $msg)))) : str_replace("@", "", $msg) + "content" => $this->extraprops->get("discord-ru-smiles") ? str_replace("@", " ", str_replace("Ы", "<:imp_cool:1151085500396998719>", str_replace("Ь", "<:imp_badphp5:1151085478410457120>", str_replace("Ъ", "<:imp_gudjava:1151085431962742784>", str_replace("Ё", "<:imp_wut:1151085524241621012>", $msg))))) : str_replace("@", "", $msg) ], ], null); }