From ece939eba7bd7f52ad98065c0afbf489d80f2f7b Mon Sep 17 00:00:00 2001 From: copygirl Date: Wed, 27 Jul 2022 22:02:40 +0200 Subject: [PATCH] Creeper Overhaul creepers drop Reliquary items --- .../server_scripts/entity/creeper_overhaul.js | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 kubejs/server_scripts/entity/creeper_overhaul.js diff --git a/kubejs/server_scripts/entity/creeper_overhaul.js b/kubejs/server_scripts/entity/creeper_overhaul.js new file mode 100644 index 0000000..9c0de53 --- /dev/null +++ b/kubejs/server_scripts/entity/creeper_overhaul.js @@ -0,0 +1,21 @@ +// priority: 0 + +onEvent("lootjs", event => { + let creepers = [ + "jungle", "bamboo", "desert", "badlands", "hills", "savannah", "mushroom", + "swamp", "dripstone", "cave", "dark_oak", "spruce", "beach", "snowy", + ].map(variant => `creeperoverhaul:${variant}_creeper`); + + event.addEntityLootModifier(creepers) + .killedByPlayer() + .customCondition({ "condition": "reliquary:random_chance_looting_severing", + "chance": 0.02, "looting_multiplier": 0.03, "severing_multiplier": 0.1 }) + .addLoot("reliquary:catalyzing_gland"); + + event.addEntityLootModifier(creepers) + .killedByPlayer() + .matchEntity(entity => entity.nbt({ powered: 1 })) + .customCondition({ "condition": "reliquary:random_chance_looting_severing", + "chance": 0.03, "looting_multiplier": 0.05, "severing_multiplier": 0.15 }) + .addLoot("reliquary:eye_of_the_storm"); +});