Fixing join message, updating IDs

This commit is contained in:
ArkQuark 2023-02-20 21:53:13 +03:00
parent 44e0109580
commit 5b7641af3d
5 changed files with 31 additions and 7 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);