From 27671134216b6ec67dd499e21d14dfec33155079 Mon Sep 17 00:00:00 2001 From: thebigsmileXD Date: Tue, 16 May 2017 12:02:29 +0200 Subject: [PATCH] Fix legal issues --- .gitmodules | 3 --- README.md | 10 ++++++++++ imgs/addon_setup.png | Bin 0 -> 6942 bytes processingLoots.json | 1 - resources/mcpe-default-addon | 1 - src/Ad5001/BetterGen/Main.php | 5 +++-- src/Ad5001/BetterGen/loot/LootTable.php | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 .gitmodules create mode 100644 imgs/addon_setup.png delete mode 100644 processingLoots.json delete mode 160000 resources/mcpe-default-addon diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6fcdd61..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "resources/mcpe-default-addon"] - path = resources/mcpe-default-addon - url = https://github.com/dktapps/mcpe-default-addon.git diff --git a/README.md b/README.md index 3bf6db7..eb4d4d5 100644 --- a/README.md +++ b/README.md @@ -46,4 +46,14 @@ Welcome user to the home of a new PocketMine World Generator which features 9 ne ### These two biomes now are a bit better by the additions of bushes. +----- + +# Notice: + +### To generate loot like in vanilla MCPE, you have to put the default behaviour pack contents of the game into the "addon" folder. +### Due to legal issues we are not able to include these directly into the repository. +### You can get them here: https://aka.ms/behaviorpacktemplate or here https://github.com/dktapps/mcpe-default-addon for an optimised version +### The folder has to look like this: + + All content here is copyrighted (C) Ad5001 2017. Infos about this copyright can be found in the license file. \ No newline at end of file diff --git a/imgs/addon_setup.png b/imgs/addon_setup.png new file mode 100644 index 0000000000000000000000000000000000000000..9073c6c1dee311a2a9cda6b2dc8d2ca51866dca7 GIT binary patch literal 6942 zcmc(E^;=Y5^zMKI%z(hqB7&53cSsB!0z)G(q;w1^-5^LvcT0CS2oe&~f^g1{h1 zO5E{t?|q){fAIZbpZz@VyY|{^pS{*zd!6$hrml#O`xF-d0N^Vt$!VecO>`RqVWOY? zTz35E4(y`z+8qEO82r~TQrQWp&>)V7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bE&WgG_O_@t8%_qV7-~VO%flV(Na#4mJ8|@BL z7xCIP_VFvbRd3i!H@!N#*8UK*dio^i{3*02OJRd&(t+&yjal~asP64#&S2M+Z%v zDFEKf$;&f^N-q5A8m;l;Fqz=$zo@F<7_9r7-fBJGTAb%l2EvPw9wWTd?{c3uSbiqr zLopVa(4h@X3Y{amb0$e(-i$b(%e0JziCPm4>aL(hQ!jL!OOC|I10rfrXkY7l+Z$yT5mRA`)`@p+^!#+*BA}5sD}VIhPMTZ>v1X02APdk&q>5zY-3|20chC~coLfy(!s4UvGXrlk&y+}}Oa zA3Dj8?~;z2td<54V`F1a1sGZR-4}xwfm(c^fzXQ3>}jm9tX5BS5PuJgjyWKSxOhdk z_xkHdP}5+kp%Jzr)z_(1#2t^IWKZq6g-Ud4fYxR-4KS@ zkISD+7J@7FFr;ZjH#D~le|YYB+I4wUL%sLaOW#BcIHdD6tJtc)wpdg&eXWI5yCV&r z+K==I*GX&Kfp-92>$YiZ+T2j-YA8potX$tc|NO3ik*oA^qqWN;HmTUEWisK9{N`qe z>XMd)S>~su zT>Zr39gB0&Nn!IRzN)n>H=?d(xehnC-c7WO|G{*H-?_!4+-~DM4hFYt@_H-FI}fQ7 zkY)UEF>2-)j!99(>SD{}wqNlY$J!}_5=ti^RQ$MOb_lLME-B3R&?u`k z>K1!k^U%;}v-a>f(9?7)J6}}H(D$X>bmMHmY&%y(=XHX5wR+0eOmw>brNDQ4=~HK> zIXZK<`s}%exz++c?VXxvqVB%(Zen{+E`Le>VU!{#S*{HFoZUyBaXPp2=S!=h$>vJX z)sCJyLeisOtherNS()) $this->getLogger()->warning("Tesseract detected. Note that Tesseract is not up to date with the generation structure and some generation features may be limited or not working"); @mkdir($this->getDataFolder()); - if (!in_array($this->getDataFolder() . 'resources\mcpe-default-addon\.', $this->getResources())) $this->getLogger()->alert('The loot files are missing! Make sure you got all files / did git clone --recursive'); + @mkdir($this->getDataFolder() . 'addon'); + if ((($files = @scandir($this->getDataFolder() . 'addon')) && count($files) <= 2)) $this->getLogger()->alert('The loot files are missing, this means no loot will generate! You can get them here: https://aka.ms/behaviorpacktemplate or here https://github.com/dktapps/mcpe-default-addon for an optimised version'); } /** @@ -324,7 +325,7 @@ class Main extends PluginBase implements Listener { if (!$tile instanceof TileChest) return; //Check if lootchest (or already generated loot) if (!isset($tile->namedtag->generateLoot)) return; - $table = new LootTable($config = new Config(self::getInstance()->getDataFolder() . '\\resources\\mcpe-default-addon\\' . $tile->namedtag->generateLoot . '.json')); + $table = new LootTable($config = new Config(self::getInstance()->getDataFolder() . 'addon\\' . $tile->namedtag->generateLoot . '.json', Config::DETECT, [])); $size = $tile->getInventory()->getSize(); $loot = $table->getRandomLoot($random); $items = array_pad($loot, $size, Item::get(0)); diff --git a/src/Ad5001/BetterGen/loot/LootTable.php b/src/Ad5001/BetterGen/loot/LootTable.php index 51bcfbd..c7d94f7 100644 --- a/src/Ad5001/BetterGen/loot/LootTable.php +++ b/src/Ad5001/BetterGen/loot/LootTable.php @@ -56,7 +56,7 @@ class LootTable { $val = $rolls["entries"][$this->getRandomWeightedElement($array)]; //typecheck if ($val["type"] == "loot_table") { - $loottable = new LootTable(new Config(Main::getInstance()->getDataFolder() . '\\resources\\mcpe-default-addon\\' . $val["name"] . ".json")); + $loottable = new LootTable(new Config(Main::getInstance()->getDataFolder() . 'addon\\' . $val["name"] . ".json", Config::DETECT, [])); $items = array_merge($items, $loottable->getRandomLoot($random)); unset($loottable); } elseif ($val["type"] == "item") {