mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
clicking on spawner with egg will change a mob there
This commit is contained in:
parent
60fd866de6
commit
ea3babff02
7 changed files with 23 additions and 3 deletions
|
|
@ -5,7 +5,16 @@ class MonsterSpawnerBlock extends SolidBlock{
|
|||
parent::__construct(MONSTER_SPAWNER, $meta, "Monster Spawner");
|
||||
$this->hardness = 5;
|
||||
}
|
||||
|
||||
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
parent::place($item, $player, $block, $target, $face, $fx, $fy, $fz);
|
||||
ServerAPI::request()->api->tile->add($this->level, TILE_MOB_SPAWNER, $this->x, $this->y, $this->z, [
|
||||
"EntityId" => 0,
|
||||
"id" => TILE_MOB_SPAWNER,
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
"z" => $this->z,
|
||||
]);
|
||||
}
|
||||
public function getDrops(Item $item, Player $player){
|
||||
return [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue