BetterGen
BetterGen copied to clipboard
Chest data packs folder not being created
[22:21:23] [Asynchronous Worker #1 thread/CRITICAL]: ErrorException: "file_get_contents(/root/pm02/plugins/BetterGen/resources/loots/mineshaft.json): failed to open stream: No such file or directory" (EXCEPTION) in "BetterGen-master/src/Ad5001/BetterGen/loot/LootTable" at line 71
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #0 (): pocketmine\error_handler(integer 2, string file_get_contents(/root/pm02/plugins/BetterGen/resources/loots/mineshaft.json): failed to open stream: No such file or directory, string /root/pm02/plugins/BetterGen-master/src/Ad5001/BetterGen/loot/LootTable.php, integer 71, array Array())
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #1 BetterGen-master/src/Ad5001/BetterGen/loot/LootTable(71): file_get_contents(string /root/pm02/plugins/BetterGen/resources/loots/mineshaft.json)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #2 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(173): Ad5001\BetterGen\loot\LootTable::buildLootTable(pocketmine\math\Vector3 object, integer 2, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #3 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(332): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 321, integer 38, integer 209, integer 1, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #4 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(135): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 323, integer 38, integer 209, integer 0, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #5 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(135): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 317, integer 38, integer 209, integer 0, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #6 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(345): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 312, integer 38, integer 209, integer 0, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #7 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(335): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 310, integer 34, integer 209, integer 2, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #8 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(329): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 310, integer 34, integer 206, integer 0, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #9 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(176): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 307, integer 34, integer 206, integer 1, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #10 BetterGen-master/src/Ad5001/BetterGen/populator/MineshaftPopulator(69): Ad5001\BetterGen\populator\MineshaftPopulator->generateMineshaftPart(integer 313, integer 34, integer 206, integer 1, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #11 BetterGen-master/src/Ad5001/BetterGen/generator/BetterNormal(392): Ad5001\BetterGen\populator\MineshaftPopulator->populate(pocketmine\level\SimpleChunkManager object, integer 19, integer 13, pocketmine\utils\Random object)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #12 src/pocketmine/level/generator/PopulationTask(109): Ad5001\BetterGen\generator\BetterNormal->populateChunk(integer 19, integer 13)
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #13 src/pocketmine/scheduler/AsyncTask(67): pocketmine\level\generator\PopulationTask->onRun()
[22:21:23] [Asynchronous Worker #1 thread/DEBUG]: #14 (): pocketmine\scheduler\AsyncTask->run()
[22:21:23] [Server thread/CRITICAL]: Could not execute asynchronous task PopulationTask: Task crashed
Have you tried on the latest version of master? This should be fixed
@Ad5001 I confirm, there is a mistake .I'm using the latest version of master. Fix please.
@ad5001 I'll submit a PR to fix this. The problem is: It's looking for the /plugins/BetterGen/resources/loots/mineshaft.json file. Currently, the plug-in simply does not generate ANY loots files. This can be solved by manually creating the files and directories then copying and pasting the contenst from this repo to the new files, or through a code change.
Still working on this. Heads up: There's built in functions for getting DataFolder instead of PlugiNFolder.
Note that on async thread, you cannot call pluins method
No? it seems to be working in my modified fix...
It depends if you generated a new world or used the debug command. The debug command is called on the main thread whereas the other ones in the generator is called in the Async one.
I'll try both when I get a chance
Is there anything I can do to help? I'm running pocketmine-mp 1.7dev build 717 (in a docker container), and would love to have a functional custom generator. The rolling hills are getting a bit old. ;)
@skinlayers The best way you could help the project if you aren't a developer is by both/either testing the unstable branch (helps us testing new features) and spreading the word around you about this project :)
I'm primarily server admin (day job) who knows bash and python, but I also know a little bit of PHP, Java, and Ruby. But "unstable" branch do you mean the "loottables" branch or "master"?
master mainly. Loottable is mainly inactive