Hello! I just modified an OreGenerator plugin. The plugin will generate a random ore block above Glowing Obsidian with 1 second delay. The problem is, when I place or destroy a block beside the generated ore block, the plugin will regenerate another ore block. Also there were no errors in the console. Is there any solution? Any help would be very appreciated! WARNING: Don't talk about the in_array() unless it's the cause! I know that it returns boolean and the most impotant thing is that it worked on randomizing the ore block generating chance. NOTE: Video for illustration is available here (tell me if the link don't work) and plugin source code is available below.
Well, I've fixed it using this: PHP: $x = $this->block->getX();$y = $this->block->getY();$z = $this->block->getZ();$upblock = $$this->block->getLevel()->getBlock(new Vector3($x, $y, $z));if ($upblock instanceof Air) $this->block->getLevel()->setBlock($this->block, $newBlock, true, false); Thanks for your help!