diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index add14c8f1b..b05ce2034d 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -2594,6 +2594,24 @@ "fluid.tile.lava": "ɐʌɐꞀ", "fluid.tile.water": "ɹǝʇɐM", "fluid_cell.empty": "ʎʇdɯƎ", + "gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.desc": "˙pınןℲ pןoƆ ɟo ןןnɟ ǝdıԀ pınןℲ ɐ oʇ ǝıᗡ", + "gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.title": "¡pןoƆ buızǝǝɹℲ", + "gtceu.advancement.low_voltage.electrocution_death.desc": "˙ǝɹıM pǝʇɐןnsuıu∩ uɐ oʇ ǝıᗡ", + "gtceu.advancement.low_voltage.electrocution_death.title": "¡sǝɹıM ɹnoʎ pǝɹǝʌoƆ ɐpןnoɥS", + "gtceu.advancement.low_voltage.first_cover_place.desc": "˙ɹǝʌoƆ ǝuıɥɔɐW ʇsɹıɟ ɹnoʎ ǝɔɐןԀ", + "gtceu.advancement.low_voltage.first_cover_place.title": "ʎuɐW ɟo ʇsɹıℲ ǝɥ⟘", + "gtceu.advancement.root_lv.desc": "ǝuıqɹn⟘ ɯɐǝʇS ɔısɐᗺ ɐ ʇɟɐɹƆ", + "gtceu.advancement.root_lv.title": "ǝbɐʇןoΛ ʍoꞀ", + "gtceu.advancement.root_misc.desc": "sʇuǝɯǝʌǝıɥɔɐ snoǝuɐןןǝɔsıW", + "gtceu.advancement.root_misc.title": "ɔsıW", + "gtceu.advancement.root_steam.desc": "˙sʇobuı ɹǝddoɔ ʇsɹıɟ ɹnoʎ ɥʇıʍ suıbǝq buıɥʇʎɹǝʌƎ ¡ɥɔǝ⟘bǝɹ⅁ oʇ ǝɯoɔןǝM", + "gtceu.advancement.root_steam.title": "ǝbⱯ ɯɐǝʇS", + "gtceu.advancement.steam.fluid_pipe_death_heat.desc": "˙pınןℲ ʇoH ɟo ןןnɟ ǝdıԀ pınןℲ ɐ oʇ ǝıᗡ", + "gtceu.advancement.steam.fluid_pipe_death_heat.title": "¡ʇoH buıןıoᗺ", + "gtceu.advancement.steam.steam_vent_death.desc": "˙ǝuıɥɔɐW ɯɐǝʇS buıʇuǝʌ ɐ oʇ ǝıᗡ", + "gtceu.advancement.steam.steam_vent_death.title": "¡ʎɐʍ ǝɥʇ ɟo ʇno ʇǝ⅁", + "gtceu.advancement.ultimate_voltage.77_ultimate_battery.desc": "˙ʎɹǝʇʇɐᗺ ǝʇɐɯıʇן∩ uɐ ʇɟɐɹƆ", + "gtceu.advancement.ultimate_voltage.77_ultimate_battery.title": "¿ʍoN ʇɐɥM", "gtceu.air_scrubber": "ɹǝqqnɹɔS ɹıⱯ", "gtceu.alloy_blast_smelter": "ɹǝʇןǝɯS ʇsɐןᗺ ʎoןןⱯ", "gtceu.alloy_smelter": "ɹǝʇןǝɯS ʎoןןⱯ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 7c1eb46ed9..3139cf1e4c 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -2594,6 +2594,24 @@ "fluid.tile.lava": "Lava", "fluid.tile.water": "Water", "fluid_cell.empty": "Empty", + "gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.desc": "Die to a Fluid Pipe full of Cold Fluid.", + "gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.title": "Freezing Cold!", + "gtceu.advancement.low_voltage.electrocution_death.desc": "Die to an Uninsulated Wire.", + "gtceu.advancement.low_voltage.electrocution_death.title": "Shoulda Covered your Wires!", + "gtceu.advancement.low_voltage.first_cover_place.desc": "Place your first Machine Cover.", + "gtceu.advancement.low_voltage.first_cover_place.title": "The First of Many", + "gtceu.advancement.root_lv.desc": "Craft a Basic Steam Turbine", + "gtceu.advancement.root_lv.title": "Low Voltage", + "gtceu.advancement.root_misc.desc": "Miscellaneous achievements", + "gtceu.advancement.root_misc.title": "Misc", + "gtceu.advancement.root_steam.desc": "Welcome to GregTech! Everything begins with your first copper ingots.", + "gtceu.advancement.root_steam.title": "Steam Age", + "gtceu.advancement.steam.fluid_pipe_death_heat.desc": "Die to a Fluid Pipe full of Hot Fluid.", + "gtceu.advancement.steam.fluid_pipe_death_heat.title": "Boiling Hot!", + "gtceu.advancement.steam.steam_vent_death.desc": "Die to a venting Steam Machine.", + "gtceu.advancement.steam.steam_vent_death.title": "Get out of the way!", + "gtceu.advancement.ultimate_voltage.77_ultimate_battery.desc": "Craft an Ultimate Battery.", + "gtceu.advancement.ultimate_voltage.77_ultimate_battery.title": "What Now?", "gtceu.air_scrubber": "Air Scrubber", "gtceu.alloy_blast_smelter": "Alloy Blast Smelter", "gtceu.alloy_smelter": "Alloy Smelter", diff --git a/src/generated/resources/data/gtceu/advancements/low_voltage/electrocution_death.json b/src/generated/resources/data/gtceu/advancements/low_voltage/electrocution_death.json new file mode 100644 index 0000000000..d29648176f --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/low_voltage/electrocution_death.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "gt_placeholder_criteria": { + "trigger": "minecraft:impossible" + } + }, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.low_voltage.electrocution_death.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:terminal" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.low_voltage.electrocution_death.title" + } + }, + "requirements": [ + [ + "gt_placeholder_criteria" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/gtceu/advancements/low_voltage/first_cover_place.json b/src/generated/resources/data/gtceu/advancements/low_voltage/first_cover_place.json new file mode 100644 index 0000000000..b66599fa7c --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/low_voltage/first_cover_place.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "gt_placeholder_criteria": { + "trigger": "minecraft:impossible" + } + }, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.low_voltage.first_cover_place.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:item_filter" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.low_voltage.first_cover_place.title" + } + }, + "requirements": [ + [ + "gt_placeholder_criteria" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/gtceu/advancements/low_voltage/root.json b/src/generated/resources/data/gtceu/advancements/low_voltage/root.json new file mode 100644 index 0000000000..06b58678bb --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/low_voltage/root.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "gt_placeholder_criteria": { + "trigger": "minecraft:impossible" + } + }, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.root_lv.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:lv_machine_casing" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.root_lv.title" + } + }, + "requirements": [ + [ + "gt_placeholder_criteria" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/gtceu/advancements/misc/test.json b/src/generated/resources/data/gtceu/advancements/misc/test.json new file mode 100644 index 0000000000..22773f3806 --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/misc/test.json @@ -0,0 +1,21 @@ +{ + "criteria": {}, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.root_steam.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:lp_steam_solid_boiler" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.root_steam.title" + } + }, + "requirements": [], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/gtceu/advancements/steam/root.json b/src/generated/resources/data/gtceu/advancements/steam/root.json new file mode 100644 index 0000000000..ae19a73f81 --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/steam/root.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "gt_placeholder_criteria": { + "trigger": "minecraft:impossible" + } + }, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.root_steam.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:bronze_machine_casing" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.root_steam.title" + } + }, + "requirements": [ + [ + "gt_placeholder_criteria" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/generated/resources/data/gtceu/advancements/steam/steam_vent_death.json b/src/generated/resources/data/gtceu/advancements/steam/steam_vent_death.json new file mode 100644 index 0000000000..7d3e0b53a0 --- /dev/null +++ b/src/generated/resources/data/gtceu/advancements/steam/steam_vent_death.json @@ -0,0 +1,29 @@ +{ + "criteria": { + "gt_placeholder_criteria": { + "trigger": "minecraft:impossible" + } + }, + "display": { + "announce_to_chat": true, + "background": "gtceu:textures/gui/advancements/background.png", + "description": { + "translate": "gtceu.advancement.steam.85_steam_vent_death.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "gtceu:item_detector_cover" + }, + "show_toast": true, + "title": { + "translate": "gtceu.advancement.steam.85_steam_vent_death.title" + } + }, + "requirements": [ + [ + "gt_placeholder_criteria" + ] + ], + "sends_telemetry_event": true +} \ No newline at end of file diff --git a/src/main/java/com/gregtechceu/gtceu/api/capability/ICoverable.java b/src/main/java/com/gregtechceu/gtceu/api/capability/ICoverable.java index f621ef1d77..100d7ce132 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/capability/ICoverable.java +++ b/src/main/java/com/gregtechceu/gtceu/api/capability/ICoverable.java @@ -1,15 +1,15 @@ package com.gregtechceu.gtceu.api.capability; +import com.gregtechceu.gtceu.GTCEu; import com.gregtechceu.gtceu.api.block.IAppearance; import com.gregtechceu.gtceu.api.blockentity.ITickSubscription; import com.gregtechceu.gtceu.api.cover.CoverBehavior; import com.gregtechceu.gtceu.api.cover.CoverDefinition; +import com.gregtechceu.gtceu.utils.AdvancementUtil; import com.gregtechceu.gtceu.utils.GTUtil; - import com.lowdragmc.lowdraglib.LDLib; import com.lowdragmc.lowdraglib.side.fluid.IFluidTransfer; import com.lowdragmc.lowdraglib.side.item.IItemTransfer; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerPlayer; @@ -24,7 +24,6 @@ import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; - import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -92,8 +91,7 @@ default boolean placeCoverOnSide(Direction side, ItemStack itemStack, CoverDefin notifyBlockUpdate(); markDirty(); scheduleNeighborShapeUpdate(); - // TODO achievement - // AdvancementTriggers.FIRST_COVER_PLACE.trigger((PlayerMP) player); + AdvancementUtil.awardAdvancement(player, GTCEu.id("low_voltage/first_cover_place"), "gt_placeholder_criteria"); return true; } diff --git a/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IExhaustVentMachine.java b/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IExhaustVentMachine.java index 3724918d84..074599d1a9 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IExhaustVentMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IExhaustVentMachine.java @@ -3,11 +3,12 @@ import com.gregtechceu.gtceu.GTCEu; import com.gregtechceu.gtceu.common.data.GTDamageTypes; import com.gregtechceu.gtceu.config.ConfigHolder; - +import com.gregtechceu.gtceu.data.advancements.SteamAdvancements; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.entity.LivingEntity; @@ -16,7 +17,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.shapes.Shapes; - import org.jetbrains.annotations.NotNull; /** @@ -108,10 +108,9 @@ default void doVentingDamage(@NotNull Level level, @NotNull BlockPos pos) { new AABB(pos.relative(getVentingDirection())), entity -> !(entity instanceof Player player) || !player.isSpectator() && !player.isCreative())) { entity.hurt(GTDamageTypes.HEAT.source(level), getVentingDamage()); - // TODO ADVANCEMENT - // if (entity instanceof ServerPlayer) { - // AdvancementTriggers.STEAM_VENT_DEATH.trigger((ServerPlayer) entity); - // } + if (this instanceof ServerPlayer player) { + player.getAdvancements().award(SteamAdvancements.STEAM_VENT_DEATH, "gt_placeholder_criteria"); + } } } diff --git a/src/main/java/com/gregtechceu/gtceu/common/block/CableBlock.java b/src/main/java/com/gregtechceu/gtceu/common/block/CableBlock.java index 03bf79b543..c2e358a88d 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/block/CableBlock.java +++ b/src/main/java/com/gregtechceu/gtceu/common/block/CableBlock.java @@ -16,6 +16,7 @@ import com.gregtechceu.gtceu.common.data.GTDamageTypes; import com.gregtechceu.gtceu.common.pipelike.cable.Insulation; import com.gregtechceu.gtceu.common.pipelike.cable.LevelEnergyNet; +import com.gregtechceu.gtceu.data.advancements.LVAdvancements; import com.gregtechceu.gtceu.utils.GTUtil; import net.minecraft.MethodsReturnNonnullByDefault; @@ -135,9 +136,8 @@ public void entityInside(BlockState state, Level level, BlockPos pos, Entity ent if (voltage > 0L && amperage > 0L) { float damageAmount = (float) ((GTUtil.getTierByVoltage(voltage) + 1) * amperage * 4); entityLiving.hurt(GTDamageTypes.ELECTRIC.source(level), damageAmount); - if (entityLiving instanceof ServerPlayer) { - // TODO advancments - // AdvancementTriggers.ELECTROCUTION_DEATH.trigger((EntityPlayerMP) entityLiving); + if (entityLiving instanceof ServerPlayer player) { + player.getAdvancements().award(LVAdvancements.ELECTROCUTION_DEATH, "gt_placeholder_criteria"); } } } diff --git a/src/main/java/com/gregtechceu/gtceu/data/GregTechDatagen.java b/src/main/java/com/gregtechceu/gtceu/data/GregTechDatagen.java index 3552b0994e..8b42f182b6 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/GregTechDatagen.java +++ b/src/main/java/com/gregtechceu/gtceu/data/GregTechDatagen.java @@ -1,6 +1,7 @@ package com.gregtechceu.gtceu.data; import com.gregtechceu.gtceu.common.registry.GTRegistration; +import com.gregtechceu.gtceu.data.advancements.AdvancementsHandler; import com.gregtechceu.gtceu.data.lang.LangHandler; import com.gregtechceu.gtceu.data.tags.TagsHandler; @@ -19,5 +20,6 @@ public static void init() { GTRegistration.REGISTRATE.addDataGenerator(ProviderType.FLUID_TAGS, TagsHandler::initFluid); GTRegistration.REGISTRATE.addDataGenerator(ProviderType.ENTITY_TAGS, TagsHandler::initEntity); GTRegistration.REGISTRATE.addDataGenerator(ProviderType.LANG, LangHandler::init); + GTRegistration.REGISTRATE.addDataGenerator(ProviderType.ADVANCEMENT, AdvancementsHandler::init); } } diff --git a/src/main/java/com/gregtechceu/gtceu/data/advancements/AdvancementsHandler.java b/src/main/java/com/gregtechceu/gtceu/data/advancements/AdvancementsHandler.java new file mode 100644 index 0000000000..851a0a1581 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/advancements/AdvancementsHandler.java @@ -0,0 +1,14 @@ +package com.gregtechceu.gtceu.data.advancements; + +import com.tterrag.registrate.providers.RegistrateAdvancementProvider; + +public class AdvancementsHandler { + + public static void init(RegistrateAdvancementProvider provider) { + RootAdvancements.init(provider); + SteamAdvancements.init(provider); + LVAdvancements.init(provider); + MiscAdvancements.init(provider); + + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/advancements/LVAdvancements.java b/src/main/java/com/gregtechceu/gtceu/data/advancements/LVAdvancements.java new file mode 100644 index 0000000000..3b781ef09d --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/advancements/LVAdvancements.java @@ -0,0 +1,50 @@ +package com.gregtechceu.gtceu.data.advancements; + +import com.gregtechceu.gtceu.GTCEu; +import com.gregtechceu.gtceu.common.data.GTItems; + +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.FrameType; +import net.minecraft.advancements.critereon.ImpossibleTrigger; +import net.minecraft.network.chat.Component; + +import com.tterrag.registrate.providers.RegistrateAdvancementProvider; +import net.minecraft.resources.ResourceLocation; + +public class LVAdvancements { + + public static Advancement FIRST_COVER_PLACE; + public static Advancement ELECTROCUTION_DEATH; + + public static void init(RegistrateAdvancementProvider provider) { + provider.accept(FIRST_COVER_PLACE = Advancement.Builder.advancement() + .display( + GTItems.ITEM_FILTER.asItem(), + Component.translatable("gtceu.advancement.low_voltage.first_cover_place.title"), + Component.translatable("gtceu.advancement.low_voltage.first_cover_place.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .addCriterion("gt_placeholder_criteria", new ImpossibleTrigger.TriggerInstance()) +// .parent(GTCEu.id("low_voltage/root")) + .build(GTCEu.id("low_voltage/first_cover_place")) + ); + + provider.accept(ELECTROCUTION_DEATH = Advancement.Builder.advancement() + .display( + GTItems.TERMINAL.asItem(), + Component.translatable("gtceu.advancement.low_voltage.electrocution_death.title"), + Component.translatable("gtceu.advancement.low_voltage.electrocution_death.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .addCriterion("gt_placeholder_criteria", new ImpossibleTrigger.TriggerInstance()) +// .parent(GTCEu.id("low_voltage/root")) + .build(GTCEu.id("low_voltage/electrocution_death")) + ); + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/advancements/MiscAdvancements.java b/src/main/java/com/gregtechceu/gtceu/data/advancements/MiscAdvancements.java new file mode 100644 index 0000000000..68615d7433 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/advancements/MiscAdvancements.java @@ -0,0 +1,31 @@ +package com.gregtechceu.gtceu.data.advancements; + +import com.gregtechceu.gtceu.GTCEu; +import com.gregtechceu.gtceu.common.data.GTMachines; + +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.FrameType; +import net.minecraft.network.chat.Component; + +import com.tterrag.registrate.providers.RegistrateAdvancementProvider; +import net.minecraft.resources.ResourceLocation; + +public class MiscAdvancements { + + public static Advancement testAdvancement; + + public static void init(RegistrateAdvancementProvider provider) { + provider.accept(testAdvancement = Advancement.Builder.advancement() + .display( + GTMachines.STEAM_SOLID_BOILER.first().getBlock(), + Component.translatable("gtceu.advancement.root_steam.title"), + Component.translatable("gtceu.advancement.root_steam.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .build(GTCEu.id("misc/test")) + ); + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/advancements/RootAdvancements.java b/src/main/java/com/gregtechceu/gtceu/data/advancements/RootAdvancements.java new file mode 100644 index 0000000000..df85336c06 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/advancements/RootAdvancements.java @@ -0,0 +1,44 @@ +package com.gregtechceu.gtceu.data.advancements; + +import com.gregtechceu.gtceu.GTCEu; +import com.gregtechceu.gtceu.common.data.GTBlocks; +import com.tterrag.registrate.providers.RegistrateAdvancementProvider; +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.FrameType; +import net.minecraft.advancements.critereon.ImpossibleTrigger; +import net.minecraft.network.chat.Component; + +public class RootAdvancements { + public static Advancement ROOT_STEAM; + public static Advancement ROOT_LV; + + public static void init(RegistrateAdvancementProvider provider) { + provider.accept(ROOT_STEAM = Advancement.Builder.advancement() + .display( + GTBlocks.BRONZE_HULL.asItem(), + Component.translatable("gtceu.advancement.root_steam.title"), + Component.translatable("gtceu.advancement.root_steam.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .addCriterion("gt_placeholder_criteria", new ImpossibleTrigger.TriggerInstance()) + .build(GTCEu.id("steam/root")) + ); + + provider.accept(ROOT_LV = Advancement.Builder.advancement() + .display( + GTBlocks.MACHINE_CASING_LV.asItem(), + Component.translatable("gtceu.advancement.root_lv.title"), + Component.translatable("gtceu.advancement.root_lv.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .addCriterion("gt_placeholder_criteria", new ImpossibleTrigger.TriggerInstance()) + .build(GTCEu.id("low_voltage/root")) + ); + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/advancements/SteamAdvancements.java b/src/main/java/com/gregtechceu/gtceu/data/advancements/SteamAdvancements.java new file mode 100644 index 0000000000..2990a2bcef --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/data/advancements/SteamAdvancements.java @@ -0,0 +1,32 @@ +package com.gregtechceu.gtceu.data.advancements; + +import com.gregtechceu.gtceu.GTCEu; +import com.gregtechceu.gtceu.common.data.GTItems; + +import com.tterrag.registrate.providers.RegistrateAdvancementProvider; + +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.FrameType; +import net.minecraft.advancements.critereon.ImpossibleTrigger; +import net.minecraft.network.chat.Component; + +public class SteamAdvancements { + public static Advancement STEAM_VENT_DEATH; + + public static void init(RegistrateAdvancementProvider provider) { + provider.accept(STEAM_VENT_DEATH = Advancement.Builder.advancement() + .display( + GTItems.COVER_ITEM_DETECTOR.asItem(), + Component.translatable("gtceu.advancement.steam.85_steam_vent_death.title"), + Component.translatable("gtceu.advancement.steam.85_steam_vent_death.desc"), + GTCEu.id("textures/gui/advancements/background.png"), + FrameType.TASK, + true, + true, + false) + .addCriterion("gt_placeholder_criteria", new ImpossibleTrigger.TriggerInstance()) +// .parent(GTCEu.id("steam/root")) + .build(GTCEu.id("steam/steam_vent_death")) + ); + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/AdvancementLang.java b/src/main/java/com/gregtechceu/gtceu/data/lang/AdvancementLang.java index e459867837..e3bd68bc76 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/AdvancementLang.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/AdvancementLang.java @@ -5,233 +5,232 @@ public class AdvancementLang { public static void init(RegistrateLangProvider provider) { - // todo advancements - /* - * provider.add("gtceu.advancement.root_steam.name", "Steam Age"); - * provider.add("gtceu.advancement.root_steam.desc", - * "Welcome to GregTech! Everything begins with your first copper ingots."); - * provider.add("gtceu.advancement.steam.1_first_tools.name", "First Tools"); - * provider.add("gtceu.advancement.steam.1_first_tools.desc", "Craft a Hammer."); - * provider.add("gtceu.advancement.steam.2_more_tools.name", "More Tools"); - * provider.add("gtceu.advancement.steam.2_more_tools.desc", "Craft a Wrench."); - * provider.add("gtceu.advancement.steam.3_bronze_dust.name", "Bronze"); - * provider.add("gtceu.advancement.steam.3_bronze_dust.desc", "Craft bronze dust."); - * provider.add("gtceu.advancement.steam.4_bronze_boiler.name", "First Steam"); - * provider.add("gtceu.advancement.steam.4_bronze_boiler.desc", "Craft a Bronze Boiler."); - * provider.add("gtceu.advancement.steam.5_bronze_forge_hammer.name", "Cheaper than a Macerator"); - * provider.add("gtceu.advancement.steam.5_bronze_forge_hammer.desc", "Craft a Steam Forge Hammer."); - * provider.add("gtceu.advancement.steam.6_bronze_alloy_smelter.name", "Alloy Smelter"); - * provider.add("gtceu.advancement.steam.6_bronze_alloy_smelter.desc", "Craft a Steam Alloy Smelter."); - * provider.add("gtceu.advancement.steam.7_bronze_extractor.name", "Extract"); - * provider.add("gtceu.advancement.steam.7_bronze_extractor.desc", "Craft a Steam Extractor."); - * provider.add("gtceu.advancement.steam.8_bronze_solar_boiler.name", "Simply Eco"); - * provider.add("gtceu.advancement.steam.8_bronze_solar_boiler.desc", "Craft a Solar Boiler."); - * provider.add("gtceu.advancement.steam.9_coke_oven.name", "Coke Oven"); - * provider.add("gtceu.advancement.steam.9_coke_oven.desc", "Craft a Coke Oven."); - * provider.add("gtceu.advancement.steam.10_vacuum_tube.name", "Tubes"); - * provider.add("gtceu.advancement.steam.10_vacuum_tube.desc", "Craft a Vacuum Tube."); - * provider.add("gtceu.advancement.steam.11_rubber.name", "Rubber"); - * provider.add("gtceu.advancement.steam.11_rubber.desc", - * "Make Rubber in an alloy smelter using Sulfur and Raw Rubber Pulp, obtained from Rubber Trees."); - * provider.add("gtceu.advancement.steam.12_electronic_circuit.name", "Basic Circuit"); - * provider.add("gtceu.advancement.steam.12_electronic_circuit.desc", "Craft an Electronic Circuit."); - * provider.add("gtceu.advancement.steam.13_steel.name", "Steel"); - * provider.add("gtceu.advancement.steam.13_steel.desc", "Produce Steel in a Primitive Blast Furnace."); - * provider.add("gtceu.advancement.steam.14_magnetic_iron.name", "Magnetic Iron"); - * provider.add("gtceu.advancement.steam.14_magnetic_iron.desc", "Craft a Magnetic Iron Rod with 4 Redstone."); - * provider.add("gtceu.advancement.steam.15_lv_motor.name", "Low Voltage Motor"); - * provider.add("gtceu.advancement.steam.15_lv_motor.desc", "Craft a Low Voltage Motor."); - * provider.add("gtceu.advancement.steam.16_steel_boiler.name", "High Pressure"); - * provider.add("gtceu.advancement.steam.16_steel_boiler.desc", "Craft a High Pressure Boiler."); - * provider.add("gtceu.advancement.steam.81_crafting_station.name", "Crafting Station"); - * provider.add("gtceu.advancement.steam.81_crafting_station.desc", - * "Craft a Crafting Station to make complex crafts much more manageable."); - * provider.add("gtceu.advancement.steam.83_hp_solar_boiler.name", "Solar OP Pls Nerf"); - * provider.add("gtceu.advancement.steam.83_hp_solar_boiler.desc", "Craft a High Pressure Solar Boiler."); - * provider.add("gtceu.advancement.steam.85_steam_vent_death.name", "Get out of the way!"); - * provider.add("gtceu.advancement.steam.85_steam_vent_death.desc", "Die to a venting Steam Machine."); - * provider.add("gtceu.advancement.steam.87_fluid_pipe_death_heat.name", "Boiling Hot!"); - * provider.add("gtceu.advancement.steam.87_fluid_pipe_death_heat.desc", - * "Die to a Fluid Pipe full of Hot Fluid."); - * provider.add("gtceu.advancement.steam.90_primitive_pump.name", "Primitive Water Pump"); - * provider.add("gtceu.advancement.steam.90_primitive_pump.desc", - * "Craft a Primitive Water Pump for early water gathering."); - * provider.add("gtceu.advancement.root_lv.name", "Low Voltage"); - * provider.add("gtceu.advancement.root_lv.desc", "Craft a Basic Steam Turbine"); - * provider.add("gtceu.advancement.low_voltage.17_lv_pump.name", "Pump"); - * provider.add("gtceu.advancement.low_voltage.17_lv_pump.desc", "Craft an LV Pump."); - * provider.add("gtceu.advancement.low_voltage.18_shutter_cover.name", "Close it!"); - * provider.add("gtceu.advancement.low_voltage.18_shutter_cover.desc", "Get a Shutter Cover."); - * provider.add("gtceu.advancement.low_voltage.19_lv_pump_block.name", "Slurp"); - * provider.add("gtceu.advancement.low_voltage.19_lv_pump_block.desc", "Craft a Basic Pump."); - * provider.add("gtceu.advancement.low_voltage.20_lv_conveyor.name", "Transport"); - * provider.add("gtceu.advancement.low_voltage.20_lv_conveyor.desc", "Craft an LV Conveyor."); - * provider.add("gtceu.advancement.low_voltage.21_machine_controller_cover.name", "Manipulation"); - * provider.add("gtceu.advancement.low_voltage.21_machine_controller_cover.desc", "Get a Machine Controller."); - * provider.add("gtceu.advancement.low_voltage.22_lv_robot_arm.name", "Complex Machines"); - * provider.add("gtceu.advancement.low_voltage.22_lv_robot_arm.desc", "Craft an LV Robot Arm."); - * provider.add("gtceu.advancement.low_voltage.23_lv_assembler.name", "Avengers, Assemble!"); - * provider.add("gtceu.advancement.low_voltage.23_lv_assembler.desc", "Craft an LV Assembler."); - * provider.add("gtceu.advancement.low_voltage.24_smart_filter.name", "Filter and Regulate"); - * provider.add("gtceu.advancement.low_voltage.24_smart_filter.desc", "Get a Smart Filter."); - * provider.add("gtceu.advancement.low_voltage.25_large_boiler.name", "Extreme Pressure"); - * provider.add("gtceu.advancement.low_voltage.25_large_boiler.desc", "Set up a Large Boiler."); - * provider.add("gtceu.advancement.low_voltage.26_arc_furnace.name", "Recycling"); - * provider.add("gtceu.advancement.low_voltage.26_arc_furnace.desc", "Craft an Arc Furnace."); - * provider.add("gtceu.advancement.low_voltage.27_electric_blast_furnace.name", "Electric Blast Furnace"); - * provider.add("gtceu.advancement.low_voltage.27_electric_blast_furnace.desc", - * "Craft an Electric Blast Furnace."); - * provider.add("gtceu.advancement.low_voltage.28_lv_energy_hatch.name", "You Need Two Of Them"); - * provider.add("gtceu.advancement.low_voltage.28_lv_energy_hatch.desc", "Craft an LV Energy Hatch."); - * provider.add("gtceu.advancement.low_voltage.29_lv_battery_buffer.name", "Batteries"); - * provider.add("gtceu.advancement.low_voltage.29_lv_battery_buffer.desc", "Craft an LV 4A Battery Buffer."); - * provider.add("gtceu.advancement.low_voltage.30_good_electronic_circuit.name", "Better Circuits"); - * provider.add("gtceu.advancement.low_voltage.30_good_electronic_circuit.desc", "Get Good Circuits."); - * provider.add("gtceu.advancement.low_voltage.86_electrocution_death.name", "Shoulda Covered your Wires!"); - * provider.add("gtceu.advancement.low_voltage.86_electrocution_death.desc", "Die to an Uninsulated Wire."); - * provider.add("gtceu.advancement.low_voltage.88_first_cover_place.name", "The First of Many"); - * provider.add("gtceu.advancement.low_voltage.88_first_cover_place.desc", "Place your first Machine Cover."); - * provider.add("gtceu.advancement.root_mv.name", "Medium Voltage"); - * provider.add("gtceu.advancement.root_mv.desc", "Produce an Aluminium Ingot."); - * provider.add("gtceu.advancement.medium_voltage.31_mv_energy_hatch.name", "Upgrade Your EBF"); - * provider.add("gtceu.advancement.medium_voltage.31_mv_energy_hatch.desc", "Craft an MV Energy Hatch."); - * provider.add("gtceu.advancement.medium_voltage.32_electric_drill.name", "Drill Time"); - * provider.add("gtceu.advancement.medium_voltage.32_electric_drill.desc", "Craft a Drill."); - * provider.add("gtceu.advancement.medium_voltage.33_chainsaw.name", "Brrrr..."); - * provider.add("gtceu.advancement.medium_voltage.33_chainsaw.desc", "Craft a Chainsaw."); - * provider.add("gtceu.advancement.medium_voltage.34_silicon_boule.name", "Monocrystalline Silicon Boule"); - * provider.add("gtceu.advancement.medium_voltage.34_silicon_boule.desc", - * "Produce a Monocrystalline Silicon Boule."); - * provider.add("gtceu.advancement.medium_voltage.35_logic_circuit_wafer.name", "Logic Circuit Wafer"); - * provider.add("gtceu.advancement.medium_voltage.35_logic_circuit_wafer.desc", - * "Produce a Logic Circuit Wafer."); - * provider.add("gtceu.advancement.medium_voltage.36_integrated_logic_circuit.name", - * "Integrated Logic Circuit"); - * provider.add("gtceu.advancement.medium_voltage.36_integrated_logic_circuit.desc", - * "Produce an Integrated Logic Circuit."); - * provider.add("gtceu.advancement.medium_voltage.37_advanced_integrated_logic_circuit.name", "Step Forward"); - * provider.add("gtceu.advancement.medium_voltage.37_advanced_integrated_logic_circuit.desc", - * "Obtain Advanced Circuits."); - * provider.add("gtceu.advancement.medium_voltage.38_super_chest.name", "New Storage"); - * provider.add("gtceu.advancement.medium_voltage.38_super_chest.desc", "Craft a Super Chest I."); - * provider.add("gtceu.advancement.medium_voltage.39_super_tank.name", "Where is the Ocean?"); - * provider.add("gtceu.advancement.medium_voltage.39_super_tank.desc", "Build a Super Tank I."); - * provider.add("gtceu.advancement.root_hv.name", "High Voltage"); - * provider.add("gtceu.advancement.root_hv.desc", "Produce a Stainless Steel Ingot."); - * provider.add("gtceu.advancement.high_voltage.40_workstation.name", "Workstations"); - * provider.add("gtceu.advancement.high_voltage.40_workstation.desc", "Get Workstations."); - * provider.add("gtceu.advancement.high_voltage.41_vacuum_freezer.name", "Vacuum Freezer"); - * provider.add("gtceu.advancement.high_voltage.41_vacuum_freezer.desc", "Set up a Vacuum Freezer."); - * provider.add("gtceu.advancement.high_voltage.42_kanthal_coil.name", "Upgrade your Coils to Level II"); - * provider.add("gtceu.advancement.high_voltage.42_kanthal_coil.desc", "Craft a Kanthal Heating Coil."); - * provider.add("gtceu.advancement.high_voltage.43_multi_smelter.name", "High Power Smelter"); - * provider.add("gtceu.advancement.high_voltage.43_multi_smelter.desc", "Set up a Multi Smelter."); - * provider.add("gtceu.advancement.high_voltage.44_distillation_tower.name", "Oil Plant"); - * provider.add("gtceu.advancement.high_voltage.44_distillation_tower.desc", "Start up a Distillation Tower."); - * provider.add("gtceu.advancement.high_voltage.45_large_steam_turbine.name", "So Much Steam"); - * provider.add("gtceu.advancement.high_voltage.45_large_steam_turbine.desc", - * "Start up a Large Steam Turbine."); - * provider.add("gtceu.advancement.high_voltage.46_hv_macerator.name", "Universal Macerator"); - * provider.add("gtceu.advancement.high_voltage.46_hv_macerator.desc", - * "Craft an HV Macerator for ore byproducts."); - * provider.add("gtceu.advancement.high_voltage.82_large_chemical_reactor.name", "Large Chemical Reactor"); - * provider.add("gtceu.advancement.high_voltage.82_large_chemical_reactor.desc", - * "Set up a Large Chemical Reactor for more efficient chemistry."); - * provider.add("gtceu.advancement.high_voltage.84_rotor_holder_open.name", "A Painful Way to Go Out"); - * provider.add("gtceu.advancement.high_voltage.84_rotor_holder_open.desc", - * "Die by opening a spinning Rotor Holder."); - * provider.add("gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.name", "Freezing Cold!"); - * provider.add("gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.desc", - * "Die to a Fluid Pipe full of Cold Fluid."); - * provider.add("gtceu.advancement.root_ev.name", "Extreme Voltage"); - * provider.add("gtceu.advancement.root_ev.desc", "Cool down a Hot Titanium Ingot."); - * provider.add("gtceu.advancement.extreme_voltage.47_nichrome_coil.name", "Upgrade your Coils to Level III"); - * provider.add("gtceu.advancement.extreme_voltage.47_nichrome_coil.desc", "Craft a Nichrome Heating Coil."); - * provider.add("gtceu.advancement.extreme_voltage.48_osmium.name", "Osmium"); - * provider.add("gtceu.advancement.extreme_voltage.48_osmium.desc", "Cool down a Hot Osmium Ingot."); - * provider.add("gtceu.advancement.extreme_voltage.49_nano_cpu_wafer.name", "Nano CPU Wafer"); - * provider.add("gtceu.advancement.extreme_voltage.49_nano_cpu_wafer.desc", "Produce a Nano CPU Wafer."); - * provider.add("gtceu.advancement.extreme_voltage.50_nano_processor.name", "Nano Processor"); - * provider.add("gtceu.advancement.extreme_voltage.50_nano_processor.desc", "Get Nano Processors."); - * provider.add("gtceu.advancement.extreme_voltage.51_large_combustion_engine.name", "Large Combustion Engine"); - * provider.add("gtceu.advancement.extreme_voltage.51_large_combustion_engine.desc", - * "Set up a Large Combustion Engine, supply it with Lubricant, and boost it with Oxygen."); - * provider.add("gtceu.advancement.extreme_voltage.52_soc_wafer.name", "SoC Wafer"); - * provider.add("gtceu.advancement.extreme_voltage.52_soc_wafer.desc", - * "Produce an SoC Wafer to make cheaper Basic and Good Circuits."); - * provider.add("gtceu.advancement.root_iv.name", "Insane Voltage"); - * provider.add("gtceu.advancement.root_iv.desc", "Cool down a Hot Tungstensteel Ingot."); - * provider.add("gtceu.advancement.insane_voltage.53_plutonium_239.name", "Plutonium 239"); - * provider.add("gtceu.advancement.insane_voltage.53_plutonium_239.desc", - * "Obtain Plutonium 239 for a source of radon."); - * provider.add("gtceu.advancement.insane_voltage.54_indium.name", "Indium"); - * provider.add("gtceu.advancement.insane_voltage.54_indium.desc", "Obtain Indium from Sphalerite and Galena."); - * provider.add("gtceu.advancement.insane_voltage.55_qbit_cpu_wafer.name", "QBit CPU Wafer"); - * provider.add("gtceu.advancement.insane_voltage.55_qbit_cpu_wafer.desc", "Produce a QBit CPU Wafer."); - * provider.add("gtceu.advancement.insane_voltage.56_quantum_processor.name", "Quantum Processor"); - * provider.add("gtceu.advancement.insane_voltage.56_quantum_processor.desc", "Get Quantum Processors."); - * provider.add("gtceu.advancement.insane_voltage.57_tungstensteel_coil.name", - * "Upgrade your Coils to Level IV"); - * provider.add("gtceu.advancement.insane_voltage.57_tungstensteel_coil.desc", - * "Craft an RTM Alloy Heating Coil."); - * provider.add("gtceu.advancement.insane_voltage.58_hss_g_coil.name", "Upgrade your Coils to Level V"); - * provider.add("gtceu.advancement.insane_voltage.58_hss_g_coil.desc", "Craft an HSS-G Heating Coil."); - * provider.add("gtceu.advancement.root_luv.name", "Ludicrous Voltage"); - * provider.add("gtceu.advancement.root_luv.desc", "Set up an Assembly Line."); - * provider.add("gtceu.advancement.ludicrous_voltage.59_superconducting_coil.name", "Conducting"); - * provider.add("gtceu.advancement.ludicrous_voltage.59_superconducting_coil.desc", - * "Craft a Superconducting Coil."); - * provider.add("gtceu.advancement.ludicrous_voltage.60_fusion.name", "Fusion Reactor"); - * provider.add("gtceu.advancement.ludicrous_voltage.60_fusion.desc", "Set up a Fusion Reactor Mark 1."); - * provider.add("gtceu.advancement.ludicrous_voltage.61_europium.name", "Advancement in Technology"); - * provider.add("gtceu.advancement.ludicrous_voltage.61_europium.desc", "Produce Europium."); - * provider.add("gtceu.advancement.ludicrous_voltage.62_raw_crystal_chip.name", "Raw Crystal Chip"); - * provider.add("gtceu.advancement.ludicrous_voltage.62_raw_crystal_chip.desc", "Produce a Raw Crystal Chip."); - * provider.add("gtceu.advancement.ludicrous_voltage.63_crystal_processing_unit.name", - * "Crystal Processing Unit"); - * provider.add("gtceu.advancement.ludicrous_voltage.63_crystal_processing_unit.desc", - * "Produce a Crystal Processing Unit."); - * provider.add("gtceu.advancement.ludicrous_voltage.64_crystal_processor.name", "Crystal Processor"); - * provider.add("gtceu.advancement.ludicrous_voltage.64_crystal_processor.desc", "Get Crystal Processors."); - * provider.add("gtceu.advancement.ludicrous_voltage.65_naquadah.name", "Stargate Material"); - * provider.add("gtceu.advancement.ludicrous_voltage.65_naquadah.desc", "Cool down a Hot Naquadah Ingot."); - * provider.add("gtceu.advancement.ludicrous_voltage.66_naquadah_coil.name", "Upgrade your Coils to Level VI"); - * provider.add("gtceu.advancement.ludicrous_voltage.66_naquadah_coil.desc", "Craft a Naquadah Heating Coil."); - * provider.add("gtceu.advancement.ludicrous_voltage.67_asoc_wafer.name", "ASoC Wafer"); - * provider.add("gtceu.advancement.ludicrous_voltage.67_asoc_wafer.desc", - * "Produce an ASoC Wafer to make cheaper Extreme and Advanced Circuits."); - * provider.add("gtceu.advancement.ludicrous_voltage.68_large_plasma_turbine.name", "Large Plasma Turbine"); - * provider.add("gtceu.advancement.ludicrous_voltage.68_large_plasma_turbine.desc", - * "Craft a Plasma Turbine to turn Plasma into Usable Fluid."); - * provider.add("gtceu.advancement.root_zpm.name", "Zero Point Module"); - * provider.add("gtceu.advancement.root_zpm.desc", "Set up a Fusion Reactor Mark 2."); - * provider.add("gtceu.advancement.zero_point_module.69_americium.name", "Going for the Limit"); - * provider.add("gtceu.advancement.zero_point_module.69_americium.desc", "Produce Americium."); - * provider.add("gtceu.advancement.zero_point_module.70_stem_cells.name", "Stem Cells"); - * provider.add("gtceu.advancement.zero_point_module.70_stem_cells.desc", "Produce Stem Cells."); - * provider.add("gtceu.advancement.zero_point_module.71_neuro_processing_unit.name", "Neuro Processing Unit"); - * provider.add("gtceu.advancement.zero_point_module.71_neuro_processing_unit.desc", - * "Produce a Neuro Processing Unit."); - * provider.add("gtceu.advancement.zero_point_module.72_wetware_processor.name", "Wetware Processor"); - * provider.add("gtceu.advancement.zero_point_module.72_wetware_processor.desc", "Get Wetware Processors."); - * provider.add("gtceu.advancement.zero_point_module.73_trinium_coil.name", "Over 9000!"); - * provider.add("gtceu.advancement.zero_point_module.73_trinium_coil.desc", "Craft a Trinium Heating Coil."); - * provider.add("gtceu.advancement.root_uv.name", "Ultimate Voltage"); - * provider.add("gtceu.advancement.root_uv.desc", "Produce Tritanium."); - * provider.add("gtceu.advancement.ultimate_voltage.74_wetware_mainframe.name", "Wetware Mainframe"); - * provider.add("gtceu.advancement.ultimate_voltage.74_wetware_mainframe.desc", "Get a Wetware Mainframe."); - * provider.add("gtceu.advancement.ultimate_voltage.75_fusion_reactor_3.name", "A Sun Down on Earth"); - * provider.add("gtceu.advancement.ultimate_voltage.75_fusion_reactor_3.desc", - * "Set up a Fusion Reactor Mark 3."); - * provider.add("gtceu.advancement.ultimate_voltage.76_neutronium.name", "As Dense As Possible"); - * provider.add("gtceu.advancement.ultimate_voltage.76_neutronium.desc", "Produce Neutronium."); - * provider.add("gtceu.advancement.ultimate_voltage.77_ultimate_battery.name", "What Now?"); - * provider.add("gtceu.advancement.ultimate_voltage.77_ultimate_battery.desc", "Craft an Ultimate Battery."); - * provider.add("gtceu.advancement.ultimate_voltage.78_hasoc_wafer.name", "HASoC Wafer"); - * provider.add("gtceu.advancement.ultimate_voltage.78_hasoc_wafer.desc", - * "Produce an HASoC Wafer to make cheaper Master Circuits."); - * provider.add("gtceu.advancement.ultimate_voltage.79_tritanium_coil.name", "The Final Coil"); - * provider.add("gtceu.advancement.ultimate_voltage.79_tritanium_coil.desc", "Craft a Tritanium Heating Coil."); - */ + provider.add("gtceu.advancement.root_misc.title", "Misc"); + provider.add("gtceu.advancement.root_misc.desc", "Miscellaneous achievements"); + provider.add("gtceu.advancement.root_steam.title", "Steam Age"); + provider.add("gtceu.advancement.root_steam.desc", + "Welcome to GregTech! Everything begins with your first copper ingots."); +// provider.add("gtceu.advancement.steam.first_tools.title", "First Tools"); +// provider.add("gtceu.advancement.steam.first_tools.desc", "Craft a Hammer."); +// provider.add("gtceu.advancement.steam.more_tools.title", "More Tools"); +// provider.add("gtceu.advancement.steam.more_tools.desc", "Craft a Wrench."); +// provider.add("gtceu.advancement.steam.bronze_dust.title", "Bronze"); +// provider.add("gtceu.advancement.steam.bronze_dust.desc", "Craft bronze dust."); +// provider.add("gtceu.advancement.steam.bronze_boiler.title", "First Steam"); +// provider.add("gtceu.advancement.steam.bronze_boiler.desc", "Craft a Bronze Boiler."); +// provider.add("gtceu.advancement.steam.bronze_forge_hammer.title", "Cheaper than a Macerator"); +// provider.add("gtceu.advancement.steam.bronze_forge_hammer.desc", "Craft a Steam Forge Hammer."); +// provider.add("gtceu.advancement.steam.bronze_alloy_smelter.title", "Alloy Smelter"); +// provider.add("gtceu.advancement.steam.bronze_alloy_smelter.desc", "Craft a Steam Alloy Smelter."); +// provider.add("gtceu.advancement.steam.bronze_extractor.title", "Extract"); +// provider.add("gtceu.advancement.steam.bronze_extractor.desc", "Craft a Steam Extractor."); +// provider.add("gtceu.advancement.steam.bronze_solar_boiler.title", "Simply Eco"); +// provider.add("gtceu.advancement.steam.bronze_solar_boiler.desc", "Craft a Solar Boiler."); +// provider.add("gtceu.advancement.steam.coke_oven.title", "Coke Oven"); +// provider.add("gtceu.advancement.steam.coke_oven.desc", "Craft a Coke Oven."); +// provider.add("gtceu.advancement.steam.vacuum_tube.title", "Tubes"); +// provider.add("gtceu.advancement.steam.vacuum_tube.desc", "Craft a Vacuum Tube."); +// provider.add("gtceu.advancement.steam.rubber.title", "Rubber"); +// provider.add("gtceu.advancement.steam.rubber.desc", +// "Make Rubber in an alloy smelter using Sulfur and Raw Rubber Pulp, obtained from Rubber Trees."); +// provider.add("gtceu.advancement.steam.electronic_circuit.title", "Basic Circuit"); +// provider.add("gtceu.advancement.steam.electronic_circuit.desc", "Craft an Electronic Circuit."); +// provider.add("gtceu.advancement.steam.steel.title", "Steel"); +// provider.add("gtceu.advancement.steam.steel.desc", "Produce Steel in a Primitive Blast Furnace."); +// provider.add("gtceu.advancement.steam.magnetic_iron.title", "Magnetic Iron"); +// provider.add("gtceu.advancement.steam.magnetic_iron.desc", "Craft a Magnetic Iron Rod with 4 Redstone."); +// provider.add("gtceu.advancement.steam.lv_motor.title", "Low Voltage Motor"); +// provider.add("gtceu.advancement.steam.lv_motor.desc", "Craft a Low Voltage Motor."); +// provider.add("gtceu.advancement.steam.steel_boiler.title", "High Pressure"); +// provider.add("gtceu.advancement.steam.steel_boiler.desc", "Craft a High Pressure Boiler."); +// provider.add("gtceu.advancement.steam.crafting_station.title", "Crafting Station"); +// provider.add("gtceu.advancement.steam.crafting_station.desc", +// "Craft a Crafting Station to make complex crafts much more manageable."); +// provider.add("gtceu.advancement.steam.hp_solar_boiler.title", "Solar OP Pls Nerf"); +// provider.add("gtceu.advancement.steam.hp_solar_boiler.desc", "Craft a High Pressure Solar Boiler."); + provider.add("gtceu.advancement.steam.steam_vent_death.title", "Get out of the way!"); + provider.add("gtceu.advancement.steam.steam_vent_death.desc", "Die to a venting Steam Machine."); + provider.add("gtceu.advancement.steam.fluid_pipe_death_heat.title", "Boiling Hot!"); + provider.add("gtceu.advancement.steam.fluid_pipe_death_heat.desc", + "Die to a Fluid Pipe full of Hot Fluid."); +// provider.add("gtceu.advancement.steam.primitive_pump.title", "Primitive Water Pump"); +// provider.add("gtceu.advancement.steam.primitive_pump.desc", +// "Craft a Primitive Water Pump for early water gathering."); + provider.add("gtceu.advancement.root_lv.title", "Low Voltage"); + provider.add("gtceu.advancement.root_lv.desc", "Craft a Basic Steam Turbine"); +// provider.add("gtceu.advancement.low_voltage.lv_pump.title", "Pump"); +// provider.add("gtceu.advancement.low_voltage.lv_pump.desc", "Craft an LV Pump."); +// provider.add("gtceu.advancement.low_voltage.shutter_cover.title", "Close it!"); +// provider.add("gtceu.advancement.low_voltage.shutter_cover.desc", "Get a Shutter Cover."); +// provider.add("gtceu.advancement.low_voltage.lv_pump_block.title", "Slurp"); +// provider.add("gtceu.advancement.low_voltage.lv_pump_block.desc", "Craft a Basic Pump."); +// provider.add("gtceu.advancement.low_voltage.lv_conveyor.title", "Transport"); +// provider.add("gtceu.advancement.low_voltage.lv_conveyor.desc", "Craft an LV Conveyor."); +// provider.add("gtceu.advancement.low_voltage.machine_controller_cover.title", "Manipulation"); +// provider.add("gtceu.advancement.low_voltage.machine_controller_cover.desc", "Get a Machine Controller."); +// provider.add("gtceu.advancement.low_voltage.lv_robot_arm.title", "Complex Machines"); +// provider.add("gtceu.advancement.low_voltage.lv_robot_arm.desc", "Craft an LV Robot Arm."); +// provider.add("gtceu.advancement.low_voltage.lv_assembler.title", "Avengers, Assemble!"); +// provider.add("gtceu.advancement.low_voltage.lv_assembler.desc", "Craft an LV Assembler."); +// provider.add("gtceu.advancement.low_voltage.smart_filter.title", "Filter and Regulate"); +// provider.add("gtceu.advancement.low_voltage.smart_filter.desc", "Get a Smart Filter."); +// provider.add("gtceu.advancement.low_voltage.large_boiler.title", "Extreme Pressure"); +// provider.add("gtceu.advancement.low_voltage.large_boiler.desc", "Set up a Large Boiler."); +// provider.add("gtceu.advancement.low_voltage.arc_furnace.title", "Recycling"); +// provider.add("gtceu.advancement.low_voltage.arc_furnace.desc", "Craft an Arc Furnace."); +// provider.add("gtceu.advancement.low_voltage.electric_blast_furnace.title", "Electric Blast Furnace"); +// provider.add("gtceu.advancement.low_voltage.electric_blast_furnace.desc", +// "Craft an Electric Blast Furnace."); +// provider.add("gtceu.advancement.low_voltage.lv_energy_hatch.title", "You Need Two Of Them"); +// provider.add("gtceu.advancement.low_voltage.lv_energy_hatch.desc", "Craft an LV Energy Hatch."); +// provider.add("gtceu.advancement.low_voltage.lv_battery_buffer.title", "Batteries"); +// provider.add("gtceu.advancement.low_voltage.lv_battery_buffer.desc", "Craft an LV 4A Battery Buffer."); +// provider.add("gtceu.advancement.low_voltage.good_electronic_circuit.title", "Better Circuits"); +// provider.add("gtceu.advancement.low_voltage.good_electronic_circuit.desc", "Get Good Circuits."); + provider.add("gtceu.advancement.low_voltage.electrocution_death.title", "Shoulda Covered your Wires!"); + provider.add("gtceu.advancement.low_voltage.electrocution_death.desc", "Die to an Uninsulated Wire."); + provider.add("gtceu.advancement.low_voltage.first_cover_place.title", "The First of Many"); + provider.add("gtceu.advancement.low_voltage.first_cover_place.desc", "Place your first Machine Cover."); +// provider.add("gtceu.advancement.root_mv.title", "Medium Voltage"); +// provider.add("gtceu.advancement.root_mv.desc", "Produce an Aluminium Ingot."); +// provider.add("gtceu.advancement.medium_voltage.31_mv_energy_hatch.title", "Upgrade Your EBF"); +// provider.add("gtceu.advancement.medium_voltage.31_mv_energy_hatch.desc", "Craft an MV Energy Hatch."); +// provider.add("gtceu.advancement.medium_voltage.32_electric_drill.title", "Drill Time"); +// provider.add("gtceu.advancement.medium_voltage.32_electric_drill.desc", "Craft a Drill."); +// provider.add("gtceu.advancement.medium_voltage.33_chainsaw.title", "Brrrr..."); +// provider.add("gtceu.advancement.medium_voltage.33_chainsaw.desc", "Craft a Chainsaw."); +// provider.add("gtceu.advancement.medium_voltage.34_silicon_boule.title", "Monocrystalline Silicon Boule"); +// provider.add("gtceu.advancement.medium_voltage.34_silicon_boule.desc", +// "Produce a Monocrystalline Silicon Boule."); +// provider.add("gtceu.advancement.medium_voltage.35_logic_circuit_wafer.title", "Logic Circuit Wafer"); +// provider.add("gtceu.advancement.medium_voltage.35_logic_circuit_wafer.desc", +// "Produce a Logic Circuit Wafer."); +// provider.add("gtceu.advancement.medium_voltage.36_integrated_logic_circuit.title", +// "Integrated Logic Circuit"); +// provider.add("gtceu.advancement.medium_voltage.36_integrated_logic_circuit.desc", +// "Produce an Integrated Logic Circuit."); +// provider.add("gtceu.advancement.medium_voltage.37_advanced_integrated_logic_circuit.title", "Step Forward"); +// provider.add("gtceu.advancement.medium_voltage.37_advanced_integrated_logic_circuit.desc", +// "Obtain Advanced Circuits."); +// provider.add("gtceu.advancement.medium_voltage.38_super_chest.title", "New Storage"); +// provider.add("gtceu.advancement.medium_voltage.38_super_chest.desc", "Craft a Super Chest I."); +// provider.add("gtceu.advancement.medium_voltage.39_super_tank.title", "Where is the Ocean?"); +// provider.add("gtceu.advancement.medium_voltage.39_super_tank.desc", "Build a Super Tank I."); +// provider.add("gtceu.advancement.root_hv.title", "High Voltage"); +// provider.add("gtceu.advancement.root_hv.desc", "Produce a Stainless Steel Ingot."); +// provider.add("gtceu.advancement.high_voltage.40_workstation.title", "Workstations"); +// provider.add("gtceu.advancement.high_voltage.40_workstation.desc", "Get Workstations."); +// provider.add("gtceu.advancement.high_voltage.41_vacuum_freezer.title", "Vacuum Freezer"); +// provider.add("gtceu.advancement.high_voltage.41_vacuum_freezer.desc", "Set up a Vacuum Freezer."); +// provider.add("gtceu.advancement.high_voltage.42_kanthal_coil.title", "Upgrade your Coils to Level II"); +// provider.add("gtceu.advancement.high_voltage.42_kanthal_coil.desc", "Craft a Kanthal Heating Coil."); +// provider.add("gtceu.advancement.high_voltage.43_multi_smelter.title", "High Power Smelter"); +// provider.add("gtceu.advancement.high_voltage.43_multi_smelter.desc", "Set up a Multi Smelter."); +// provider.add("gtceu.advancement.high_voltage.44_distillation_tower.title", "Oil Plant"); +// provider.add("gtceu.advancement.high_voltage.44_distillation_tower.desc", "Start up a Distillation Tower."); +// provider.add("gtceu.advancement.high_voltage.45_large_steam_turbine.title", "So Much Steam"); +// provider.add("gtceu.advancement.high_voltage.45_large_steam_turbine.desc", +// "Start up a Large Steam Turbine."); +// provider.add("gtceu.advancement.high_voltage.46_hv_macerator.title", "Universal Macerator"); +// provider.add("gtceu.advancement.high_voltage.46_hv_macerator.desc", +// "Craft an HV Macerator for ore byproducts."); +// provider.add("gtceu.advancement.high_voltage.82_large_chemical_reactor.title", "Large Chemical Reactor"); +// provider.add("gtceu.advancement.high_voltage.82_large_chemical_reactor.desc", +// "Set up a Large Chemical Reactor for more efficient chemistry."); +// provider.add("gtceu.advancement.high_voltage.84_rotor_holder_open.title", "A Painful Way to Go Out"); +// provider.add("gtceu.advancement.high_voltage.84_rotor_holder_open.desc", +// "Die by opening a spinning Rotor Holder."); + provider.add("gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.title", "Freezing Cold!"); + provider.add("gtceu.advancement.high_voltage.89_fluid_pipe_death_cold.desc", + "Die to a Fluid Pipe full of Cold Fluid."); +// provider.add("gtceu.advancement.root_ev.title", "Extreme Voltage"); +// provider.add("gtceu.advancement.root_ev.desc", "Cool down a Hot Titanium Ingot."); +// provider.add("gtceu.advancement.extreme_voltage.47_nichrome_coil.title", "Upgrade your Coils to Level III"); +// provider.add("gtceu.advancement.extreme_voltage.47_nichrome_coil.desc", "Craft a Nichrome Heating Coil."); +// provider.add("gtceu.advancement.extreme_voltage.48_osmium.title", "Osmium"); +// provider.add("gtceu.advancement.extreme_voltage.48_osmium.desc", "Cool down a Hot Osmium Ingot."); +// provider.add("gtceu.advancement.extreme_voltage.49_nano_cpu_wafer.title", "Nano CPU Wafer"); +// provider.add("gtceu.advancement.extreme_voltage.49_nano_cpu_wafer.desc", "Produce a Nano CPU Wafer."); +// provider.add("gtceu.advancement.extreme_voltage.50_nano_processor.title", "Nano Processor"); +// provider.add("gtceu.advancement.extreme_voltage.50_nano_processor.desc", "Get Nano Processors."); +// provider.add("gtceu.advancement.extreme_voltage.51_large_combustion_engine.title", "Large Combustion Engine"); +// provider.add("gtceu.advancement.extreme_voltage.51_large_combustion_engine.desc", +// "Set up a Large Combustion Engine, supply it with Lubricant, and boost it with Oxygen."); +// provider.add("gtceu.advancement.extreme_voltage.52_soc_wafer.title", "SoC Wafer"); +// provider.add("gtceu.advancement.extreme_voltage.52_soc_wafer.desc", +// "Produce an SoC Wafer to make cheaper Basic and Good Circuits."); +// provider.add("gtceu.advancement.root_iv.title", "Insane Voltage"); +// provider.add("gtceu.advancement.root_iv.desc", "Cool down a Hot Tungstensteel Ingot."); +// provider.add("gtceu.advancement.insane_voltage.53_plutonium_239.title", "Plutonium 239"); +// provider.add("gtceu.advancement.insane_voltage.53_plutonium_239.desc", +// "Obtain Plutonium 239 for a source of radon."); +// provider.add("gtceu.advancement.insane_voltage.54_indium.title", "Indium"); +// provider.add("gtceu.advancement.insane_voltage.54_indium.desc", "Obtain Indium from Sphalerite and Galena."); +// provider.add("gtceu.advancement.insane_voltage.55_qbit_cpu_wafer.title", "QBit CPU Wafer"); +// provider.add("gtceu.advancement.insane_voltage.55_qbit_cpu_wafer.desc", "Produce a QBit CPU Wafer."); +// provider.add("gtceu.advancement.insane_voltage.56_quantum_processor.title", "Quantum Processor"); +// provider.add("gtceu.advancement.insane_voltage.56_quantum_processor.desc", "Get Quantum Processors."); +// provider.add("gtceu.advancement.insane_voltage.57_tungstensteel_coil.title", +// "Upgrade your Coils to Level IV"); +// provider.add("gtceu.advancement.insane_voltage.57_tungstensteel_coil.desc", +// "Craft an RTM Alloy Heating Coil."); +// provider.add("gtceu.advancement.insane_voltage.58_hss_g_coil.title", "Upgrade your Coils to Level V"); +// provider.add("gtceu.advancement.insane_voltage.58_hss_g_coil.desc", "Craft an HSS-G Heating Coil."); +// provider.add("gtceu.advancement.root_luv.title", "Ludicrous Voltage"); +// provider.add("gtceu.advancement.root_luv.desc", "Set up an Assembly Line."); +// provider.add("gtceu.advancement.ludicrous_voltage.59_superconducting_coil.title", "Conducting"); +// provider.add("gtceu.advancement.ludicrous_voltage.59_superconducting_coil.desc", +// "Craft a Superconducting Coil."); +// provider.add("gtceu.advancement.ludicrous_voltage.60_fusion.title", "Fusion Reactor"); +// provider.add("gtceu.advancement.ludicrous_voltage.60_fusion.desc", "Set up a Fusion Reactor Mark 1."); +// provider.add("gtceu.advancement.ludicrous_voltage.61_europium.title", "Advancement in Technology"); +// provider.add("gtceu.advancement.ludicrous_voltage.61_europium.desc", "Produce Europium."); +// provider.add("gtceu.advancement.ludicrous_voltage.62_raw_crystal_chip.title", "Raw Crystal Chip"); +// provider.add("gtceu.advancement.ludicrous_voltage.62_raw_crystal_chip.desc", "Produce a Raw Crystal Chip."); +// provider.add("gtceu.advancement.ludicrous_voltage.63_crystal_processing_unit.title", +// "Crystal Processing Unit"); +// provider.add("gtceu.advancement.ludicrous_voltage.63_crystal_processing_unit.desc", +// "Produce a Crystal Processing Unit."); +// provider.add("gtceu.advancement.ludicrous_voltage.64_crystal_processor.title", "Crystal Processor"); +// provider.add("gtceu.advancement.ludicrous_voltage.64_crystal_processor.desc", "Get Crystal Processors."); +// provider.add("gtceu.advancement.ludicrous_voltage.65_naquadah.title", "Stargate Material"); +// provider.add("gtceu.advancement.ludicrous_voltage.65_naquadah.desc", "Cool down a Hot Naquadah Ingot."); +// provider.add("gtceu.advancement.ludicrous_voltage.66_naquadah_coil.title", "Upgrade your Coils to Level VI"); +// provider.add("gtceu.advancement.ludicrous_voltage.66_naquadah_coil.desc", "Craft a Naquadah Heating Coil."); +// provider.add("gtceu.advancement.ludicrous_voltage.67_asoc_wafer.title", "ASoC Wafer"); +// provider.add("gtceu.advancement.ludicrous_voltage.67_asoc_wafer.desc", +// "Produce an ASoC Wafer to make cheaper Extreme and Advanced Circuits."); +// provider.add("gtceu.advancement.ludicrous_voltage.68_large_plasma_turbine.title", "Large Plasma Turbine"); +// provider.add("gtceu.advancement.ludicrous_voltage.68_large_plasma_turbine.desc", +// "Craft a Plasma Turbine to turn Plasma into Usable Fluid."); +// provider.add("gtceu.advancement.root_zpm.title", "Zero Point Module"); +// provider.add("gtceu.advancement.root_zpm.desc", "Set up a Fusion Reactor Mark 2."); +// provider.add("gtceu.advancement.zero_point_module.69_americium.title", "Going for the Limit"); +// provider.add("gtceu.advancement.zero_point_module.69_americium.desc", "Produce Americium."); +// provider.add("gtceu.advancement.zero_point_module.70_stem_cells.title", "Stem Cells"); +// provider.add("gtceu.advancement.zero_point_module.70_stem_cells.desc", "Produce Stem Cells."); +// provider.add("gtceu.advancement.zero_point_module.71_neuro_processing_unit.title", "Neuro Processing Unit"); +// provider.add("gtceu.advancement.zero_point_module.71_neuro_processing_unit.desc", +// "Produce a Neuro Processing Unit."); +// provider.add("gtceu.advancement.zero_point_module.72_wetware_processor.title", "Wetware Processor"); +// provider.add("gtceu.advancement.zero_point_module.72_wetware_processor.desc", "Get Wetware Processors."); +// provider.add("gtceu.advancement.zero_point_module.73_trinium_coil.title", "Over 9000!"); +// provider.add("gtceu.advancement.zero_point_module.73_trinium_coil.desc", "Craft a Trinium Heating Coil."); +// provider.add("gtceu.advancement.root_uv.title", "Ultimate Voltage"); +// provider.add("gtceu.advancement.root_uv.desc", "Produce Tritanium."); +// provider.add("gtceu.advancement.ultimate_voltage.74_wetware_mainframe.title", "Wetware Mainframe"); +// provider.add("gtceu.advancement.ultimate_voltage.74_wetware_mainframe.desc", "Get a Wetware Mainframe."); +// provider.add("gtceu.advancement.ultimate_voltage.75_fusion_reactor_3.title", "A Sun Down on Earth"); +// provider.add("gtceu.advancement.ultimate_voltage.75_fusion_reactor_3.desc", +// "Set up a Fusion Reactor Mark 3."); +// provider.add("gtceu.advancement.ultimate_voltage.76_neutronium.title", "As Dense As Possible"); +// provider.add("gtceu.advancement.ultimate_voltage.76_neutronium.desc", "Produce Neutronium."); + provider.add("gtceu.advancement.ultimate_voltage.77_ultimate_battery.title", "What Now?"); + provider.add("gtceu.advancement.ultimate_voltage.77_ultimate_battery.desc", "Craft an Ultimate Battery."); +// provider.add("gtceu.advancement.ultimate_voltage.78_hasoc_wafer.title", "HASoC Wafer"); +// provider.add("gtceu.advancement.ultimate_voltage.78_hasoc_wafer.desc", +// "Produce an HASoC Wafer to make cheaper Master Circuits."); +// provider.add("gtceu.advancement.ultimate_voltage.79_tritanium_coil.title", "The Final Coil"); +// provider.add("gtceu.advancement.ultimate_voltage.79_tritanium_coil.desc", "Craft a Tritanium Heating Coil."); } } diff --git a/src/main/java/com/gregtechceu/gtceu/utils/AdvancementUtil.java b/src/main/java/com/gregtechceu/gtceu/utils/AdvancementUtil.java new file mode 100644 index 0000000000..7875b8276d --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/utils/AdvancementUtil.java @@ -0,0 +1,16 @@ +package com.gregtechceu.gtceu.utils; + +import net.minecraft.advancements.Advancement; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.server.ServerLifecycleHooks; + +public class AdvancementUtil { + public static Advancement getAdvancementById(ResourceLocation advancementID) { + return ServerLifecycleHooks.getCurrentServer().getAdvancements().getAdvancement(advancementID); + } + + public static boolean awardAdvancement(ServerPlayer player, ResourceLocation advancementID, String advancementCriteria) { + return player.getAdvancements().award(getAdvancementById(advancementID), advancementCriteria); + } +}