mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
Moar
This commit is contained in:
parent
1206cbf993
commit
fccca5827f
@ -20,7 +20,77 @@
|
||||
*/
|
||||
|
||||
abstract class Entity extends Position{
|
||||
|
||||
private static $entityCount = 1;
|
||||
private $id;
|
||||
|
||||
//public $passenger = null;
|
||||
//public $vehicle = null;
|
||||
|
||||
public $lastX;
|
||||
public $lastY;
|
||||
public $lastZ;
|
||||
public $velocity;
|
||||
public $yaw;
|
||||
public $pitch;
|
||||
public $lastYaw;
|
||||
public $lastPitch;
|
||||
//public $boundingBox;
|
||||
public $onGround;
|
||||
public $positionChanged;
|
||||
public $velocityChanged;
|
||||
public $dead;
|
||||
public $height;
|
||||
public $width;
|
||||
public $length;
|
||||
public $fallDistance;
|
||||
public $ticksLived;
|
||||
public $maxFireTicks;
|
||||
public $fireTicks;
|
||||
protected $inWater;
|
||||
public $noDamageTicks;
|
||||
private $justCreated;
|
||||
protected $fireProof;
|
||||
private $invulnerable;
|
||||
|
||||
|
||||
public function __construct(Level $level){
|
||||
$this->id = Entity::$entityCount++;
|
||||
$this->justCreated = true;
|
||||
$this->level = $level;
|
||||
}
|
||||
|
||||
public function getPosition(){
|
||||
return new Position($this->x, $this->y, $this->z, $this->level);
|
||||
}
|
||||
|
||||
public function setVelocity(Vector3 $velocity){
|
||||
$this->velocity = clone $velocity;
|
||||
}
|
||||
|
||||
public function getVelocity(){
|
||||
return clone $this->velocity;
|
||||
}
|
||||
|
||||
public function isOnGround(){
|
||||
return $this->onGround === true;
|
||||
}
|
||||
|
||||
public function getLevel(){
|
||||
return $this->level;
|
||||
}
|
||||
|
||||
public function teleport(Position $pos){
|
||||
|
||||
}
|
||||
|
||||
public function equals($object){
|
||||
return $object instanceof Entity ? $object->getID() === $this->id : false;
|
||||
}
|
||||
|
||||
public function getID(){
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/***REM_START***/
|
||||
@ -29,6 +99,7 @@ require_once("entity/ProjectileSourceEntity.php");
|
||||
require_once("entity/RideableEntity.php");
|
||||
require_once("entity/AttachableEntity.php");
|
||||
require_once("entity/ExplosiveEntity.php");
|
||||
require_once("entity/ColorableEntity.php");
|
||||
|
||||
require_once("entity/LivingEntity.php");
|
||||
require_once("entity/CreatureEntity.php");
|
||||
|
24
src/entity/ColorableEntity.php
Normal file
24
src/entity/ColorableEntity.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
interface ColorableEntity{
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user