bad eclipse doesnt want to use tabs

This commit is contained in:
GameHerobrine 2023-01-04 22:47:48 +03:00
parent 3f40c4f9be
commit cba1879947
11 changed files with 58 additions and 58 deletions

View file

@ -71,8 +71,8 @@ class PocketMinecraftServer{
$this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, [ $this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, [
"version" => "5", "version" => "5",
"experemental-mob-features" => true, "experemental-mob-features" => true,
"enable-mob-ai" => false, "enable-mob-ai" => false,
"enable-nether-reactor" => true, "enable-nether-reactor" => true,
"enable-explosions" => true, "enable-explosions" => true,
"enable-rail-connection" => false, "enable-rail-connection" => false,
"save-player-data" => true, "save-player-data" => true,

View file

@ -12,10 +12,10 @@ abstract class Creature extends Living{
$this->inPanic = false; //force for now $this->inPanic = false; //force for now
parent::__construct($level, $eid, $class, $type, $data); parent::__construct($level, $eid, $class, $type, $data);
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 1, "generic"); $this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 1, "generic");
// $this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type)); // $this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type));
$this->ai->addTask(new TaskLookAround()); $this->ai->addTask(new TaskLookAround());
$this->ai->addTask(new TaskRandomWalk()); $this->ai->addTask(new TaskRandomWalk());
$this->ai->addTask(new TaskLookAtPlayer()); $this->ai->addTask(new TaskLookAtPlayer());
} }

View file

@ -1,14 +1,14 @@
<?php <?php
class EntityList{ class EntityList{
public function getEntities(){ public function getEntities(){
return $this->entities; return $this->entities;
} }
public function addEntity(PropertyEntity $property){ public function addEntity(PropertyEntity $property){
$this->entities[$property->getEntityType()] = $property; $this->entities[$property->getEntityType()] = $property;
} }
public function getEntityFromTypeAndClass($type, $class){ public function getEntityFromTypeAndClass($type, $class){
return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0; return isset($this->entities[$type]) && $this->entities[$type]->getEntityClass() === $class ? $this->entities[$type] : 0;
} }
private $entities = []; private $entities = [];
} }

View file

@ -1,21 +1,21 @@
<?php <?php
class PropertyEntity{ class PropertyEntity{
private $class,$type,$name; private $class,$type,$name;
function __construct($class, $type, $name){ function __construct($class, $type, $name){
$this->class = $class; $this->class = $class;
$this->type = $type; $this->type = $type;
$this->name = $name; $this->name = $name;
} }
public function getEntityClass(){ public function getEntityClass(){
return $this->class; return $this->class;
} }
public function getEntityType(){ public function getEntityType(){
return $this->type; return $this->type;
} }
public function getEntityName(){ public function getEntityName(){
return $this->name; return $this->name;
} }
} }

View file

@ -188,7 +188,7 @@ class NetherReactorBlock extends SolidBlock{
foreach($this->core as $yOffset => $layer){ foreach($this->core as $yOffset => $layer){
foreach($layer as $line){ foreach($layer as $line){
foreach(str_split($line) as $char){ foreach(str_split($line) as $char){
$b = $this->level->getBlockWithoutVector(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ)); $b = $this->level->getBlockWithoutVector(new Vector3($x + $offsetX, $y + $yOffset, $z + $offsetZ));
switch($char){ switch($char){
case "G": case "G":
if($b === GOLD_BLOCK){ //TODO make it use structure class if($b === GOLD_BLOCK){ //TODO make it use structure class
@ -196,17 +196,17 @@ class NetherReactorBlock extends SolidBlock{
} }
return false; return false;
case "C": case "C":
if($b === COBBLESTONE){ if($b === COBBLESTONE){
break; break;
} }
return false; return false;
case "R": case "R":
if($b === NETHER_REACTOR){ if($b === NETHER_REACTOR){
break; break;
} }
return false; return false;
case " ": case " ":
if($b->getID() === 0){ if($b->getID() === 0){
break; break;
} }
return false; return false;

View file

@ -20,9 +20,9 @@ abstract class RakNetDataPacket extends stdClass{
public function getBuffer(){ public function getBuffer(){
return $this->buffer; return $this->buffer;
} }
public function getOffset(){ public function getOffset(){
return $this->offset; return $this->offset;
} }
public function setBuffer($buffer = ""){ public function setBuffer($buffer = ""){

View file

@ -1,13 +1,13 @@
<?php <?php
class DummyPlugin implements Plugin{ class DummyPlugin implements Plugin{
public function __construct(ServerAPI $api, $server = false){ public function __construct(ServerAPI $api, $server = false){
} }
public function init(){ public function init(){
} }
public function __destruct(){ public function __destruct(){
} }
} }

View file

@ -1,5 +1,5 @@
<?php <?php
interface OtherPluginRequirement{ interface OtherPluginRequirement{
public function getRequiredPlugins(); public function getRequiredPlugins();
} }

View file

@ -1,10 +1,10 @@
<?php <?php
interface Plugin{ interface Plugin{
public function __construct(ServerAPI $api, $server = false); public function __construct(ServerAPI $api, $server = false);
public function init(); public function init();
//public function __destruct(); useless //public function __destruct(); useless
} }

View file

@ -54,7 +54,7 @@ class Utils{
} }
public static function endsWith($str, $check) { public static function endsWith($str, $check) {
return substr($str, -strlen($check)) === $check; return substr($str, -strlen($check)) === $check;
} }
public static function hasEmoji($s){ public static function hasEmoji($s){
@ -638,7 +638,7 @@ class Utils{
} }
public static function readInt($str){ public static function readInt($str){
if(strlen($str) <= 0) return; if(strlen($str) <= 0) return;
if(PHP_INT_SIZE === 8){ if(PHP_INT_SIZE === 8){
return @unpack("N", $str)[1] << 32 >> 32; return @unpack("N", $str)[1] << 32 >> 32;
}else{ }else{

View file

@ -35,7 +35,7 @@ class SuperflatGenerator implements LevelGenerator{
$this->populators[] = new MineshaftPopulator(isset($this->options["mineshaft"]["chance"]) ? floatval($this->options["mineshaft"]["chance"]) : 0.01); $this->populators[] = new MineshaftPopulator(isset($this->options["mineshaft"]["chance"]) ? floatval($this->options["mineshaft"]["chance"]) : 0.01);
}*/ }*/
} }
public function parsePreset($preset){ public function parsePreset($preset){
$this->preset = $preset; $this->preset = $preset;
$preset = explode(";", $preset); $preset = explode(";", $preset);