cleanup rock loot tables

This commit is contained in:
Pyritie 2026-01-31 14:27:52 +00:00
parent e90cccbcc8
commit b1fddab3e9
36 changed files with 300 additions and 1321 deletions

View file

@ -0,0 +1,8 @@
{
"variants": {
"": [
{ "model": "betterend:block/sandy_jadestone" },
{ "model": "betterend:block/sandy_jadestone", "y": 180 }
]
}
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -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"
}
]
}
]
}

View file

@ -181,6 +181,7 @@ TFCEvents.data(event => {
LootJS.modifiers((event) => {
registerAdAstraLoots(event)
registerBeneathLoots(event)
registerTFGRockLoots(event)
registerTFGOreLoots(event)
registerLootrLoots(event)
registerPrimitiveCreaturesLoots(event)

View file

@ -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 */

View file

@ -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)));
}

View file

@ -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));
})
}