From 5b7641af3de197a971ffbe8cbd39e95ec7ddd33c Mon Sep 17 00:00:00 2001 From: ArkQuark <74979909+ArkQuark@users.noreply.github.com> Date: Mon, 20 Feb 2023 21:53:13 +0300 Subject: [PATCH] Fixing join message, updating IDs --- src/Player.php | 3 ++- src/constants/BlockIDs.php | 21 +++++++++++++++++---- src/constants/EntityIDs.php | 5 +++++ src/constants/GeneralConstants.php | 4 ++-- src/constants/ItemIDs.php | 5 +++++ 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/src/Player.php b/src/Player.php index 237922ea..95e32a43 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1470,6 +1470,7 @@ class Player{ $this->server->api->player->spawnToAllPlayers($this); $this->server->api->entity->spawnAll($this); $this->server->api->entity->spawnToAll($this->entity); + $this->server->api->chat->broadcast($this->username." joined the game."); $this->server->schedule(5, [$this->entity, "update"], [], true); $this->server->schedule(2, [$this->entity, "updateMovement"], [], true); @@ -1481,7 +1482,7 @@ class Player{ $this->sendInventory(); $this->sendSettings(); - $this->server->schedule(50, [$this, "orderChunks"], []); + //$this->server->schedule(50, [$this, "orderChunks"], []); $this->blocked = false; $this->server->handle("player.spawn", $this); diff --git a/src/constants/BlockIDs.php b/src/constants/BlockIDs.php index 4cd937e9..69207149 100755 --- a/src/constants/BlockIDs.php +++ b/src/constants/BlockIDs.php @@ -61,7 +61,7 @@ define("MOSSY_STONE", 48); define("OBSIDIAN", 49); define("TORCH", 50); define("FIRE", 51); - +define("MONSTER_SPAWNER", 52); define("WOOD_STAIRS", 53); define("WOODEN_STAIRS", 53); define("OAK_WOOD_STAIRS", 53); @@ -119,7 +119,8 @@ define("TRAPDOOR", 96); define("STONE_BRICKS", 98); define("STONE_BRICK", 98); - +define("HUGE_BROWN_MUSHROOM", 99); +define("HUGE_RED_MUSHROOM", 100); define("IRON_BAR", 101); define("IRON_BARS", 101); define("GLASS_PANE", 102); @@ -131,14 +132,21 @@ define("MELON_STEM", 105); define("FENCE_GATE", 107); define("BRICK_STAIRS", 108); define("STONE_BRICK_STAIRS", 109); - +define("MYCELIUM", 110); +define("LILY_PAD", 111); define("NETHER_BRICKS", 112); define("NETHER_BRICK_BLOCK", 112); define("NETHER_BRICKS_STAIRS", 114); -define("SANDSTONE_STAIRS", 128); +define("END_PORTAL_FRAME", 120); +define("END_STONE", 121); +define("COCOA", 127); +define("SANDSTONE_STAIRS", 128); +define("EMERALD_ORE", 129); + +define("EMERALD_BLOCK", 133); define("SPRUCE_WOOD_STAIRS", 134); define("SPRUCE_WOODEN_STAIRS", 134); define("BIRCH_WOOD_STAIRS", 135); @@ -163,12 +171,17 @@ define("WOOD_SLAB", 158); define("WOODEN_SLAB", 158); define("WOOD_SLABS", 158); define("WOODEN_SLABS", 158); +define("STAINED_CLAY", 159); + +define("ACACIA_WOOD_STAIRS", 163); +define("DARK_OAK_WOOD_STAIRS", 164); define("HAY_BALE", 170); define("CARPET", 171); define("COAL_BLOCK", 173); +define("PODZOL", 243); define("BEETROOT_BLOCK", 244); define("STONECUTTER", 245); define("GLOWING_OBSIDIAN", 246); diff --git a/src/constants/EntityIDs.php b/src/constants/EntityIDs.php index 8fe38eb2..747451bd 100644 --- a/src/constants/EntityIDs.php +++ b/src/constants/EntityIDs.php @@ -8,12 +8,17 @@ define("ENTITY_MOB", 2); define("MOB_COW", 11); define("MOB_PIG", 12); define("MOB_SHEEP", 13); + define("MOB_WOLF", 14); + define("MOB_VILLAGER", 15); define("MOB_ZOMBIE", 32); define("MOB_CREEPER", 33); define("MOB_SKELETON", 34); define("MOB_SPIDER", 35); define("MOB_PIGMAN", 36); + define("MOB_SLIME", 37); + define("MOB_ENDERMAN", 38); + define("MOB_SILVERFISH", 39); define("ENTITY_OBJECT", 3); define("OBJECT_TRIPOD_CAMERA", 62); diff --git a/src/constants/GeneralConstants.php b/src/constants/GeneralConstants.php index 3fca022a..d2994a52 100644 --- a/src/constants/GeneralConstants.php +++ b/src/constants/GeneralConstants.php @@ -11,11 +11,11 @@ define("VIEWER", 3); define("SPECTATOR", 3); //Players -define("MAX_CHUNK_RATE", 20 / arg("max-chunks-per-second", 4)); //Default rate ~256 kB/s +define("MAX_CHUNK_RATE", 20 / arg("max-chunks-per-second", 4)); define("PLAYER_MAX_QUEUE", 1024); define("PLAYER_SURVIVAL_SLOTS", 36); -define("PLAYER_CREATIVE_SLOTS", 112); +define("PLAYER_CREATIVE_SLOTS", 112); //hum? //Block Updates define("BLOCK_UPDATE_NORMAL", 1); diff --git a/src/constants/ItemIDs.php b/src/constants/ItemIDs.php index 3ed7025f..3462d8c6 100755 --- a/src/constants/ItemIDs.php +++ b/src/constants/ItemIDs.php @@ -85,6 +85,7 @@ define("BUCKET", 325); define("WATER_BUCKET", "325:8"); define("LAVA_BUCKET", "325:10"); define("MILK_BUCKET", "325:1"); + define("MINECART", 328); define("SADDLE", 329); define("IRON_DOOR", 330); @@ -109,12 +110,16 @@ define("COMPASS", 345); define("CLOCK", 347); define("GLOWSTONE_DUST", 348); + define("DYE", 351); define("BONE", 352); define("SUGAR", 353); define("CAKE", 354); define("BED", 355); +define("COOKIE", 357); +define("COOKIES", 357); + define("SHEARS", 359); define("MELON", 360); define("MELON_SLICE", 360);