Ad5001 / BetterGen

PocketMine's Tomorrow's World Generator. Mirror of
https://git.ad5001.eu/Ad5001/BetterGen
Other
58 stars 27 forks source link

Chest data packs folder not being created #41

Open xinghao2003 opened 6 years ago

xinghao2003 commented 6 years ago
[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
Ad5001 commented 6 years ago

Have you tried on the latest version of master? This should be fixed

ghost commented 6 years ago

@Ad5001 I confirm, there is a mistake .I'm using the latest version of master. Fix please.

AvgZing commented 6 years ago

@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.

AvgZing commented 6 years ago

Still working on this. Heads up: There's built in functions for getting DataFolder instead of PlugiNFolder.

Ad5001 commented 6 years ago

Note that on async thread, you cannot call pluins method

AvgZing commented 6 years ago

No? it seems to be working in my modified fix...

Ad5001 commented 6 years ago

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.

AvgZing commented 6 years ago

I'll try both when I get a chance

skinlayers commented 6 years ago

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. ;)

Ad5001 commented 6 years ago

@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 :)

skinlayers commented 6 years ago

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"?

Ad5001 commented 6 years ago

master mainly. Loottable is mainly inactive