diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index c07f0640..f7527a47 100755 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -240,6 +240,10 @@ class BlockAPI{ } if(defined(strtoupper($b[0]))){ + $explodedString = explode(":", constant(strtoupper($b[0]))); + if(count($explodedString) == 2){ + $meta = (int) $explodedString[1]; + } $item = BlockAPI::getItem(constant(strtoupper($b[0])), $meta); if($item->getID() === AIR and strtoupper($b[0]) !== "AIR"){ $item = BlockAPI::getItem(((int) $b[0]) & 0xFFFF, $meta); diff --git a/src/constants/ItemIDs.php b/src/constants/ItemIDs.php index da594060..517c2632 100755 --- a/src/constants/ItemIDs.php +++ b/src/constants/ItemIDs.php @@ -101,7 +101,9 @@ define("GOLDEN_APPLE", 322); define("SIGN", 323); define("WOODEN_DOOR", 324); 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); diff --git a/src/material/item/generic/Bucket.php b/src/material/item/generic/Bucket.php index fb77a1b0..ce34a40d 100644 --- a/src/material/item/generic/Bucket.php +++ b/src/material/item/generic/Bucket.php @@ -31,7 +31,7 @@ class BucketItem extends Item{ if($target instanceof LiquidBlock){ $level->setBlock($target, new AirBlock(), true, false, true); if(($player->gamemode & 0x01) === 0){ - $this->meta = ($target instanceof WaterBlock) ? WATER:LAVA; + $this->meta = ($target instanceof WaterBlock) ? WATER : LAVA; } return true; }