made REQUEST_CHUNK_PACKET useful(experemental chunk loading system), reactor can be disabled in properties(for some reason it didnt work before)

This commit is contained in:
GameHerobrine 2022-08-13 17:35:38 +03:00
parent 5982e379e7
commit fc8111c152
3 changed files with 25 additions and 4 deletions

View file

@ -9,7 +9,7 @@ class NetherReactorBlock extends SolidBlock{
public function onActivate(Item $item, Player $player){
//if(($item->getID() === IRON_SWORD || $item->getID() === WOODEN_SWORD || $item->getID() === STONE_SWORD || $item->getID() === DIAMOND_SWORD || $item->getID() === GOLD_SWORD) /*&& $player->gamemode === 0*/){
if($this->isCorrect($this->getX(),$this->getY(),$this->getZ()) && $this->getY() < 101){
if($this->isCorrect($this->getX(),$this->getY(),$this->getZ()) && $this->getY() < 101 && NetherReactorBlock::$enableReactor){
NetherReactorStructure::buildReactor($this->level, $this->getX(),$this->getY(),$this->getZ());
$this->meta = 1;
$this->level->setBlock($this,$this);