mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
cleanup
This commit is contained in:
parent
6d430c3440
commit
b84093e4ce
25 changed files with 48 additions and 163 deletions
|
|
@ -47,7 +47,7 @@ class RailLogic
|
|||
if($logic != null && $this->connectsTo($logic)){
|
||||
$this->railPositions[$ind] = new Vector3($logic->x, $logic->y, $logic->z);
|
||||
}else{
|
||||
unset($this->railPositions[$ind--]); //TODO check?
|
||||
unset($this->railPositions[$ind--]);
|
||||
$this->railPositions = array_values($this->railPositions); //reindexing
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,6 @@ class RailLogic
|
|||
}
|
||||
|
||||
public function canConnectTo(RailLogic $rail){
|
||||
//return this.isRailChunkPositionCorrect(par1BlockBaseRailLogic) ? true : (this.railChunkPosition.size() == 2 ? false : (this.railChunkPosition.isEmpty() ? true : true));
|
||||
return $this->connectsTo($rail) ? true : (count($this->railPositions) == 2 ? false : (empty($this->railPositions) ? true : true));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Utils{
|
|||
return $angle < 0 ? $angle + 360 : $angle - 180;
|
||||
}
|
||||
public static function getSign($v){
|
||||
return $v > 0 ? 1 : ($v < 0 ? -1 : 0);
|
||||
return $v <=> 0;
|
||||
}
|
||||
|
||||
public static function clampDegrees($v){
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
//TODO remove at all
|
||||
class VersionString{
|
||||
|
||||
private $development = false;
|
||||
|
||||
public function __construct($version = MAJOR_VERSION){
|
||||
$this->development = Utils::endsWith($version, "dev");
|
||||
}
|
||||
|
||||
public function isDev(){
|
||||
return $this->development === true;
|
||||
}
|
||||
|
||||
public function __toString(){
|
||||
return MAJOR_VERSION;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue