This commit is contained in:
Pyritie 2026-01-21 22:40:31 +00:00 committed by GitHub
parent f93e33ab8e
commit 1e42ed442a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 72 additions and 9 deletions

View file

@ -6,16 +6,33 @@
*/
function registerTFGCollapseRecipes(event) {
const SHAPES = ['stair', 'slab', 'wall'];
// Rocks
for (let [rockId, rock] of Object.entries(global.BIG_ROCK_TABLE)) {
if (rock.cobble != null) {
if (rock.raw != null) {
if (rock.raw != null && rock.collapsible) {
event.recipes.tfc.collapse(rock.cobble.block, rock.raw.block);
SHAPES.forEach(shape => {
if (rock.raw[shape] != null) {
event.recipes.tfc.collapse(rock.cobble[shape], rock.raw[shape]);
}
})
}
if (rock.hardened != null) {
event.recipes.tfc.collapse(rock.cobble.block, rock.hardened);
}
if (rock.polished != null && rock.collapsible) {
event.recipes.tfc.collapse(rock.cobble.block, rock.polished.block);
SHAPES.forEach(shape => {
if (rock.polished[shape] != null) {
event.recipes.tfc.collapse(rock.cobble[shape], rock.polished[shape]);
}
})
}
event.recipes.tfc.collapse(rock.cobble.block, `#forge:ores_in_ground/${rockId}`)
@ -36,7 +53,7 @@ function registerTFGCollapseRecipes(event) {
event.recipes.tfc.collapse('#tfg:rock_walls').id('tfg:collapse/rock_walls')
// Nether
event.recipes.tfc.collapse('tfc:rock/cobble/basalt', 'minecraft:basalt')
event.recipes.tfc.collapse('tfc:rock/cobble/basalt', 'minecraft:basalt')
event.recipes.tfc.landslide('tfg:ash_pile', 'tfg:ash_pile')
// Space

View file

@ -282,32 +282,42 @@ function registerTFGStoneBlockTags(event) {
event.add('tfc:rock/raw', rock.raw.block)
event.add('minecraft:mineable/pickaxe', rock.raw.block)
event.add('tfc:can_carve', rock.raw.block)
// Collapse tags also require a collapse recipe to work.
// Don't add the recipe if you don't want them to actually collapse!
event.add('tfc:can_collapse', rock.raw.block)
event.add('tfc:can_trigger_collapse', rock.raw.block)
event.add('tfc:can_start_collapse', rock.raw.block)
event.add('tfc:powderkeg_breaking_blocks', rock.raw.block)
event.add('tfc:bloomery_insulation', rock.raw.block)
event.add('firmalife:oven_insulation', rock.raw.block)
event.add('tfc:forge_insulation', rock.raw.block)
if (rock.collapsible && rock.cobble != null) {
// Collapse tags also require a collapse recipe to work.
// Don't add the recipe if you don't want them to actually collapse!
event.add('tfc:can_collapse', rock.raw.block)
event.add('tfc:can_trigger_collapse', rock.raw.block)
event.add('tfc:can_start_collapse', rock.raw.block)
}
SHAPES.forEach(shape => {
if (rock.raw[shape] != null) {
event.add(`tfg:rock_${shape}s`, rock.raw[shape]);
if (rock.collapsible && rock.cobble != null) {
event.add('tfc:can_collapse', rock.raw[shape])
event.add('tfc:can_trigger_collapse', rock.raw[shape])
event.add('tfc:can_start_collapse', rock.raw[shape])
}
}
})
}
if (rock.hardened != null) {
event.add('minecraft:mineable/pickaxe', rock.hardened)
event.add('tfc:can_collapse', rock.hardened)
event.add('tfc:can_trigger_collapse', rock.hardened)
event.add('tfc:powderkeg_breaking_blocks', rock.hardened)
event.add('tfc:bloomery_insulation', rock.hardened)
event.add('firmalife:oven_insulation', rock.hardened)
event.add('tfc:forge_insulation', rock.hardened)
event.add('tfc:can_carve', rock.hardened)
// hardened stone always collapses, but never starts them
event.add('tfc:can_collapse', rock.hardened)
event.add('tfc:can_trigger_collapse', rock.hardened)
}
if (rock.cobble != null) {
@ -324,9 +334,21 @@ function registerTFGStoneBlockTags(event) {
event.add('tfc:forge_insulation', rock.polished.block);
event.add('firmalife:oven_insulation', rock.polished.block);
if (rock.collapsible && rock.cobble != null) {
event.add('tfc:can_collapse', rock.polished.block)
event.add('tfc:can_trigger_collapse', rock.polished.block)
event.add('tfc:can_start_collapse', rock.polished.block)
}
SHAPES.forEach(shape => {
if (rock.polished[shape] != null) {
event.add(`tfg:rock_${shape}s`, rock.polished[shape]);
if (rock.collapsible && rock.cobble != null) {
event.add('tfc:can_collapse', rock.polished[shape])
event.add('tfc:can_trigger_collapse', rock.polished[shape])
event.add('tfc:can_start_collapse', rock.polished[shape])
}
}
})
}

View file

@ -19,6 +19,8 @@
* Item tag that everything in this rock type should be added to
* @property {boolean} isTFC
* If this is a built-in TFC rock type or not
* @property {boolean} collapsible
* If the raw and polished blocks should collapse. If this rock type has no cobble, they will also never collapse. Cobble and gravel always landslide.
* @property {String?} stonecutterTag
* Item tag for stonecutting
* @property {String?} gravelTag
@ -167,6 +169,7 @@ function generateTFC(id, table) {
table.chiseled = { block: `tfc:rock/chiseled/${id}` };
table.isTFC = true;
table.collapsible = true;
return table;
}
@ -194,6 +197,8 @@ function generateMissing(id, table) {
table.aqueduct = `tfg:rock/aqueduct_${id}`;
if (table.spike === undefined)
table.spike = `tfg:spike/${id}_spike`;
if (table.collapsible === undefined)
table.collapsible = true;
table.isTFC = false;
return table;
@ -346,6 +351,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
// No material because GT already has recycling for these
sound: 'stone',
mapColor: 'quartz',
collapsible: false,
raw: {
block: 'minecraft:quartz_block',
stair: 'minecraft:quartz_stairs',
@ -467,6 +473,9 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
tfcTag: 'tfc:sedimentary_items',
stonecutterTag: 'create:stone_types/calcite',
isTFC: false,
collapsible: false,
sound: 'stone',
mapColor: 'quartz',
dimensions: ['minecraft:overworld', 'minecraft:the_nether', 'ad_astra:venus'],
pillar: 'create:calcite_pillar',
pillar2: 'create:layered_calcite',
@ -483,6 +492,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
tfcTag: 'tfc:igneous_extrusive_items',
stonecutterTag: 'create:stone_types/tuff',
isTFC: false,
collapsible: false,
sound: 'tuff',
mapColor: 'terracotta_gray',
dimensions: ['minecraft:overworld', 'minecraft:the_nether', 'ad_astra:venus'],
@ -573,6 +583,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
// Suevite
"sky_stone": {
isTFC: false,
collapsible: false,
dimensions: ['ad_astra:moon'],
stonecutterTag: 'tfg:stone_types/suevite',
raw: generateFormsExisting('sky_stone', 'ae2:%s', { block: 'ae2:sky_stone_block' }),
@ -582,6 +593,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"purpur": {
isTFC: false,
collapsible: false,
brick: 'minecraft:popped_chorus_fruit',
bricks: {
block: 'minecraft:purpur_block',
@ -741,6 +753,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
// Thermal Vent Deposit
"sulphuric_rock": {
material: 'tfg:igneous_mafic',
collapsible: false,
isTFC: false,
sound: 'dripstone_block',
mapColor: 'terracotta_light_gray',
@ -806,6 +819,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
material: 'tfg:sedimentary_clastic',
tfcTag: 'tfc:sedimentary_items',
isTFC: false,
collapsible: false,
dimensions: ['ad_astra:venus'],
raw: { block: 'ad_astra:conglomerate' },
gravel: 'tfc:rock/gravel/conglomerate',
@ -880,6 +894,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
"stone": {
material: 'stone',
collapsible: false,
sound: 'stone',
mapColor: 'stone',
support: 'tfg:stone_support',
@ -902,6 +917,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"light_concrete": {
material: 'concrete',
collapsible: false,
sound: 'stone',
mapColor: 'color_light_gray',
support: 'tfg:light_concrete_support',
@ -932,6 +948,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"dark_concrete": {
material: 'concrete',
collapsible: false,
sound: 'stone',
mapColor: 'color_gray',
support: 'tfg:dark_concrete_support',
@ -961,6 +978,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
]
},
"titanium_concrete": {
collapsible: false,
sound: 'stone',
stonecutterTag: 'tfg:stone_types/titanium_concrete',
raw: { block: 'tfg:titanium_concrete' },
@ -975,6 +993,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"brick": {
material: 'brick',
collapsible: false,
sound: 'stone',
stonecutterTag: 'tfg:stone_types/red_bricks',
bricks: generateFormsExisting('brick', 'minecraft:%s', { block: 'minecraft:bricks' },
@ -996,6 +1015,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
"asurine": {
material: 'asurine',
collapsible: false,
dimensions: ['ad_astra:moon'],
pillar: 'create:asurine_pillar',
pillar2: 'create:layered_asurine',
@ -1010,6 +1030,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"ochrum": {
material: 'ochrum',
collapsible: false,
dimensions: ['ad_astra:mars'],
pillar: 'create:ochrum_pillar',
pillar2: 'create:layered_ochrum',
@ -1024,6 +1045,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"crimsite": {
material: 'crimsite',
collapsible: false,
dimensions: ['ad_astra:venus'],
pillar: 'create:crimsite_pillar',
pillar2: 'create:layered_crimsite',
@ -1038,6 +1060,7 @@ global.BIG_ROCK_TABLE = /** @type {{String, RockType}} */ ({
},
"veridium": {
material: 'veridium',
collapsible: false,
dimensions: ['ad_astra:glacio'],
pillar: 'create:veridium_pillar',
pillar2: 'create:layered_veridium',
@ -1059,6 +1082,7 @@ global.CREATE_DECO_BRICK_TYPES.forEach(color => {
global.BIG_ROCK_TABLE[`${color}_brick`] = {
material: 'brick',
collapsible: false,
sound: 'stone',
stonecutterTag: `tfg:stone_types/${color}_brick`,
bricks: generateFormsExisting(color, 'createdeco:%s_brick', { block: `createdeco:${color}_bricks` },