mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
syntax xd
This commit is contained in:
parent
58626eeb95
commit
84dd0b82b3
5 changed files with 20 additions and 20 deletions
|
|
@ -24,9 +24,9 @@ class RailLogic
|
|||
public function getRail($v){
|
||||
if(($b = $this->level->getBlock($v)) instanceof RailBaseBlock){
|
||||
return new RailLogic($b);
|
||||
}else if(($b = $this->level->getBlockWithoutVector($v->x, $v->y + 1, $v->z)) instanceof RailBaseBlock){
|
||||
}elseif(($b = $this->level->getBlockWithoutVector($v->x, $v->y + 1, $v->z)) instanceof RailBaseBlock){
|
||||
return new RailLogic($b);
|
||||
}else if(($b = $this->level->getBlockWithoutVector($v->x, $v->y - 1, $v->z)) instanceof RailBaseBlock){
|
||||
}elseif(($b = $this->level->getBlockWithoutVector($v->x, $v->y - 1, $v->z)) instanceof RailBaseBlock){
|
||||
return new RailLogic($b);
|
||||
}
|
||||
|
||||
|
|
@ -113,10 +113,10 @@ class RailLogic
|
|||
if($state === 0){
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x, $this->y + 1, $this->z - 1)) $state = 4;
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x, $this->y + 1, $this->z + 1)) $state = 5;
|
||||
}else if($state === 1){
|
||||
}elseif($state === 1){
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x + 1, $this->y + 1, $this->z)) $state = 2;
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x - 1, $this->y + 1, $this->z)) $state = 3;
|
||||
}else if($state < 0) $state = 0;
|
||||
}elseif($state < 0) $state = 0;
|
||||
|
||||
$this->updateConnections($state);
|
||||
$meta = $state;
|
||||
|
|
@ -173,10 +173,10 @@ class RailLogic
|
|||
if($state == 0){
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x, $this->y + 1, $this->z - 1)) $state = 4;
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x, $this->y + 1, $this->z + 1)) $state = 5;
|
||||
}else if($state == 1){
|
||||
}elseif($state == 1){
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x + 1, $this->y + 1, $this->z)) $state = 2;
|
||||
if(RailBaseBlock::isRailBlock($this->level, $this->x - 1, $this->y + 1, $this->z)) $state = 3;
|
||||
}else if($state < 0) $state = 0;
|
||||
}elseif($state < 0) $state = 0;
|
||||
|
||||
$meta = $state;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue