Move all advancements to datagen

This commit is contained in:
modmuss50 2023-05-14 00:19:59 +01:00 committed by modmuss
parent 4c131a1574
commit 887444db4d
21 changed files with 155 additions and 563 deletions

View file

@ -120,7 +120,23 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.Machine.WIND_MILL.block)
}
solarTree(generator)
def watermill = create {
parent windmill
name "watermill"
frame AdvancementFrame.GOAL
icon TRContent.Machine.WATER_MILL
condition placedBlock(TRContent.Machine.WATER_MILL.block)
}
def thermalGenerator = create {
parent watermill
name "thermalgenerator"
frame AdvancementFrame.GOAL
icon TRContent.Machine.THERMAL_GENERATOR
condition placedBlock(TRContent.Machine.THERMAL_GENERATOR.block)
}
solarTree(machineBlock)
}
private void solarTree(Advancement root) {
@ -231,6 +247,15 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.Machine.LV_TRANSFORMER.block)
}
def futureTransformer = create {
parent lvTransformer
name "futuretransformer"
icon TRContent.Machine.MV_TRANSFORMER
condition placedBlock(TRContent.Machine.MV_TRANSFORMER.block)
condition placedBlock(TRContent.Machine.HV_TRANSFORMER.block)
condition placedBlock(TRContent.Machine.EV_TRANSFORMER.block)
}
def mfsu = create {
parent mfe
name "mfsu"
@ -256,7 +281,68 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.Machine.IRON_FURNACE.block)
}
// TODO fill this out some more
def electricFurnace = create {
parent ironFurnace
name "electricfurnace"
icon TRContent.Machine.ELECTRIC_FURNACE
condition placedBlock(TRContent.Machine.ELECTRIC_FURNACE.block)
}
def grinder = create {
parent electricFurnace
name "grinder"
icon TRContent.Machine.GRINDER
condition placedBlock(TRContent.Machine.GRINDER.block)
}
def extractor = create {
parent grinder
name "extractor"
icon TRContent.Machine.EXTRACTOR
condition placedBlock(TRContent.Machine.EXTRACTOR.block)
}
def compressor = create {
parent grinder
name "compressor"
icon TRContent.Machine.COMPRESSOR
condition placedBlock(TRContent.Machine.COMPRESSOR.block)
}
def recycler = create {
parent compressor
name "recycler"
icon TRContent.Machine.RECYCLER
condition placedBlock(TRContent.Machine.RECYCLER.block)
}
def scrapboxinator = create {
parent recycler
name "scrapboxinator"
icon TRContent.Machine.SCRAPBOXINATOR
condition placedBlock(TRContent.Machine.SCRAPBOXINATOR.block)
}
def canningMachine = create {
parent electricFurnace
name "canningmachine"
icon TRContent.Machine.SOLID_CANNING_MACHINE
condition placedBlock(TRContent.Machine.SOLID_CANNING_MACHINE.block)
}
def rollingMachine = create {
parent electricFurnace
name "rollingmachine"
icon TRContent.Machine.ROLLING_MACHINE
condition placedBlock(TRContent.Machine.ROLLING_MACHINE.block)
}
def wireMill = create {
parent electricFurnace
name "wiremill"
icon TRContent.Machine.WIRE_MILL
condition placedBlock(TRContent.Machine.WIRE_MILL.block)
}
advancedMachineTreeTree(ironFurnace)
}
@ -269,14 +355,29 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.MachineBlocks.ADVANCED.frame)
}
def lightningRod = create {
parent advancedMachineBlock
name "lightningrod"
frame AdvancementFrame.GOAL
icon TRContent.Machine.LIGHTNING_ROD
condition placedBlock(TRContent.Machine.LIGHTNING_ROD.block)
}
def fusionCoil = create {
parent advancedMachineBlock
name "fusioncoil"
icon TRContent.Machine.FUSION_COIL
frame AdvancementFrame.CHALLENGE
condition placedBlock(TRContent.Machine.FUSION_COIL.block)
}
def fusionComputer = create {
parent fusionCoil
name "fusioncomputer"
icon TRContent.Machine.FUSION_CONTROL_COMPUTER
frame AdvancementFrame.CHALLENGE
condition placedBlock(TRContent.Machine.FUSION_CONTROL_COMPUTER.block)
}
def nuke = create {
parent fusionCoil
name "nuke"
@ -293,6 +394,48 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block)
}
def nickelNugget = create {
parent industrialCentrifuge
name "nickelnugget"
icon TRContent.Nuggets.NICKEL
condition inventoryChanged(TRContent.Nuggets.NICKEL)
}
def blastFurnace = create {
parent nickelNugget
name "blastfurnace"
icon TRContent.Machine.INDUSTRIAL_BLAST_FURNACE
frame AdvancementFrame.GOAL
condition placedBlock(TRContent.Machine.INDUSTRIAL_BLAST_FURNACE.block)
}
def industrialGrinder = create {
parent blastFurnace
name "industrialgrinder"
icon TRContent.Machine.INDUSTRIAL_GRINDER
frame AdvancementFrame.GOAL
condition placedBlock(TRContent.Machine.INDUSTRIAL_GRINDER.block)
}
def implosion = create {
parent industrialGrinder
name "implosion"
icon TRContent.Machine.IMPLOSION_COMPRESSOR
frame AdvancementFrame.GOAL
condition placedBlock(TRContent.Machine.IMPLOSION_COMPRESSOR.block)
}
def quantumArmor = create {
parent implosion
name "quantumarmor"
icon TRContent.QUANTUM_CHESTPLATE
frame AdvancementFrame.GOAL
condition inventoryChanged(TRContent.QUANTUM_HELMET)
condition inventoryChanged(TRContent.QUANTUM_CHESTPLATE)
condition inventoryChanged(TRContent.QUANTUM_LEGGINGS)
condition inventoryChanged(TRContent.QUANTUM_BOOTS)
}
def industrialMachineBlock = create {
parent advancedMachineBlock
name "industrialmachineblock"
@ -300,8 +443,16 @@ class TRAdvancementProvider extends FabricAdvancementProvider {
condition placedBlock(TRContent.MachineBlocks.INDUSTRIAL.frame)
}
def matterFabricator = create {
parent industrialMachineBlock
name "matterfabricator"
icon TRContent.Machine.MATTER_FABRICATOR
frame AdvancementFrame.CHALLENGE
condition placedBlock(TRContent.Machine.MATTER_FABRICATOR.block)
}
def quantumTank = create {
parent advancedMachineBlock
parent industrialMachineBlock
name "quantumtank"
icon TRContent.TankUnit.QUANTUM
frame AdvancementFrame.CHALLENGE

View file

@ -1,22 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:industrial_blast_furnace"
},
"title": {
"translate": "advancements.techreborn.blastfurnace"
},
"description": {
"translate": "advancements.techreborn.blastfurnace.desc"
}
},
"parent": "techreborn:nickelnugget",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:industrial_blast_furnace"
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:solid_canning_machine"
},
"title": {
"translate": "advancements.techreborn.canningmachine"
},
"description": {
"translate": "advancements.techreborn.canningmachine.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:solid_canning_machine"]
}
]
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:compressor"
},
"title": {
"translate": "advancements.techreborn.compressor"
},
"description": {
"translate": "advancements.techreborn.compressor.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:compressor"]
}
]
}
}
}
}

View file

@ -1,22 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:electric_furnace"
},
"title": {
"translate": "advancements.techreborn.electricfurnace"
},
"description": {
"translate": "advancements.techreborn.electricfurnace.desc"
}
},
"parent": "techreborn:ironfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:electric_furnace"
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:extractor"
},
"title": {
"translate": "advancements.techreborn.extractor"
},
"description": {
"translate": "advancements.techreborn.extractor.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:extractor"]
}
]
}
}
}
}

View file

@ -1,27 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:fusion_control_computer"
},
"title": {
"translate": "advancements.techreborn.fusioncomputer"
},
"description": {
"translate": "advancements.techreborn.fusioncomputer.desc"
},
"frame": "challenge"
},
"parent": "techreborn:fusioncoil",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:fusion_control_computer"]
}
]
}
}
}
}

View file

@ -1,49 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:mv_transformer"
},
"title": {
"translate": "advancements.techreborn.futuretransformer"
},
"description": {
"translate": "advancements.techreborn.futuretransformer.desc"
}
},
"parent": "techreborn:lvtransformer",
"criteria": {
"mvtransformer": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:mv_transformer"]
}
]
}
},
"hvtransformer": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:hv_transformer"]
}
]
}
},
"evtransformer": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:ev_transformer"]
}
]
}
}
},
"requirements": [
["mvtransformer", "hvtransformer","evtransformer"]
]
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:grinder"
},
"title": {
"translate": "advancements.techreborn.grinder"
},
"description": {
"translate": "advancements.techreborn.grinder.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:grinder"]
}
]
}
}
}
}

View file

@ -1,23 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:implosion_compressor"
},
"title": {
"translate": "advancements.techreborn.implosion"
},
"description": {
"translate": "advancements.techreborn.implosion.desc"
},
"frame": "goal"
},
"parent": "techreborn:industrialgrinder",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:implosion_compressor"
}
}
}
}

View file

@ -1,27 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:industrial_grinder"
},
"title": {
"translate": "advancements.techreborn.industrialgrinder"
},
"description": {
"translate": "advancements.techreborn.industrialgrinder.desc"
},
"frame": "goal"
},
"parent": "techreborn:blastfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:industrial_grinder"]
}
]
}
}
}
}

View file

@ -1,23 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:lightning_rod"
},
"title": {
"translate": "advancements.techreborn.lightningrod"
},
"description": {
"translate": "advancements.techreborn.lightningrod.desc"
},
"frame": "goal"
},
"parent": "techreborn:generator",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:lightning_rod"
}
}
}
}

View file

@ -1,27 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:matter_fabricator"
},
"title": {
"translate": "advancements.techreborn.matterfabricator"
},
"description": {
"translate": "advancements.techreborn.matterfabricator.desc"
},
"frame": "challenge"
},
"parent": "techreborn:industrialmachineblock",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:matter_fabricator"]
}
]
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:nickel_nugget"
},
"title": {
"translate": "advancements.techreborn.nickelnugget"
},
"description": {
"translate": "advancements.techreborn.nickelnugget.desc"
}
},
"parent": "techreborn:industrialcentrifuge",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:nickel_nugget"]
}
]
}
}
}
}

View file

@ -1,60 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:quantum_chestplate"
},
"title": {
"translate": "advancements.techreborn.quantumarmor"
},
"description": {
"translate": "advancements.techreborn.quantumarmor.desc"
},
"frame": "goal"
},
"parent": "techreborn:implosion",
"criteria": {
"head": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:quantum_helmet"]
}
]
}
},
"chest": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:quantum_chestplate"]
}
]
}
},
"leg": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:quantum_leggings"]
}
]
}
},
"feet": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:quantum_boots"]
}
]
}
}
},
"requirements": [
["head", "chest","leg","feet"]
]
}

View file

@ -1,22 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:recycler"
},
"title": {
"translate": "advancements.techreborn.recycler"
},
"description": {
"translate": "advancements.techreborn.recycler.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:recycler"
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:rolling_machine"
},
"title": {
"translate": "advancements.techreborn.rollingmachine"
},
"description": {
"translate": "advancements.techreborn.rollingmachine.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:rolling_machine"]
}
]
}
}
}
}

View file

@ -1,27 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:scrapboxinator"
},
"title": {
"translate": "advancements.techreborn.scrapboxinator"
},
"description": {
"translate": "advancements.techreborn.scrapboxinator.desc"
},
"frame": "goal"
},
"parent": "techreborn:recycler",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:scrapboxinator"]
}
]
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:thermal_generator"
},
"title": {
"translate": "advancements.techreborn.thermalgenerator"
},
"description": {
"translate": "advancements.techreborn.thermalgenerator.desc"
}
},
"parent": "techreborn:generator",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:thermal_generator"]
}
]
}
}
}
}

View file

@ -1,22 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:water_mill"
},
"title": {
"translate": "advancements.techreborn.watermill"
},
"description": {
"translate": "advancements.techreborn.watermill.desc"
}
},
"parent": "techreborn:generator",
"criteria": {
"crit1": {
"trigger": "minecraft:placed_block",
"conditions": {
"block": "techreborn:water_mill"
}
}
}
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "techreborn:wire_mill"
},
"title": {
"translate": "advancements.techreborn.wiremill"
},
"description": {
"translate": "advancements.techreborn.wiremill.desc"
}
},
"parent": "techreborn:electricfurnace",
"criteria": {
"crit1": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": ["techreborn:wire_mill"]
}
]
}
}
}
}