removed Java + cleanup

This commit is contained in:
GameHerobrine 2023-11-12 04:12:35 +03:00
parent d43f9173d5
commit f00df9cc43
3 changed files with 13 additions and 68 deletions

View file

@ -29,25 +29,20 @@ abstract class Structure{
return isset($this->mapSymToID[$sym]) ? $this->mapSymToID[$sym] : Structure::MAP_NO_KEY;
}
protected function placeBlock($level, $sym, &$tv){
//console("@@@");
protected function placeBlock($level, $sym, $tv){
if($level instanceof Level){
$idm = $this->getMappingFor($sym);
if(!isset($idm[1])) $idm[1] = 0;
//var_dump($idm);
if($idm === Structure::MAP_NO_KEY){
//console("Failed to receive id");
return false;
}
$block = $this->api->block->get($idm[0], $idm[1], $tv); //TODO: meta
//console($block);
$block = $this->api->block->get($idm[0], $idm[1], $tv);
$level->setBlock($tv, $block, true, false, true);
}
}
public function build($level, $centerX, $centerY, $centerZ){
//console("b");
$tempVector = new Vector3(0,0,0);
$x = $centerX - $this->radius;
$z = $centerZ - $this->radius;
@ -55,7 +50,6 @@ abstract class Structure{
foreach($blocksXZ as $blocks){
foreach(str_split($blocks) as $block){
$tempVector->setXYZ($x, $centerY + $offsetY, $z);
//console("6#&_+7$:373-");
$this->placeBlock($level, $block, $tempVector);
++$x;
}