Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesa Generator Bug #306

Open
FikzyyCraft opened this issue Sep 3, 2023 · 1 comment
Open

Mesa Generator Bug #306

FikzyyCraft opened this issue Sep 3, 2023 · 1 comment

Comments

@FikzyyCraft
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

System information (please complete the following information):

  • OS: [e.g. linux]
  • PHP Version: [e.g. 8.0]
  • MultiWorld Version: [e.g. dev#142, Release 1.7.0-beta2]

Additional context
Add any other context about the problem here.

@FikzyyCraft
Copy link
Author

PocketMine-MP Crash Dump Sun Sep 3 01:39:16 CDT 2023

PocketMine-MP version: 5.4.3 [Protocol 594]
Git commit: e852a4382116705d7558fd808f1b388666b0c0cb
PHP version: 8.1.22
OS: Linux, linux

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: MultiWorld

Thread: AsyncWorker#0
Error: Object of class pocketmine\block\utils\DyeColor could not be converted to int
File: plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/ground/MesaGroundGenerator
Line: 145
Type: ErrorException
Backtrace:
#0 /home/container/plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/ground/MesaGroundGenerator(145): pocketmine\errorhandler\ErrorToExceptionHandler::handle(int 8, string[77] Object of class pocketmine\block\utils\DyeColor could not be converted to int, string[151] phar:///home/container/plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworl, int 145)
#1 /home/container/plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/ground/MesaGroundGenerator(136): czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\ground\MesaGroundGenerator->setColoredGroundLayer(object pocketmine\world\SimpleChunkManager#169966, int -3844, int 52, int 4398, object pocketmine\block\utils\DyeColor#84)
#2 /home/container/plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/overworld/OverworldGenerator(162): czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\ground\MesaGroundGenerator->generateTerrainColumn(object pocketmine\world\SimpleChunkManager#169966, object pocketmine\utils\Random#154283, int -3844, int 4398, int 37, float 1.6619248229235)
#3 /home/container/plugins/MultiWorld_dev-286.phar/src/czechpmdevs/multiworld/libs/muqsit/vanillagenerator/generator/VanillaGenerator(67): czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\overworld\OverworldGenerator->generateChunkData(object pocketmine\world\SimpleChunkManager#169966, int -241, int 274, object czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\VanillaBiomeGrid#169790)
#4 pmsrc/src/world/generator/PopulationTask(122): czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\VanillaGenerator->generateChunk(object pocketmine\world\SimpleChunkManager#169966, int -241, int 274)
#5 pmsrc/src/world/generator/PopulationTask(99): pocketmine\world\generator\PopulationTask::setOrGenerateChunk(object pocketmine\world\SimpleChunkManager#169966, object czechpmdevs\multiworld\libs\muqsit\vanillagenerator\generator\overworld\OverworldGenerator#154126, int -241, int 274, null)
#6 pmsrc/src/scheduler/AsyncTask(82): pocketmine\world\generator\PopulationTask->onRun()
#7 (): pocketmine\scheduler\AsyncTask->run()

Code:
[136] $this->setColoredGroundLayer($world, $x, $y, $z, $color);
[137] }
[138] }
[139] }
[140] }
[141] }
[142] }
[143]
[144] private function setColoredGroundLayer(ChunkManager $world, int $x, int $y, int $z, DyeColor $color) : void{
[145] $world->setBlockAt($x, $y, $z, $color >= 0 ? VanillaBlocks::STAINED_CLAY()->setColor($color) : VanillaBlocks::HARDENED_CLAY());
[146] }
[147]
[148] private function setRandomLayerColor(Random $random, int $minLayerCount, int $minLayerHeight, DyeColor $color) : void{
[149] for($i = 0; $i < $random->nextBoundedInt(4) + $minLayerCount; ++$i){
[150] $j = $random->nextBoundedInt(count($this->colorLayer));
[151] $k = 0;
[152] while($k < $random->nextBoundedInt(3) + $minLayerHeight && $j < count($this->colorLayer)){
[153] $this->colorLayer[$j++] = $color;
[154] ++$k;
[155] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant