public function standardCuboidOffset($offset, &$x, &$y, &$z) { $lengthX = $this->space->getLengthX(); $lengthY = $this->space->getLengthY(); $lengthZ = $this->space->getLengthZ(); if ($offset < $lengthX * $lengthY * $lengthZ) { $z = $offset % $lengthZ; $offset = (int) ($offset / $lengthZ); $y = $offset % $lengthY; $offset = (int) ($offset / $lengthY); $x = $offset; $x += $this->space->getMinX(); $y += $this->space->getMinY(); $z += $this->space->getMinZ(); return true; } return false; }