mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Weird Painting spawn (WiP)
This commit is contained in:
parent
0be3379720
commit
1c05455514
8 changed files with 103 additions and 10 deletions
|
|
@ -194,11 +194,12 @@ class BlockAPI{
|
|||
for($count = $stack; $count > 0; ){
|
||||
$data["stack"] = min(64, $count);
|
||||
$count -= $data["stack"];
|
||||
$e = $this->server->api->entity->add(ENTITY_ITEM, $block, $data);
|
||||
$server = ServerAPI::request();
|
||||
$e = $server->api->entity->add(ENTITY_ITEM, $block, $data);
|
||||
//$e->speedX = mt_rand(-10, 10) / 100;
|
||||
//$e->speedY = mt_rand(0, 5) / 100;
|
||||
//$e->speedZ = mt_rand(-10, 10) / 100;
|
||||
$this->server->api->entity->spawnToAll($e->eid);
|
||||
$server->api->entity->spawnToAll($e->eid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -262,6 +263,10 @@ class BlockAPI{
|
|||
if($block->y > 127 or $block->y < 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
if($item->isActivable === true and $item->onActivate($this, $player, $block, $target, $face, $fx, $fy, $fz)){
|
||||
return $this->cancelAction($block);
|
||||
}
|
||||
|
||||
if($item->isPlaceable()){
|
||||
$hand = $item->getBlock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue