From b1fddab3e96c41e209856a068de3a3d948eb4636 Mon Sep 17 00:00:00 2001 From: Pyritie Date: Sat, 31 Jan 2026 14:27:52 +0000 Subject: [PATCH] cleanup rock loot tables --- .../blockstates/sandy_jadestone.json | 8 ++ .../loot_tables/blocks/flavolite.json | 44 ++++++++ .../loot_tables/blocks/sandy_jadestone.json | 44 ++++++++ .../create/loot_tables/blocks/scorchia.json | 44 ++++++++ .../create/loot_tables/blocks/scoria.json | 44 ++++++++ .../blocks/rock/cobble_blackstone.json | 20 ---- .../blocks/rock/cobble_crackrack.json | 20 ---- .../blocks/rock/cobble_dripstone.json | 20 ---- .../blocks/rock/cobble_moon_deepslate.json | 20 ---- .../blocks/rock/cobble_permafrost.json | 20 ---- .../blocks/rock/gravel_blackstone.json | 70 ------------ .../blocks/rock/gravel_crackrack.json | 70 ------------ .../blocks/rock/gravel_deepslate.json | 70 ------------ .../blocks/rock/gravel_dripstone.json | 70 ------------ .../blocks/rock/gravel_glacio.json | 70 ------------ .../loot_tables/blocks/rock/gravel_mars.json | 70 ------------ .../blocks/rock/gravel_mercury.json | 70 ------------ .../loot_tables/blocks/rock/gravel_moon.json | 70 ------------ .../blocks/rock/gravel_moon_deepslate.json | 70 ------------ .../blocks/rock/gravel_permafrost.json | 70 ------------ .../blocks/rock/gravel_red_granite.json | 70 ------------ .../loot_tables/blocks/rock/gravel_venus.json | 70 ------------ .../blocks/rock/hardened_blackstone.json | 30 ----- .../blocks/rock/hardened_deepslate.json | 30 ----- .../blocks/rock/hardened_dripstone.json | 30 ----- .../blocks/rock/hardened_glacio_stone.json | 30 ----- .../blocks/rock/hardened_mars_stone.json | 30 ----- .../blocks/rock/hardened_mercury_stone.json | 30 ----- .../blocks/rock/hardened_moon_deepslate.json | 30 ----- .../blocks/rock/hardened_moon_stone.json | 30 ----- .../blocks/rock/hardened_red_granite.json | 30 ----- .../blocks/rock/hardened_venus_stone.json | 30 ----- kubejs/server_scripts/main_server_script.js | 1 + kubejs/server_scripts/tfc/tags.js | 7 ++ .../tfg/natural_blocks/loot.stones.js | 104 ++++++++++++++++++ .../tfg/ores_and_materials/loot.ores.js | 85 +------------- 36 files changed, 300 insertions(+), 1321 deletions(-) create mode 100644 kubejs/assets/betterend/blockstates/sandy_jadestone.json create mode 100644 kubejs/data/betterend/loot_tables/blocks/flavolite.json create mode 100644 kubejs/data/betterend/loot_tables/blocks/sandy_jadestone.json create mode 100644 kubejs/data/create/loot_tables/blocks/scorchia.json create mode 100644 kubejs/data/create/loot_tables/blocks/scoria.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/cobble_blackstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/cobble_crackrack.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/cobble_dripstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/cobble_moon_deepslate.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/cobble_permafrost.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_blackstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_crackrack.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_deepslate.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_dripstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_glacio.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_mars.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_mercury.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon_deepslate.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_permafrost.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_red_granite.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/gravel_venus.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_blackstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_deepslate.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_dripstone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_glacio_stone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_mars_stone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_mercury_stone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_deepslate.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_stone.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_red_granite.json delete mode 100644 kubejs/data/tfg/loot_tables/blocks/rock/hardened_venus_stone.json create mode 100644 kubejs/server_scripts/tfg/natural_blocks/loot.stones.js diff --git a/kubejs/assets/betterend/blockstates/sandy_jadestone.json b/kubejs/assets/betterend/blockstates/sandy_jadestone.json new file mode 100644 index 000000000..a8b056a71 --- /dev/null +++ b/kubejs/assets/betterend/blockstates/sandy_jadestone.json @@ -0,0 +1,8 @@ +{ + "variants": { + "": [ + { "model": "betterend:block/sandy_jadestone" }, + { "model": "betterend:block/sandy_jadestone", "y": 180 } + ] + } +} diff --git a/kubejs/data/betterend/loot_tables/blocks/flavolite.json b/kubejs/data/betterend/loot_tables/blocks/flavolite.json new file mode 100644 index 000000000..1215fdeef --- /dev/null +++ b/kubejs/data/betterend/loot_tables/blocks/flavolite.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "loot_pool", + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "name": "betterend:flavolite", + "conditions": [ + { + "condition": "tfc:is_isolated" + } + ] + }, + { + "type": "minecraft:item", + "name": "tfg:loose/flavolite", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 4, + "type": "minecraft:uniform" + } + } + ] + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubejs/data/betterend/loot_tables/blocks/sandy_jadestone.json b/kubejs/data/betterend/loot_tables/blocks/sandy_jadestone.json new file mode 100644 index 000000000..80bc06412 --- /dev/null +++ b/kubejs/data/betterend/loot_tables/blocks/sandy_jadestone.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "loot_pool", + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "name": "betterend:sandy_jadestone", + "conditions": [ + { + "condition": "tfc:is_isolated" + } + ] + }, + { + "type": "minecraft:item", + "name": "tfg:loose/sandy_jadestone", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 4, + "type": "minecraft:uniform" + } + } + ] + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubejs/data/create/loot_tables/blocks/scorchia.json b/kubejs/data/create/loot_tables/blocks/scorchia.json new file mode 100644 index 000000000..3fc5016e3 --- /dev/null +++ b/kubejs/data/create/loot_tables/blocks/scorchia.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "loot_pool", + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "name": "create:scorchia", + "conditions": [ + { + "condition": "tfc:is_isolated" + } + ] + }, + { + "type": "minecraft:item", + "name": "tfg:loose/scorchia", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 4, + "type": "minecraft:uniform" + } + } + ] + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubejs/data/create/loot_tables/blocks/scoria.json b/kubejs/data/create/loot_tables/blocks/scoria.json new file mode 100644 index 000000000..e76d4e30d --- /dev/null +++ b/kubejs/data/create/loot_tables/blocks/scoria.json @@ -0,0 +1,44 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "loot_pool", + "rolls": 1, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "name": "create:scoria", + "conditions": [ + { + "condition": "tfc:is_isolated" + } + ] + }, + { + "type": "minecraft:item", + "name": "tfg:loose/scoria", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 4, + "type": "minecraft:uniform" + } + } + ] + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_blackstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/cobble_blackstone.json deleted file mode 100644 index c3ede98e4..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_blackstone.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:rock/cobble_blackstone" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_crackrack.json b/kubejs/data/tfg/loot_tables/blocks/rock/cobble_crackrack.json deleted file mode 100644 index 2dafa861e..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_crackrack.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:rock/cobble_crackrack" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_dripstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/cobble_dripstone.json deleted file mode 100644 index 20dda7fce..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_dripstone.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:rock/cobble_dripstone" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_moon_deepslate.json b/kubejs/data/tfg/loot_tables/blocks/rock/cobble_moon_deepslate.json deleted file mode 100644 index 6043da7a8..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_moon_deepslate.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:rock/cobble_moon_deepslate" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_permafrost.json b/kubejs/data/tfg/loot_tables/blocks/rock/cobble_permafrost.json deleted file mode 100644 index da12291a9..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/cobble_permafrost.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:rock/cobble_permafrost" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_blackstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_blackstone.json deleted file mode 100644 index 0d20b2d29..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_blackstone.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_blackstone", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_blackstone" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_crackrack.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_crackrack.json deleted file mode 100644 index eddae43a9..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_crackrack.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_crackrack", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_crackrack" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_deepslate.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_deepslate.json deleted file mode 100644 index 9e5ef2260..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_deepslate.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_deepslate", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_deepslate" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_dripstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_dripstone.json deleted file mode 100644 index 819a92dfd..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_dripstone.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_dripstone", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_dripstone" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_glacio.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_glacio.json deleted file mode 100644 index 8e7508ef2..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_glacio.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_glacio", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_glacio" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mars.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mars.json deleted file mode 100644 index 0c9a1f370..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mars.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_mars", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_mars" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mercury.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mercury.json deleted file mode 100644 index 626a1e252..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_mercury.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_mercury", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_mercury" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon.json deleted file mode 100644 index 09d2e998b..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_moon", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_moon" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon_deepslate.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon_deepslate.json deleted file mode 100644 index 7e1bf9b63..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_moon_deepslate.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_moon_deepslate", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_moon_deepslate" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_permafrost.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_permafrost.json deleted file mode 100644 index 5267f98d6..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_permafrost.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_permafrost", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_permafrost" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_red_granite.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_red_granite.json deleted file mode 100644 index c4a8d619a..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_red_granite.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_red_granite", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_red_granite" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_venus.json b/kubejs/data/tfg/loot_tables/blocks/rock/gravel_venus.json deleted file mode 100644 index a4800b69a..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/gravel_venus.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_venus", - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { - "min": 1 - } - } - ] - } - } - ] - }, - { - "type": "minecraft:alternatives", - "children": [ - { - "type": "minecraft:item", - "name": "minecraft:flint", - "conditions": [ - { - "condition": "minecraft:table_bonus", - "enchantment": "minecraft:fortune", - "chances": [ - 0.1, - 0.14285715, - 0.25, - 1.0 - ] - } - ] - }, - { - "type": "minecraft:item", - "name": "tfg:rock/gravel_venus" - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_blackstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_blackstone.json deleted file mode 100644 index 748f5016f..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_blackstone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "beneath:blackstone_pebble", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_deepslate.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_deepslate.json deleted file mode 100644 index 6cd548020..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_deepslate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/deepslate", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_dripstone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_dripstone.json deleted file mode 100644 index bcd7443c2..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_dripstone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/dripstone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_glacio_stone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_glacio_stone.json deleted file mode 100644 index e8e009c94..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_glacio_stone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/glacio_stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mars_stone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mars_stone.json deleted file mode 100644 index 0e7e9cf38..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mars_stone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/mars_stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mercury_stone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mercury_stone.json deleted file mode 100644 index 2362d4e63..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_mercury_stone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/mercury_stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_deepslate.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_deepslate.json deleted file mode 100644 index 804cf0072..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_deepslate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/moon_deepslate", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_stone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_stone.json deleted file mode 100644 index b687d4df8..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_moon_stone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/moon_stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_red_granite.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_red_granite.json deleted file mode 100644 index c8819199b..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_red_granite.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/red_granite", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_venus_stone.json b/kubejs/data/tfg/loot_tables/blocks/rock/hardened_venus_stone.json deleted file mode 100644 index 3c950f61a..000000000 --- a/kubejs/data/tfg/loot_tables/blocks/rock/hardened_venus_stone.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "minecraft:block", - "pools": [ - { - "name": "loot_pool", - "rolls": 1, - "entries": [ - { - "type": "minecraft:item", - "name": "tfg:loose/venus_stone", - "functions": [ - { - "function": "minecraft:set_count", - "count": { - "min": 1, - "max": 4, - "type": "minecraft:uniform" - } - } - ] - } - ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] - } - ] -} \ No newline at end of file diff --git a/kubejs/server_scripts/main_server_script.js b/kubejs/server_scripts/main_server_script.js index e62b99652..f29efde72 100644 --- a/kubejs/server_scripts/main_server_script.js +++ b/kubejs/server_scripts/main_server_script.js @@ -181,6 +181,7 @@ TFCEvents.data(event => { LootJS.modifiers((event) => { registerAdAstraLoots(event) registerBeneathLoots(event) + registerTFGRockLoots(event) registerTFGOreLoots(event) registerLootrLoots(event) registerPrimitiveCreaturesLoots(event) diff --git a/kubejs/server_scripts/tfc/tags.js b/kubejs/server_scripts/tfc/tags.js index 70a218388..3637b57ff 100644 --- a/kubejs/server_scripts/tfc/tags.js +++ b/kubejs/server_scripts/tfc/tags.js @@ -463,6 +463,13 @@ function registerTFCItemTags(event) { event.add('tfc:food/bell_peppers', 'tfc:food/green_bell_pepper'); event.add('tfc:food/bell_peppers', 'tfc:food/yellow_bell_pepper'); event.add('tfc:food/bell_peppers', 'tfc:food/red_bell_pepper'); + + // More offhand things for piglin brutes + event.add('tfc:mob_offhand_weapons', 'tfchotornot:tongs/gold'); + event.add('tfc:mob_offhand_weapons', 'tfchotornot:tongs/rose_gold'); + event.add('tfc:mob_offhand_weapons', 'gtceu:black_bronze_knife'); + event.add('tfc:mob_offhand_weapons', 'tfc:metal/javelin/black_bronze'); + event.add('tfc:mob_offhand_weapons', 'tfc:metal/mace/black_bronze'); } /** @param {TagEvent.Block} event */ diff --git a/kubejs/server_scripts/tfg/natural_blocks/loot.stones.js b/kubejs/server_scripts/tfg/natural_blocks/loot.stones.js new file mode 100644 index 000000000..064bb05cc --- /dev/null +++ b/kubejs/server_scripts/tfg/natural_blocks/loot.stones.js @@ -0,0 +1,104 @@ +// priority: 10 +"use strict"; + +function registerTFGRockLoots(event) { + + // Rock to cobble, cobble to gravel + for (let [rockId, rock] of Object.entries(global.BIG_ROCK_TABLE)) { + if (rock.raw != null && rock.cobble != null) { + event.addBlockLootModifier(rock.raw.block) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(rock.cobble.block) + } + + if (rock.hardened != null && rock.cobble != null) { + event.addBlockLootModifier(rock.hardened) + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addWeightedLoot([1, 4], [ + LootEntry.of(rock.loose) + ]) + + event.addBlockLootModifier(rock.hardened) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(rock.cobble.block) + } + + if (rock.cobble != null) { + event.addBlockLootModifier(rock.cobble.block) + .addLoot(rock.cobble.block) + } + + if (rock.gravel != null) { + event.addBlockLootModifier(rock.gravel.block) + .addAlternativesLoot([ + LootEntry.of('minecraft:flint').when(c => c.randomChance(0.1)), + LootEntry.of(rock.gravel.block) + ]) + } + + if (rock.cobble != null && rock.gravel != null) { + event.addBlockLootModifier(rock.cobble.block) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(rock.gravel) + + if (rock.cobble.mossy != null) { + event.addBlockLootModifier(rock.cobble.mossy.block) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(rock.gravel) + } + } + } + + // Sand + global.SAND_COLORS.forEach(sandColor => { + let tag_array = Ingredient.of(`#tfc:${sandColor}_gravel`).itemIds.toArray().map(String); + tag_array.forEach(item => { + event.addBlockLootModifier(item) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(`tfc:sand/${sandColor}`) + }) + }) + + global.HAMMERING.forEach(x => { + if (x.raw.startsWith('#')) { + let tag_array = Ingredient.of(x.raw).itemIds.toArray().map(String); + tag_array.forEach(item => { + event.addBlockLootModifier(item) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(x.hammered) + }) + } + else { + event.addBlockLootModifier(x.raw) + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addLoot(x.hammered) + } + }) + + // Other rocks + event.addBlockLootModifier('minecraft:gilded_blackstone') + .matchMainHand('#forge:tools/hammers') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addSequenceLoot( + LootEntry.of('tfg:rock/cobble_blackstone'), + LootEntry.of('tfc:powder/native_gold') + ) + + event.addBlockLootModifier('beneath:ore/blackstone_sylvite') + .removeLoot(ItemFilter.ALWAYS_TRUE) + .addWeightedLoot([ + Item.of('gtceu:rich_raw_rock_salt').withChance(0.2), + Item.of('gtceu:raw_rock_salt').withChance(0.6), + Item.of('gtceu:poor_raw_rock_salt').withChance(0.2) + ]) + .addLoot(LootEntry.of('tfg:igneous_ultramafic_dust').when(c => c.randomChance(0.2))) + .addLoot(LootEntry.of('gtceu:tiny_rock_salt_dust').when(c => c.randomChance(0.05))); + +} \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/ores_and_materials/loot.ores.js b/kubejs/server_scripts/tfg/ores_and_materials/loot.ores.js index 32c1dab7a..fa1c1c6f4 100644 --- a/kubejs/server_scripts/tfg/ores_and_materials/loot.ores.js +++ b/kubejs/server_scripts/tfg/ores_and_materials/loot.ores.js @@ -2,85 +2,7 @@ "use strict"; const registerTFGOreLoots = (event) => { - // Rock to cobble, cobble to gravel - for (let [rockId, rock] of Object.entries(global.BIG_ROCK_TABLE)) { - if (rock.raw != null && rock.cobble != null) { - event.addBlockLootModifier(rock.raw.block) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(rock.cobble.block) - } - - if (rock.hardened != null && rock.cobble != null) { - event.addBlockLootModifier(rock.hardened) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(rock.cobble.block) - } - - if (rock.cobble != null && rock.gravel != null) { - event.addBlockLootModifier(rock.cobble.block) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(rock.gravel) - - if (rock.cobble.mossy != null) { - event.addBlockLootModifier(rock.cobble.mossy.block) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(rock.gravel) - } - } - } - - // Sand - global.SAND_COLORS.forEach(sandColor => { - let tag_array = Ingredient.of(`#tfc:${sandColor}_gravel`).itemIds.toArray().map(String); - tag_array.forEach(item => { - event.addBlockLootModifier(item) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(`tfc:sand/${sandColor}`) - }) - }) - - global.HAMMERING.forEach(x => { - if (x.raw.startsWith('#')) { - let tag_array = Ingredient.of(x.raw).itemIds.toArray().map(String); - tag_array.forEach(item => { - event.addBlockLootModifier(item) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(x.hammered) - }) - } - else { - event.addBlockLootModifier(x.raw) - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addLoot(x.hammered) - } - }) - - // Other rocks - event.addBlockLootModifier('minecraft:gilded_blackstone') - .matchMainHand('#forge:tools/hammers') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addSequenceLoot( - LootEntry.of('tfg:rock/cobble_blackstone'), - LootEntry.of('tfc:powder/native_gold') - ) - - event.addBlockLootModifier('beneath:ore/blackstone_sylvite') - .removeLoot(ItemFilter.ALWAYS_TRUE) - .addWeightedLoot([ - Item.of('gtceu:rich_raw_rock_salt').withChance(0.2), - Item.of('gtceu:raw_rock_salt').withChance(0.6), - Item.of('gtceu:poor_raw_rock_salt').withChance(0.2) - ]) - .addLoot(LootEntry.of('tfg:igneous_ultramafic_dust').when((c) => c.randomChance(0.2))) - .addLoot(LootEntry.of('gtceu:tiny_rock_salt_dust').when(c => c.randomChance(0.05))); - + // Go through all materials const $GreateMaterials = Java.loadClass("electrolyte.greate.registry.GreateMaterials") @@ -125,18 +47,19 @@ const registerTFGOreLoots = (event) => { // break with pickaxe/mining hammer/drill/mining machine event.addBlockLootModifier(`${namespace}:${stoneType}_${material.getName()}_ore`) - .removeLoot(ItemFilter.ALWAYS_TRUE) + .removeLoot(Ingredient.all) .addWeightedLoot([ richRawOre.withChance(0.2), normalRawOre.withChance(0.6), poorRawOre.withChance(0.2) ]) - .addLoot(LootEntry.of(stoneTypeDust).when((c) => c.randomChance(0.2))) + .addLoot(LootEntry.of(stoneTypeDust).when(c => c.randomChance(0.2))) .addLoot(LootEntry.of(dustOre).when(c => c.randomChance(0.05))); // break with hammer event.addBlockLootModifier(`${namespace}:${stoneType}_${material.getName()}_ore`) .matchMainHand('#forge:tools/hammers') + .removeLoot(Ingredient.all) .addLoot(LootEntry.of(GTBlocks.COBBLE_BLOCKS.get(TagPrefix.get(stoneType)).get().getBlock().id)); }) }