mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
carried_grass & carried_leaves
This commit is contained in:
parent
e992aa4aff
commit
72dc07458c
4 changed files with 26 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
8
src/material/block/CarriedGrassBlock.php
Normal file
8
src/material/block/CarriedGrassBlock.php
Normal 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");
|
||||
}
|
||||
}
|
||||
8
src/material/block/CarriedLeavesBlock.php
Normal file
8
src/material/block/CarriedLeavesBlock.php
Normal 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");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue