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

Chest data packs folder not being created #41

Open
xinghao2003 opened this issue Jan 29, 2018 · 12 comments
Open

Chest data packs folder not being created #41

xinghao2003 opened this issue Jan 29, 2018 · 12 comments

Comments

@xinghao2003
Copy link

xinghao2003 commented Jan 29, 2018

[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
Copy link
Owner

Ad5001 commented Jan 29, 2018

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

@ghost
Copy link

ghost commented Jan 29, 2018

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

@AvgZing
Copy link

AvgZing commented Jan 29, 2018

@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
Copy link

AvgZing commented Feb 16, 2018

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

@Ad5001
Copy link
Owner

Ad5001 commented Feb 16, 2018

Note that on async thread, you cannot call pluins method

@AvgZing
Copy link

AvgZing commented Feb 16, 2018

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

@Ad5001
Copy link
Owner

Ad5001 commented Feb 16, 2018

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
Copy link

AvgZing commented Feb 16, 2018

I'll try both when I get a chance

@skinlayers
Copy link

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
Copy link
Owner

Ad5001 commented Feb 17, 2018

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

@Ad5001 Ad5001 changed the title Issue : file_get_contents(/root/pm02/plugins/BetterGen/resources/loots/mineshaft.json): failed to open stream: No such file or directory Chest data packs folder not being created Feb 17, 2018
@skinlayers
Copy link

skinlayers commented Feb 18, 2018

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
Copy link
Owner

Ad5001 commented Feb 18, 2018

master mainly. Loottable is mainly inactive

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

4 participants