diff --git a/src/material/item/generic/Bucket.php b/src/material/item/generic/Bucket.php index 8aceb3f2..e100d713 100644 --- a/src/material/item/generic/Bucket.php +++ b/src/material/item/generic/Bucket.php @@ -37,19 +37,25 @@ class BucketItem extends Item{ if($this->meta === AIR){ if($target instanceof LiquidBlock){ $level->setBlock($target, new AirBlock()); - $this->meta = ($target instanceof WaterBlock) ? WATER:LAVA; + if(($player->gamemode & 0x01) === 0){ + $this->meta = ($target instanceof WaterBlock) ? WATER:LAVA; + } return true; } }elseif($this->meta === WATER){ if($block->getID() === AIR){ $level->setBlock($block, new StillWaterBLock()); - $this->meta = 0; + if(($player->gamemode & 0x01) === 0){ + $this->meta = 0; + } return true; } }elseif($this->meta === LAVA){ if($block->getID() === AIR){ $level->setBlock($block, new StillLavaBlock()); - $this->meta = 0; + if(($player->gamemode & 0x01) === 0){ + $this->meta = 0; + } return true; } } diff --git a/src/material/item/generic/SpawnEgg.php b/src/material/item/generic/SpawnEgg.php index 16faebad..41b91496 100644 --- a/src/material/item/generic/SpawnEgg.php +++ b/src/material/item/generic/SpawnEgg.php @@ -45,7 +45,9 @@ class SpawnEggItem extends Item{ ); $e = ServerAPI::request()->api->entity->add($block->level, ENTITY_MOB, $this->meta, $data); ServerAPI::request()->api->entity->spawnToAll($e); - --$this->count; + if(($player->gamemode & 0x01) === 0){ + --$this->count; + } return true; break; } diff --git a/src/world/Entity.php b/src/world/Entity.php index b2091601..bad89c4c 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -530,6 +530,10 @@ class Entity extends Position{ 17 => array("type" => 6, "value" => array(0, 0, 0)), ); if($this->class === ENTITY_MOB and $this->type === MOB_SHEEP){ + if(!isset($this->data["Sheared"])){ + $this->data["Sheared"] = 0; + $this->data["Color"] = mt_rand(0,15); + } $d[16]["value"] = (($this->data["Sheared"] == 1 ? 1:0) << 5) | ($this->data["Color"] & 0x0F); } return $d;