123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- /*
- ----TODO----
- Haltbarkeit der Werkzeuge reduzieren
- */
- msg("dev", "§bMineday §rwurde geladen.");
- event.load("inv-click");
- event.load("entity-hurt");
- event.load("block-click");
- event.load("block-break");
- event.load("block-place");
- setVar("honeyhead", read.item("{id:'minecraft:skull',Count:1b,tag:{SkullOwner:{Id:'04182810-16ad-4491-ab70-ba4244488e7e',Properties:{textures:[0:{Value:'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMThjMmNkZGVlZDYyNGE1MzhmMzQ5ZDhjNzAzNWZlZjkxOGU2ZDdhMTc4MTYzMWVhYzUxZWMxODI3MTJhNTRkYSJ9fX0='}]}},display:{Name:'Honey Pot'}},Damage:3s}"));
- setVar("applehead", read.item("{id:'minecraft:skull',Count:1b,tag:{SkullOwner:{Id:'ad04b162-ae44-4e40-8c5b-9271cb3a40d6',Properties:{textures:[0:{Value:'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvY2JiMzExZjNiYTFjMDdjM2QxMTQ3Y2QyMTBkODFmZTExZmQ4YWU5ZTNkYjIxMmEwZmE3NDg5NDZjMzYzMyJ9fX0='}]}},display:{Name:'Apple'}},Damage:3s}"));
- setVar("appletemplate", read.location("rpg:-55:23:-550"));
- setVar("honeytemplate", read.location("rpg:-54:23:-550"));
- setVar("resetbuttonloc", read.location("rpg:-56:23:-550"));
- setVar("woolloc1", read.location("rpg:-72:24:-566"));
- setVar("copper", read.customitem("COPPER_COIN", 1));
- setVar("silver", read.customitem("SILVER_COIN", 1));
- setVar("gold", read.customitem("GOLD_COIN", 1));
- list.new("coins");
- list.add($coins, $copper);
- list.add($coins, $copper);
- list.add($coins, $copper);
- list.add($coins, $silver);
- list.add($coins, $silver);
- list.add($coins, $silver);
- list.add($coins, $gold);
- list.add($coins, $gold);
- list.add($coins, $gold);
- list.add($coins, $copper);
- list.add($coins, $copper);
- list.add($coins, $copper);
- list.add($coins, $silver);
- list.add($coins, $silver);
- list.add($coins, $silver);
- list.add($coins, $gold);
- list.add($coins, $gold);
- list.add($coins, $gold);
- list.new("text");
- list.add($text, "§r1 Kupfer einzahlen");
- list.add($text, "§r8 Kupfer einzahlen");
- list.add($text, "§r64 Kupfer einzahlen");
- list.add($text, "§r1 Silber einzahlen");
- list.add($text, "§r8 Silber einzahlen");
- list.add($text, "§r64 Silber einzahlen");
- list.add($text, "§r1 Gold einzahlen");
- list.add($text, "§r8 Gold einzahlen");
- list.add($text, "§r64 Gold einzahlen");
- list.add($text, "§r1 Kupfer abheben");
- list.add($text, "§r8 Kupfer abheben");
- list.add($text, "§r64 Kupfer abheben");
- list.add($text, "§r1 Silber abheben");
- list.add($text, "§r8 Silber abheben");
- list.add($text, "§r64 Silber abheben");
- list.add($text, "§r1 Gold abheben");
- list.add($text, "§r8 Gold abheben");
- list.add($text, "§r64 Gold abheben");
- list.new("amounts");
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- list.add($amounts, 1);
- list.add($amounts, 8);
- list.add($amounts, 64);
- inv.new("bankmenu", 18, "Bank");
- setVar("i", -1);
- while(less(inc("i"), list.getSize($text))) {
- setVar("temp", list.getIndex($coins, $i));
- item.setName($temp, list.getIndex($text, $i));
- item.setAmount($temp, list.getIndex($amounts, $i));
- inv.setItem($bankmenu, $i, $temp);
- }
- removeVar("temp");
- setVar("copper", read.customitem("COPPER_COIN", 1));
- setVar("silver", read.customitem("SILVER_COIN", 1));
- setVar("gold", read.customitem("GOLD_COIN", 1));
- list.new("flowerlocs");
- list.add($flowerlocs, read.location("rpg:-70:23:-565"));
- list.add($flowerlocs, read.location("rpg:-71:23:-565"));
- list.new("mushroomlocs");
- list.add($mushroomlocs, read.location("rpg:-77:23:-555"));
- list.add($mushroomlocs, read.location("rpg:-78:23:-555"));
- list.new("ironorelocs");
- list.add($ironorelocs, read.location("rpg:-79:23:-565"));
- list.add($ironorelocs, read.location("rpg:-79:23:-564"));
- list.add($ironorelocs, read.location("rpg:-79:24:-564"));
- list.add($ironorelocs, read.location("rpg:-60:23:-559"));
- list.add($ironorelocs, read.location("rpg:-60:23:-560"));
- list.new("grasslocs");
- list.add($grasslocs, read.location("rpg:-77:23:-560"));
- list.add($grasslocs, read.location("rpg:-77:23:-562"));
- list.add($grasslocs, read.location("rpg:-75:23:-564"));
- list.add($grasslocs, read.location("rpg:-72:23:-565"));
- list.add($grasslocs, read.location("rpg:-70:23:-566"));
- list.add($grasslocs, read.location("rpg:-70:23:-571"));
- list.add($grasslocs, read.location("rpg:-71:23:-572"));
- list.add($grasslocs, read.location("rpg:-72:23:-573"));
- list.add($grasslocs, read.location("rpg:-59:23:-564"));
- list.add($grasslocs, read.location("rpg:-58:23:-563"));
- list.add($grasslocs, read.location("rpg:-57:23:-562"));
- list.add($grasslocs, read.location("rpg:-56:23:-561"));
- list.add($grasslocs, read.location("rpg:-56:23:-560"));
- set.new("farmedappletrees");
- set.new("farmedhoneytrees");
- list.new("appletreelocs");
- list.add($appletreelocs, read.location("rpg:-68:24:-572"));
- list.new("applelocs0");
- list.add($applelocs0, read.location("rpg:-67:26:-573"));
- list.add($applelocs0, read.location("rpg:-67:26:-571"));
- list.add($applelocs0, read.location("rpg:-69:26:-571"));
- list.add($applelocs0, read.location("rpg:-69:26:-573"));
- list.new("honeytreelocs");
- list.add($honeytreelocs, read.location("rpg:-72:24:-574"));
- list.new("honeylocs0");
- list.add($honeylocs0, read.location("rpg:-71:26:-573"));
- list.add($honeylocs0, read.location("rpg:-73:26:-573"));
- list.add($honeylocs0, read.location("rpg:-71:26:-575"));
- list.add($honeylocs0, read.location("rpg:-73:26:-575"));
- list.new("mine0");
- list.add($mine0, read.location("rpg:-62:23:-569"));
- list.add($mine0, read.location("rpg:-61:23:-569"));
- list.add($mine0, read.location("rpg:-63:23:-570"));
- list.add($mine0, read.location("rpg:-62:23:-570"));
- list.add($mine0, read.location("rpg:-61:23:-570"));
- list.add($mine0, read.location("rpg:-60:23:-570"));
- list.add($mine0, read.location("rpg:-64:23:-571"));
- list.add($mine0, read.location("rpg:-63:23:-571"));
- list.add($mine0, read.location("rpg:-62:23:-571"));
- list.add($mine0, read.location("rpg:-61:23:-571"));
- list.add($mine0, read.location("rpg:-60:23:-571"));
- list.add($mine0, read.location("rpg:-59:23:-571"));
- list.add($mine0, read.location("rpg:-63:23:-572"));
- list.add($mine0, read.location("rpg:-62:23:-572"));
- list.add($mine0, read.location("rpg:-61:23:-572"));
- list.add($mine0, read.location("rpg:-60:23:-572"));
- list.add($mine0, read.location("rpg:-61:23:-573"));
- list.add($mine0, read.location("rpg:-62:24:-569"));
- list.add($mine0, read.location("rpg:-61:24:-569"));
- list.add($mine0, read.location("rpg:-63:24:-570"));
- list.add($mine0, read.location("rpg:-62:24:-570"));
- list.add($mine0, read.location("rpg:-61:24:-570"));
- list.add($mine0, read.location("rpg:-60:24:-570"));
- list.add($mine0, read.location("rpg:-64:24:-571"));
- list.add($mine0, read.location("rpg:-63:24:-571"));
- list.add($mine0, read.location("rpg:-62:24:-571"));
- list.add($mine0, read.location("rpg:-61:24:-571"));
- list.add($mine0, read.location("rpg:-60:24:-571"));
- list.add($mine0, read.location("rpg:-59:24:-571"));
- list.add($mine0, read.location("rpg:-63:24:-572"));
- list.add($mine0, read.location("rpg:-62:24:-572"));
- list.add($mine0, read.location("rpg:-61:24:-572"));
- list.add($mine0, read.location("rpg:-60:24:-572"));
- list.add($mine0, read.location("rpg:-61:24:-573"));
- list.new("oaktreelocs");
- list.add($oaktreelocs, read.location("rpg:-77:23:-571"));
- list.new("oaktree");
- list.add($oaktree, "0:0:0");
- list.add($oaktree, "0:1:0");
- list.add($oaktree, "0:2:0");
- list.add($oaktree, "0:3:0");
- list.add($oaktree, "0:3:0");
- list.add($oaktree, "0:4:0");
- list.add($oaktree, "0:5:0");
- list.add($oaktree, "1:3:0");
- list.add($oaktree, "0:3:1");
- list.add($oaktree, "1:3:1");
- list.add($oaktree, "-1:3:0");
- list.add($oaktree, "-1:3:1");
- list.add($oaktree, "1:3:-1");
- list.add($oaktree, "0:3:-1");
- list.add($oaktree, "-1:3:-1");
- list.add($oaktree, "2:3:0");
- list.add($oaktree, "2:3:1");
- list.add($oaktree, "2:3:2");
- list.add($oaktree, "1:3:2");
- list.add($oaktree, "0:3:2");
- list.add($oaktree, "-1:3:2");
- //list.add($oaktree, "-2:3:2");
- list.add($oaktree, "-2:3:1");
- list.add($oaktree, "-2:3:0");
- list.add($oaktree, "-2:3:-1");
- list.add($oaktree, "-2:3:-2");
- list.add($oaktree, "-1:3:-2");
- list.add($oaktree, "0:3:-2");
- list.add($oaktree, "1:3:-2");
- //list.add($oaktree, "2:3:-2");
- list.add($oaktree, "2:3:-1");
- list.add($oaktree, "1:4:0");
- list.add($oaktree, "0:4:1");
- list.add($oaktree, "1:4:1");
- list.add($oaktree, "-1:4:0");
- list.add($oaktree, "-1:4:1");
- list.add($oaktree, "1:4:-1");
- list.add($oaktree, "0:4:-1");
- list.add($oaktree, "-1:4:-1");
- list.add($oaktree, "2:4:0");
- list.add($oaktree, "2:4:1");
- //list.add($oaktree, "2:4:2");
- list.add($oaktree, "1:4:2");
- list.add($oaktree, "0:4:2");
- list.add($oaktree, "-1:4:2");
- //list.add($oaktree, "-2:4:2");
- list.add($oaktree, "-2:4:1");
- list.add($oaktree, "-2:4:0");
- list.add($oaktree, "-2:4:-1");
- //list.add($oaktree, "-2:4:-2");
- list.add($oaktree, "-1:4:-2");
- list.add($oaktree, "0:4:-2");
- list.add($oaktree, "1:4:-2");
- //list.add($oaktree, "2:4:-2");
- list.add($oaktree, "2:4:-1");
- list.add($oaktree, "1:5:0");
- list.add($oaktree, "0:5:1");
- list.add($oaktree, "1:5:1");
- list.add($oaktree, "-1:5:0");
- list.add($oaktree, "-1:5:1");
- list.add($oaktree, "1:5:-1");
- list.add($oaktree, "0:5:-1");
- list.add($oaktree, "-1:5:-1");
- list.add($oaktree, "0:6:0");
- list.add($oaktree, "0:6:1");
- list.add($oaktree, "1:6:0");
- list.add($oaktree, "-1:6:0");
- list.add($oaktree, "0:6:-1");
- sgoto(12000, "farmwool");
- @wait
- wait();
- if(notequal(loc.getCoord($player-loc, "w"), "rpg")) goto ("wait");
- if(equal($event, "block-break")) goto("break");
- if(equal($event, "block-place")) goto("place");
- if(equal($event, "block-click")) goto("blockclick");
- if(equal($event, "entity-hurt")) goto("entityhurt");
- if(and(equal($event, "inv-click"), equal($inv-type, "CHEST"))) goto ("invclick");
- goto("wait");
- @farmwool
- setVar("amount", block.getItemAmount($woolloc1, true, read.item("WOOL")));
- if(less($amount, 32)) block.addItem($woolloc1, read.item("WOOL"));
- removeVar("amount");
- sgoto(12000, "farmwool");
- goto("wait");
- @allow
- setVar("cancel", false);
- goto("wait");
- @invclick
- setVar("cancel", true);
- if(equal($inv-id, 1)) {
- if(or(equal($inv-slot, 0), equal($inv-slot, 1), equal($inv-slot, 2))) goto("copperin");
- if(or(equal($inv-slot, 3), equal($inv-slot, 4), equal($inv-slot, 5))) goto("silverin");
- if(or(equal($inv-slot, 6), equal($inv-slot, 7), equal($inv-slot, 8))) goto("goldin");
- if(or(equal($inv-slot, 9), equal($inv-slot, 10), equal($inv-slot, 11))) goto("copperout");
- if(or(equal($inv-slot, 12), equal($inv-slot, 13), equal($inv-slot, 14))) goto("silverout");
- if(or(equal($inv-slot, 15), equal($inv-slot, 16), equal($inv-slot, 17))) goto("goldout");
- }
- goto("wait");
- @copperin
- setVar("gvar", "coppercoins");
- setVar("münze", $copper);
- setVar("wort", "Kupfermünzen");
- goto("payin");
- @silverin
- setVar("gvar", "silvercoins");
- setVar("münze", $silver);
- setVar("wort", "Silbermünzen");
- goto("payin");
- @goldin
- setVar("gvar", "goldcoins");
- setVar("münze", $gold);
- setVar("wort", "Goldmünzen");
- goto("payin");
- @payin
- if(equal(ggv($player-name, $gvar), null)) sgv($player-name, $gvar, 0);
- if(or(equal($inv-slot, 0), equal($inv-slot, 3), equal($inv-slot, 6))) {
- setVar("amount", 1);
- goto("payincore");
- }
- if(or(equal($inv-slot, 1), equal($inv-slot, 4), equal($inv-slot, 7))) {
- setVar("amount", 8);
- goto("payincore");
- }
- if(or(equal($inv-slot, 2), equal($inv-slot, 5), equal($inv-slot, 8))) {
- setVar("amount", 64);
- goto("payincore");
- }
- goto("wait");
- @payincore
- if(greaterequal(player.getItemAmount($player, false, $münze), $amount)) {
- sgv($player-name, $gvar, add(ggv($player-name, $gvar), $amount));
- item.setAmount($münze, $amount);
- player.removeItem($player, $münze);
- goto("wait");
- }
- player.speak($player, "§6Bänker", "§rDu hast nicht genug ", $wort, " im Inventar.");
- goto("wait");
- @copperout
- setVar("gvar", "coppercoins");
- setVar("münze", $copper);
- setVar("wort", "Kupfermünzen");
- goto("payout");
- @silverout
- setVar("gvar", "silvercoins");
- setVar("münze", $silver);
- setVar("wort", "Silbermünzen");
- goto("payout");
- @goldout
- setVar("gvar", "goldcoins");
- setVar("münze", $gold);
- setVar("wort", "Goldmünzen");
- goto("payout");
- @payout
- if(equal(ggv($player-name, $gvar), null)) sgv($player-name, $gvar, 0);
- if(or(equal($inv-slot, 9), equal($inv-slot, 12), equal($inv-slot, 15))) {
- setVar("amount", 1);
- goto("payoutcore");
- }
- if(or(equal($inv-slot, 10), equal($inv-slot, 13), equal($inv-slot, 16))) {
- setVar("amount", 8);
- goto("payoutcore");
- }
- if(or(equal($inv-slot, 11), equal($inv-slot, 14), equal($inv-slot, 17))) {
- setVar("amount", 64);
- goto("payoutcore");
- }
- goto("wait");
- @payoutcore
- if(greaterequal(ggv($player-name, $gvar), $amount)) {
- sgv($player-name, $gvar, sub(ggv($player-name, $gvar), $amount));
- item.setAmount($münze, $amount);
- player.giveItem($player, $münze);
- goto("wait");
- }
- player.speak($player, "§6Bänker", "§rDu hast nicht genug ", $wort, " auf der Bank.");
- goto("wait");
- @entityhurt
- if(and(equal($entity-type, "VILLAGER"), equal($entity-name, "Bänker"))) {
- inv.open($bankmenu, $player);
- }
- goto("wait");
- @blockclick
- if(equal($block-loc, $resetbuttonloc)) goto("resetall");
- if(list.contains($appletreelocs, $block-loc)) {
- if(invert(set.contains($farmedappletrees, $block-loc))) {
- msg($player, "§8*schüttel*");
- if(equal(math.random(0, 3), 0)) {
- item.drop(loc.mod($block-loc, 1, 0, 1), read.item("APPLE"));
- item.drop(loc.mod($block-loc, -1, 0, -1), read.item("APPLE"));
- item.drop(loc.mod($block-loc, -1, 0, 1), read.item("APPLE"));
- item.drop(loc.mod($block-loc, 1, 0, -1), read.item("APPLE"));
- setVar("list", getVar(concat("applelocs", list.getIndexOf($appletreelocs, $block-loc))));
- setVar("i", -1);
- while(less(inc("i"), list.getSize($list))) {
- block.set(list.getIndex($list, $i), read.item("AIR"));
- }
- removeVar("list");
- set.add($farmedappletrees, $block-loc);
- msg($player, "§a*Äpfel geerntet*");
- }
- }
- goto("wait");
- }
- if(list.contains($honeytreelocs, $block-loc)) {
- if(invert(set.contains($farmedhoneytrees, $block-loc))) {
- msg($player, "§8*schüttel*");
- if(equal(math.random(0, 3), 0)) {
- item.drop(loc.mod($block-loc, 1, 0, 1), $honeyhead);
- item.drop(loc.mod($block-loc, -1, 0, -1), $honeyhead);
- item.drop(loc.mod($block-loc, -1, 0, 1), $honeyhead);
- item.drop(loc.mod($block-loc, 1, 0, -1), $honeyhead);
- setVar("list", getVar(concat("honeylocs", list.getIndexOf($honeytreelocs, $block-loc))));
- setVar("i", -1);
- while(less(inc("i"), list.getSize($list))) {
- block.set(list.getIndex($list, $i), read.item("AIR"));
- }
- removeVar("list");
- set.add($farmedhoneytrees, $block-loc);
- msg($player, "§a*Honig geerntet*");
- }
- }
- goto("wait");
- }
- goto("wait");
- @break
- setVar("cancel", true);
- if(list.contains($grasslocs, $block-loc)) {
- setVar("cancel", false);
- if(equal(math.random(0, 9), 0)) {
- item.drop(loc.mod($block-loc, 1, 0, 1), read.item("STRING"));
- }
- goto("wait");
- }
- if(list.contains($flowerlocs, $block-loc)) {
- setVar("cancel", false);
- }
- if(list.contains($mushroomlocs, $block-loc)) {
- setVar("cancel", false);
- }
- if(list.contains($mine0, $block-loc)) {
- setVar("cancel", false);
- }
- if(list.contains($ironorelocs, $block-loc)) {
- setVar("cancel", false);
- }
- if(equal($block-type, "CARROT")) {
- if(equal($block-data, 7)) {
- if(equal(item.getType(entity.getEquip($player, "hand")), "WOOD_HOE")) goto("allow");
- if(equal(item.getType(entity.getEquip($player, "hand")), "STONE_HOE")) goto("allow");
- if(equal(item.getType(entity.getEquip($player, "hand")), "GOLD_HOE")) goto("allow");
- if(equal(item.getType(entity.getEquip($player, "hand")), "IRON_HOE")) goto("allow");
- if(equal(item.getType(entity.getEquip($player, "hand")), "DIAMOND_HOE")) goto("allow");
- }
- goto("wait");
- }
- if(equal($block-type, "LOG")) {
- if(notequal(item.getType(entity.getEquip($player, "hand")), "WOOD_AXE")) {
- if(notequal(item.getType(entity.getEquip($player, "hand")), "STONE_AXE")) {
- if(notequal(item.getType(entity.getEquip($player, "hand")), "GOLD_AXE")) {
- if(notequal(item.getType(entity.getEquip($player, "hand")), "IRON_AXE")) {
- if(notequal(item.getType(entity.getEquip($player, "hand")), "DIAMOND_AXE")) goto("wait");
- }
- }
- }
- }
- if(list.contains($oaktreelocs, $block-loc)) {
- item.drop($block-loc, read.item("LOG:0:6"));
- block.set($block-loc, read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 1, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 2, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 3, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 4, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 5, 0), read.item("AIR"));
- }
- if(list.contains($oaktreelocs, loc.mod($block-loc, 0, -1, 0))) {
- item.drop(loc.mod($block-loc, 0, -1, 0), read.item("LOG:0:6"));
- block.set($block-loc, read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 1, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 2, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 3, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 4, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, -1, 0), read.item("AIR"));
- }
- if(list.contains($oaktreelocs, loc.mod($block-loc, 0, -2, 0))) {
- item.drop(loc.mod($block-loc, 0, -2, 0), read.item("LOG:0:6"));
- block.set($block-loc, read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 1, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 2, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, 3, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, -1, 0), read.item("AIR"));
- block.set(loc.mod($block-loc, 0, -2, 0), read.item("AIR"));
- }
- }
- goto("wait");
- @place
- setVar("cancel", true);
- goto("wait");
- @resetall
- sgoto(1, "oaktreereset");
- sgoto(1, "applereset");
- sgoto(1, "honeyreset");
- sgoto(1, "grassreset");
- sgoto(1, "ironorereset");
- sgoto(1, "flowerreset");
- sgoto(1, "minereset");
- sgoto(1, "mushroomreset");
- goto("wait");
- @oaktreereset
- setVar("x", -1);
- while(less(inc("x"), list.getSize($oaktreelocs))) {
- setVar("treeloc", list.getIndex($oaktreelocs, $x));
- setVar("block", "LOG");
- setVar("i", -1);
- while(less(inc("i"), list.getSize($oaktree))) {
- if(equal($i, 7 )) setVar("block", "LEAVES");
- split("splitlist", ":", list.getIndex($oaktree, $i));
- setVar("tempx", list.getIndex($splitlist, 0));
- setVar("tempy", list.getIndex($splitlist, 1));
- setVar("tempz", list.getIndex($splitlist, 2));
- block.set(loc.mod($treeloc, $tempx, $tempy, $tempz), read.item($block));
- }
- }
- removeVar("splitlist");
- removeVar("tempx");
- removeVar("tempy");
- removeVar("tempz");
- goto("wait");
- @applereset
- setVar("h", -1);
- while(less(inc("h"), list.getSize($appletreelocs))) {
- setVar("list", getVar(concat("applelocs", $h)));
- setVar("i", -1);
- while(less(inc("i"), list.getSize($list))) {
- block.clone($appletemplate, list.getIndex($list, $i));
- }
- }
- removeVar("list");
- set.new("farmedappletrees");
- goto("wait");
- @honeyreset
- setVar("h", -1);
- while(less(inc("h"), list.getSize($honeytreelocs))) {
- setVar("list", getVar(concat("honeylocs", $h)));
- setVar("i", -1);
- while(less(inc("i"), list.getSize($list))) {
- block.clone($honeytemplate, list.getIndex($list, $i));
- }
- }
- removeVar("list");
- set.new("farmedhoneytrees");
- goto("wait");
- @flowerreset
- setVar("i", -1);
- while(less(inc("i"), list.getSize($flowerlocs))) {
- if(equal(math.random(0, 1), 0)) {
- block.set(list.getIndex($flowerlocs, $i), read.item("RED_ROSE"));
- } else() {
- block.set(list.getIndex($flowerlocs, $i), read.item("YELLOW_FLOWER"));
- }
- }
- goto("wait");
- @grassreset
- setVar("i", -1);
- while(less(inc("i"), list.getSize($grasslocs))) {
- block.set(list.getIndex($grasslocs, $i), read.item("LONG_GRASS:1"));
- }
- goto("wait");
- @mushroomreset
- setVar("i", -1);
- while(less(inc("i"), list.getSize($mushroomlocs))) {
- if(equal(math.random(0, 1), 0)) {
- block.set(list.getIndex($mushroomlocs, $i), read.item("BROWN_MUSHROOM"));
- } else() {
- block.set(list.getIndex($mushroomlocs, $i), read.item("RED_MUSHROOM"));
- }
- }
- goto("wait");
- @ironorereset
- setVar("i", -1);
- while(less(inc("i"), list.getSize($ironorelocs))) {
- block.set(list.getIndex($ironorelocs, $i, 0), read.item("IRON_ORE"));
- }
- goto("wait");
- @minereset
- setVar("i", -1);
- while(less(inc("i"), list.getSize($mine0))) {
- if(equal(math.random(0, 14), 0)) {
- block.set(list.getIndex($mine0, $i), read.item("COAL_ORE"));
- } else() {
- if(equal(math.random(0, 29), 0)) {
- block.set(list.getIndex($mine0, $i), read.item("IRON_ORE"));
- } else() {
- block.set(list.getIndex($mine0, $i), read.item("STONE"));
- }
- }
- }
- goto("wait");
|