mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
WATER_BUCKET, LAVA_BUCKET, MILK_BUCKET
This commit is contained in:
parent
c049278a6d
commit
992f54c696
3 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue