From a06855bf63628d3b59bfbc0016cdff9d4345865d Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Fri, 11 Feb 2022 10:46:41 -0600 Subject: [PATCH] Tweaks to Ender Cores --- .../loot_tables/entities/enderman.json | 31 +++ .../gameplay/piglin_bartering.json | 245 ++++++++++++++++++ .../HarmoniousEngineering/recipes/powah.js | 2 - 3 files changed, 276 insertions(+), 2 deletions(-) create mode 100644 kubejs/data/minecraft/loot_tables/entities/enderman.json create mode 100644 kubejs/data/minecraft/loot_tables/gameplay/piglin_bartering.json diff --git a/kubejs/data/minecraft/loot_tables/entities/enderman.json b/kubejs/data/minecraft/loot_tables/entities/enderman.json new file mode 100644 index 0000000..db8420c --- /dev/null +++ b/kubejs/data/minecraft/loot_tables/entities/enderman.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1.0, + "max": 2.0, + "type": "minecraft:uniform" + } + }, + { + "function": "minecraft:looting_enchant", + "count": { + "min": 0.0, + "max": 1.0 + } + } + ], + "name": "minecraft:ender_pearl" + } + ] + } + ] +} diff --git a/kubejs/data/minecraft/loot_tables/gameplay/piglin_bartering.json b/kubejs/data/minecraft/loot_tables/gameplay/piglin_bartering.json new file mode 100644 index 0000000..0b671be --- /dev/null +++ b/kubejs/data/minecraft/loot_tables/gameplay/piglin_bartering.json @@ -0,0 +1,245 @@ +{ + "type": "minecraft:barter", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "weight": 5, + "functions": [ + { + "function": "minecraft:enchant_randomly", + "enchantments": ["minecraft:soul_speed"] + } + ], + "name": "minecraft:book" + }, + { + "type": "minecraft:item", + "weight": 8, + "functions": [ + { + "function": "minecraft:enchant_randomly", + "enchantments": ["minecraft:soul_speed"] + } + ], + "name": "minecraft:iron_boots" + }, + { + "type": "minecraft:item", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_nbt", + "tag": "{Potion:\"minecraft:fire_resistance\"}" + } + ], + "name": "minecraft:potion" + }, + { + "type": "minecraft:item", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_nbt", + "tag": "{Potion:\"minecraft:fire_resistance\"}" + } + ], + "name": "minecraft:splash_potion" + }, + { + "type": "minecraft:item", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_nbt", + "tag": "{Potion:\"minecraft:water\"}" + } + ], + "name": "minecraft:potion" + }, + { + "type": "minecraft:item", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 10.0, + "max": 36.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:iron_nugget" + }, + { + "type": "minecraft:item", + "weight": 10, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2.0, + "max": 4.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:ender_pearl" + }, + { + "type": "minecraft:item", + "weight": 20, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 3.0, + "max": 9.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:string" + }, + { + "type": "minecraft:item", + "weight": 20, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 5.0, + "max": 12.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:quartz" + }, + { + "type": "minecraft:item", + "weight": 40, + "name": "minecraft:obsidian" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1.0, + "max": 3.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:crying_obsidian" + }, + { + "type": "minecraft:item", + "weight": 40, + "name": "minecraft:fire_charge" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2.0, + "max": 4.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:leather" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2.0, + "max": 8.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:soul_sand" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2.0, + "max": 8.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:nether_brick" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 6.0, + "max": 12.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:spectral_arrow" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 8.0, + "max": 16.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:gravel" + }, + { + "type": "minecraft:item", + "weight": 40, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 8.0, + "max": 16.0, + "type": "minecraft:uniform" + } + } + ], + "name": "minecraft:blackstone" + }, + { + "type": "minecraft:item", + "weight": 10, + "name": "powah:ender_core" + } + ] + } + ] +} diff --git a/kubejs/server_scripts/HarmoniousEngineering/recipes/powah.js b/kubejs/server_scripts/HarmoniousEngineering/recipes/powah.js index bf64d6a..1db73e7 100644 --- a/kubejs/server_scripts/HarmoniousEngineering/recipes/powah.js +++ b/kubejs/server_scripts/HarmoniousEngineering/recipes/powah.js @@ -92,8 +92,6 @@ onEvent('entity.drops', event => { } const comp = entity.minecraftEntity.getPersistentData(); - // Always add an extra enderpearl because they're rare a.f. - event.addDrop(Item.of('1x minecraft:ender_pearl')); const isChallengerMob = comp.func_74764_b('challenger_mob_data'); // contains() if (isChallengerMob) { event.addDrop(Item.of('1x powah:ender_core'));