mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Added camera entity (why?)
This commit is contained in:
parent
291ff42920
commit
bdf7a88999
3 changed files with 19 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ class Painting extends Hanging{
|
|||
[PAINTING, 0, 1]
|
||||
];
|
||||
}
|
||||
|
||||
public function spawn($player){
|
||||
$pk = new AddPaintingPacket;
|
||||
$pk->eid = $this->eid;
|
||||
|
|
|
|||
18
src/entity/object/TripodCamera.php
Normal file
18
src/entity/object/TripodCamera.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
class TripodCamera extends Entity{
|
||||
const TYPE = OBJECT_TRIPOD_CAMERA;
|
||||
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->setHealth(PHP_INT_MAX, "generic");
|
||||
}
|
||||
|
||||
public function interactWith(Entity $e, $action){
|
||||
if($e->isPlayer() and $action === InteractPacket::ACTION_HOLD){
|
||||
//todo
|
||||
$this->server->schedule(40, [$this, "close"]);
|
||||
}
|
||||
parent::interactWith($e, $action);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue