carried_grass & carried_leaves

This commit is contained in:
GameHerobrine 2026-08-14 16:45:59 +08:00 • committed by yefengeeeeeeeeeee
parent e992aa4aff
commit 72dc07458c
4 changed files with 26 additions and 0 deletions

View file

@ -860,6 +860,12 @@ class BlockAPI{
public static function convertHighItemIdsToOldItemIds(int $protocolId, int $itemId, int $metaData = 0) : int{ //TODO Id metadata
if ($protocolId >= ProtocolInfo12::CURRENT_PROTOCOL_11) {
if($itemId === LEAVES_CARRIED || $itemId === GRASS_CARRIED){
return match ($itemId){
LEAVES_CARRIED => LEAVES,
GRASS_CARRIED => GRASS,
};
}
return $itemId;
}

View file

@ -175,4 +175,8 @@ define("NETHER_REACTOR", 247);
define("INFO_UPDATE", 248);
define("INFO_UPDATE2", 249);
//0.2 - 0.7: 253 & 254
define("GRASS_CARRIED", 253);
define("LEAVES_CARRIED", 254);
define("RESERVED6", 255);

View file

@ -0,0 +1,8 @@
<?php
//TODO 0.7 - 0.9
class CarriedGrassBlock extends SolidBlock{
public static $blockID;
public function __construct($meta = 0){
parent::__construct(GRASS_CARRIED, $meta, "Carried Grass");
}
}

View file

@ -0,0 +1,8 @@
<?php
class CarriedLeavesBlock extends SolidBlock{
public static $blockID;
public function __construct($meta = 0){
parent::__construct(LEAVES_CARRIED, $meta, "Carried Leaves");
}
}