From 0b09cfde8fbd5f9d8e3fc98dbff9af64fa63c756 Mon Sep 17 00:00:00 2001 From: static Date: Fri, 1 Sep 2023 11:23:05 -0400 Subject: [PATCH 01/11] Fix incorrect recipe output amount (#563) --- .../recipes/compat/ae2/dyes/decolor/craft/me_wire_1.json | 2 +- .../datagen/recipe/CompatRecipesProvider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generated/resources/data/modern_industrialization/recipes/compat/ae2/dyes/decolor/craft/me_wire_1.json b/src/generated/resources/data/modern_industrialization/recipes/compat/ae2/dyes/decolor/craft/me_wire_1.json index 964dcf9b9..389644f24 100644 --- a/src/generated/resources/data/modern_industrialization/recipes/compat/ae2/dyes/decolor/craft/me_wire_1.json +++ b/src/generated/resources/data/modern_industrialization/recipes/compat/ae2/dyes/decolor/craft/me_wire_1.json @@ -17,7 +17,7 @@ "pb" ], "result": { - "count": 8, + "count": 1, "item": "modern_industrialization:me_wire" } } \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/datagen/recipe/CompatRecipesProvider.java b/src/main/java/aztech/modern_industrialization/datagen/recipe/CompatRecipesProvider.java index 49dffb807..d81c33bd8 100644 --- a/src/main/java/aztech/modern_industrialization/datagen/recipe/CompatRecipesProvider.java +++ b/src/main/java/aztech/modern_industrialization/datagen/recipe/CompatRecipesProvider.java @@ -228,7 +228,7 @@ private void generateAe2Compat() { addCompatRecipe("dyes/decolor/craft/me_wire_8", new ShapedRecipeJson("modern_industrialization:me_wire", 8, "ppp", "pbp", "ppp").addInput('b', "minecraft:water_bucket").addInput('p', "#modern_industrialization:me_wires")); // decolor 1 me wire - addCompatRecipe("dyes/decolor/craft/me_wire_1", new ShapedRecipeJson("modern_industrialization:me_wire", 8, "pb") + addCompatRecipe("dyes/decolor/craft/me_wire_1", new ShapedRecipeJson("modern_industrialization:me_wire", 1, "pb") .addInput('b', "minecraft:water_bucket").addInput('p', "#modern_industrialization:me_wires")); // decolor 1 me wire with mixer addCompatRecipe("dyes/decolor/mixer/me_wire", MIRecipeJson.create(MIMachineRecipeTypes.MIXER, 2, 100) From dc824a74f74d4663d04c97a66d9986122396d0ee Mon Sep 17 00:00:00 2001 From: static Date: Mon, 4 Sep 2023 15:30:46 -0400 Subject: [PATCH 02/11] Forge Hammer noises (#566) Update Forge Hammer to make Smithing Table sounds when output is taken --- .../blocks/forgehammer/ForgeHammerScreenHandler.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/aztech/modern_industrialization/blocks/forgehammer/ForgeHammerScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/forgehammer/ForgeHammerScreenHandler.java index 44c3dd060..cb9c9ed09 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/forgehammer/ForgeHammerScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/forgehammer/ForgeHammerScreenHandler.java @@ -59,6 +59,7 @@ public class ForgeHammerScreenHandler extends AbstractContainerMenu { private final ContainerLevelAccess context; private final Level world; private final Player player; + private long lastSoundTime = 0; private ItemStack inputStackCache = ItemStack.EMPTY, toolStackCache = ItemStack.EMPTY; @@ -114,6 +115,14 @@ public boolean mayPlace(ItemStack stack) { @Override public void onTake(Player player, ItemStack stack) { ForgeHammerScreenHandler.this.onCraft(); + // Don't play the sound multiple times within the same tick + // Prevents the sound being played a lot when shift-clicking the output into your inventory + context.execute((world, pos) -> { + if (lastSoundTime < world.getGameTime()) { + world.playSound(null, pos, SoundEvents.SMITHING_TABLE_USE, SoundSource.BLOCKS, 1.0F, 1.0F); + lastSoundTime = world.getGameTime(); + } + }); } }; From 0544c93ca0a720919f7a9f40022bdc3efa687290 Mon Sep 17 00:00:00 2001 From: Lura Skye Date: Mon, 4 Sep 2023 22:04:54 +0100 Subject: [PATCH 03/11] Rename getStack -> getRealStack to avoid remapping issues. (#568) --- .../inventory/ConfigurableItemStack.java | 4 ++-- .../modern_industrialization/inventory/HackySlot.java | 10 +++++----- .../machines/guicomponents/SlotPanel.java | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java b/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java index 62e5aa712..868682261 100644 --- a/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java +++ b/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java @@ -212,12 +212,12 @@ public ConfigurableItemStack getConfStack() { } @Override - protected ItemStack getStack() { + protected ItemStack getRealStack() { return key.toStack((int) amount); } @Override - protected void setStack(ItemStack stack) { + protected void setRealStack(ItemStack stack) { key = ItemVariant.of(stack); amount = stack.getCount(); notifyListeners(); diff --git a/src/main/java/aztech/modern_industrialization/inventory/HackySlot.java b/src/main/java/aztech/modern_industrialization/inventory/HackySlot.java index fe28eef40..178acc173 100644 --- a/src/main/java/aztech/modern_industrialization/inventory/HackySlot.java +++ b/src/main/java/aztech/modern_industrialization/inventory/HackySlot.java @@ -40,18 +40,18 @@ public HackySlot(int x, int y) { super(new UnsupportedOperationInventory(), 0, x, y); } - protected abstract ItemStack getStack(); + protected abstract ItemStack getRealStack(); - protected abstract void setStack(ItemStack stack); + protected abstract void setRealStack(ItemStack stack); @Override public final ItemStack getItem() { - return cachedReturnedStack = getStack(); + return cachedReturnedStack = getRealStack(); } @Override public final void set(ItemStack stack) { - setStack(stack); + setRealStack(stack); cachedReturnedStack = stack; } @@ -69,7 +69,7 @@ public final void setChanged() { @Override public final ItemStack remove(int amount) { - var stack = getStack().copy(); + var stack = getRealStack().copy(); var ret = stack.split(amount); set(stack); cachedReturnedStack = null; diff --git a/src/main/java/aztech/modern_industrialization/machines/guicomponents/SlotPanel.java b/src/main/java/aztech/modern_industrialization/machines/guicomponents/SlotPanel.java index f1a5ebb94..886144117 100644 --- a/src/main/java/aztech/modern_industrialization/machines/guicomponents/SlotPanel.java +++ b/src/main/java/aztech/modern_industrialization/machines/guicomponents/SlotPanel.java @@ -74,12 +74,12 @@ private Server addSlot(SlotType type, Supplier getStack, BiConsumer facade.addSlotToMenu(new HackySlot(getSlotX(machine.guiParams), getSlotY(slotIndex)) { @Override - protected ItemStack getStack() { + protected ItemStack getRealStack() { return getStack.get(); } @Override - protected void setStack(ItemStack stack) { + protected void setRealStack(ItemStack stack) { setStack.accept(machine, stack); } From 7a95949449467bddb98361a5a751c929995e8701 Mon Sep 17 00:00:00 2001 From: Despacito696969 <56641258+Despacito696969@users.noreply.github.com> Date: Sat, 30 Sep 2023 08:31:50 +0200 Subject: [PATCH 04/11] Kind of stupid quantum sword improvements (#573) * Made weakness or being a mob not affect the Quantum Sword's Damage * Added Quantum Sword damage attribute fix for mobs, mobs now actually check for Quantum Sword * License and sorted mixins * Empty line fix * Death message fix * Remade player damage fix, removed mob fix, made quantum sword not destroy blocks in creative * else formatting --- .../ModernIndustrialization.java | 2 + .../items/tools/QuantumSword.java | 40 +++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java b/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java index 02a0fb1f4..c71cdc17e 100644 --- a/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java +++ b/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java @@ -36,6 +36,7 @@ import aztech.modern_industrialization.items.armor.ArmorPackets; import aztech.modern_industrialization.items.armor.MIArmorEffects; import aztech.modern_industrialization.items.armor.MIKeyMap; +import aztech.modern_industrialization.items.tools.QuantumSword; import aztech.modern_industrialization.machines.MachinePackets; import aztech.modern_industrialization.machines.gui.MachineMenuCommon; import aztech.modern_industrialization.machines.init.*; @@ -107,6 +108,7 @@ public static void initialize() { setupPackets(); setupFuels(); MIArmorEffects.init(); + QuantumSword.init(); setupWrench(); ChunkEventListeners.init(); diff --git a/src/main/java/aztech/modern_industrialization/items/tools/QuantumSword.java b/src/main/java/aztech/modern_industrialization/items/tools/QuantumSword.java index daf79b7b6..5ff688828 100644 --- a/src/main/java/aztech/modern_industrialization/items/tools/QuantumSword.java +++ b/src/main/java/aztech/modern_industrialization/items/tools/QuantumSword.java @@ -24,14 +24,21 @@ package aztech.modern_industrialization.items.tools; import java.util.List; +import net.fabricmc.fabric.api.event.player.AttackEntityCallback; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; public class QuantumSword extends Item { @@ -39,14 +46,39 @@ public QuantumSword(FabricItemSettings settings) { super(settings.customDamage((is, amt, e, cb) -> 0)); } - @Override - public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) { - target.kill(); + public static void init() { + /** + * This way of attacking skips vanilla's attacking to allow for attacking + * even if the player has zero attack damage because of stuff like weakness effect or attribute modifiers + */ + AttackEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> { + if (player.isSpectator()) { + return InteractionResult.PASS; + } + if (hand == InteractionHand.MAIN_HAND && player.getMainHandItem().getItem() instanceof QuantumSword quantumSword) { + if (entity instanceof LivingEntity livingEntity) { + quantumSword.onHurtEnemy(player.getMainHandItem(), livingEntity, player); + } else { + entity.kill(); + } + return InteractionResult.SUCCESS; + } else { + return InteractionResult.PASS; + } + }); + } + + private void onHurtEnemy(ItemStack stack, LivingEntity target, Player attacker) { + target.hurt(DamageSource.mobAttack(attacker).bypassArmor().bypassInvul(), Float.MAX_VALUE); // TODO: if lama was hit, kill the wander trader (and the opposite) and give an // advancement // TODO: same for phantoms - return true; + } + + @Override + public boolean canAttackBlock(BlockState state, Level level, BlockPos pos, Player player) { + return !player.isCreative(); } @Override From 6088619d6bb6b1e0fe340ad8ea6ef49f6399726f Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 08:59:47 +0200 Subject: [PATCH 05/11] Fix #571: sprites not animating in GUIs with Sodium --- .../java/aztech/modern_industrialization/util/RenderHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/java/aztech/modern_industrialization/util/RenderHelper.java b/src/client/java/aztech/modern_industrialization/util/RenderHelper.java index 58c79cc16..e7a1d1a05 100644 --- a/src/client/java/aztech/modern_industrialization/util/RenderHelper.java +++ b/src/client/java/aztech/modern_industrialization/util/RenderHelper.java @@ -223,6 +223,8 @@ public static void drawFluidInGui(PoseStack ms, FluidVariant fluid, float i, flo BufferUploader.drawWithShader(bufferBuilder.end()); RenderSystem.enableDepthTest(); + + SodiumCompat.markSpriteActive(sprite); } /** From aeed60c0e09b9200d2ad62af79ebf12c5a9ab27a Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 09:14:58 +0200 Subject: [PATCH 06/11] Add crash report information for item pipe transfer crashes. Closes #575 --- .../pipes/item/ItemNetwork.java | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/pipes/item/ItemNetwork.java b/src/main/java/aztech/modern_industrialization/pipes/item/ItemNetwork.java index 4f76c53bc..5110a58b2 100644 --- a/src/main/java/aztech/modern_industrialization/pipes/item/ItemNetwork.java +++ b/src/main/java/aztech/modern_industrialization/pipes/item/ItemNetwork.java @@ -43,7 +43,10 @@ import net.fabricmc.fabric.api.transfer.v1.storage.base.InsertionOnlyStorage; import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; +import net.minecraft.CrashReport; +import net.minecraft.ReportedException; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.Item; @@ -75,11 +78,13 @@ private void doNetworkTransfer(ServerLevel world) { ItemNetworkNode itemNode = (ItemNetworkNode) entry.getNode(); for (ItemNetworkNode.ItemConnection connection : itemNode.connections) { if (connection.canExtract()) { - Storage source = ItemStorage.SIDED.find(world, pos.relative(connection.direction), - connection.direction.getOpposite()); + var queryPos = pos.relative(connection.direction); + var querySide = connection.direction.getOpposite(); + + Storage source = ItemStorage.SIDED.find(world, queryPos, querySide); if (source != null) { - extractionTargets.add(new ExtractionTarget(connection, source)); + extractionTargets.add(new ExtractionTarget(connection, source, queryPos, querySide)); } } } @@ -99,8 +104,17 @@ private void doNetworkTransfer(ServerLevel world) { insertTargets.remove(insertTargets.size() - 1); } - lastMovedItems += StorageUtil.move(target.storage, insertStorage, target.connection::canStackMoveThrough, - target.connection.getMoves(), tx); + try { + lastMovedItems += StorageUtil.move(target.storage, insertStorage, target.connection::canStackMoveThrough, + target.connection.getMoves(), tx); + } catch (Exception exception) { + var crashReport = CrashReport.forThrowable(exception, "Moving items in a pipe network"); + crashReport.addCategory("Block being extracted from:") + .setDetail("Dimension", world.dimension()) + .setDetail("Position", target.queryPos) + .setDetail("Accessed from side", target.querySide); + throw new ReportedException(crashReport); + } } tx.commit(); } @@ -109,10 +123,14 @@ private void doNetworkTransfer(ServerLevel world) { private static class ExtractionTarget { private final ItemNetworkNode.ItemConnection connection; private final Storage storage; + private final BlockPos queryPos; + private final Direction querySide; - private ExtractionTarget(ItemNetworkNode.ItemConnection connection, Storage storage) { + private ExtractionTarget(ItemNetworkNode.ItemConnection connection, Storage storage, BlockPos queryPos, Direction querySide) { this.connection = connection; this.storage = storage; + this.queryPos = queryPos; + this.querySide = querySide; } } From 1cc2a4fa1e989cf35e87c1d4ac2eb03a4018b995 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 09:40:10 +0200 Subject: [PATCH 07/11] Make step-down transformers auto-output on the lower voltage sides. Fixes #565 --- .../AbstractStorageMachineBlockEntity.java | 12 +++++++++++- .../blockentities/GeneratorMachineBlockEntity.java | 2 +- .../machines/helper/EnergyHelper.java | 10 +++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/machines/blockentities/AbstractStorageMachineBlockEntity.java b/src/main/java/aztech/modern_industrialization/machines/blockentities/AbstractStorageMachineBlockEntity.java index d61bb556a..5d2182882 100644 --- a/src/main/java/aztech/modern_industrialization/machines/blockentities/AbstractStorageMachineBlockEntity.java +++ b/src/main/java/aztech/modern_industrialization/machines/blockentities/AbstractStorageMachineBlockEntity.java @@ -104,7 +104,17 @@ protected MachineModelClientData getModelData() { @Override public void tick() { if (!level.isClientSide()) { - EnergyHelper.autoOuput(this, orientation, to, extractable); + if (extractableOnOutputDirection) { + EnergyHelper.autoOutput(this, orientation, to, extractable); + } else { + for (Direction side : Direction.values()) { + if (side == orientation.outputDirection) { + continue; + } + + EnergyHelper.autoOutput(this, side, to, extractable); + } + } } } diff --git a/src/main/java/aztech/modern_industrialization/machines/blockentities/GeneratorMachineBlockEntity.java b/src/main/java/aztech/modern_industrialization/machines/blockentities/GeneratorMachineBlockEntity.java index 2bc015017..3c10650d3 100644 --- a/src/main/java/aztech/modern_industrialization/machines/blockentities/GeneratorMachineBlockEntity.java +++ b/src/main/java/aztech/modern_industrialization/machines/blockentities/GeneratorMachineBlockEntity.java @@ -181,7 +181,7 @@ public void tick() { energy.insertEu(euProduced, Simulation.ACT); isActiveComponent.updateActive(0 != euProduced, this); - EnergyHelper.autoOuput(this, orientation, outputTier, extractable); + EnergyHelper.autoOutput(this, orientation, outputTier, extractable); setChanged(); } diff --git a/src/main/java/aztech/modern_industrialization/machines/helper/EnergyHelper.java b/src/main/java/aztech/modern_industrialization/machines/helper/EnergyHelper.java index ecc31d1cc..b8eddaf27 100644 --- a/src/main/java/aztech/modern_industrialization/machines/helper/EnergyHelper.java +++ b/src/main/java/aztech/modern_industrialization/machines/helper/EnergyHelper.java @@ -28,13 +28,17 @@ import aztech.modern_industrialization.api.energy.MIEnergyStorage; import aztech.modern_industrialization.machines.MachineBlockEntity; import aztech.modern_industrialization.machines.components.OrientationComponent; +import net.minecraft.core.Direction; import team.reborn.energy.api.EnergyStorageUtil; public class EnergyHelper { - public static void autoOuput(MachineBlockEntity machine, OrientationComponent orientation, CableTier output, MIEnergyStorage energySource) { - var storage = EnergyApi.SIDED.find(machine.getLevel(), machine.getBlockPos().relative(orientation.outputDirection), - orientation.outputDirection.getOpposite()); + public static void autoOutput(MachineBlockEntity machine, OrientationComponent orientation, CableTier output, MIEnergyStorage energySource) { + autoOutput(machine, orientation.outputDirection, output, energySource); + } + + public static void autoOutput(MachineBlockEntity machine, Direction side, CableTier output, MIEnergyStorage energySource) { + var storage = EnergyApi.SIDED.find(machine.getLevel(), machine.getBlockPos().relative(side), side.getOpposite()); if (storage != null && storage.canConnect(output)) { if (EnergyStorageUtil.move(energySource, storage, Long.MAX_VALUE, null) > 0) { machine.setChanged(); From 7ef4548fd99c4530a3fc31c17d68cbfd249349ed Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:24:53 +0200 Subject: [PATCH 08/11] Add more category tags for materials. Closes #559 --- .../modern_industrialization/lang/en_us.json | 8 +++ .../lang/untranslated/ko_kr.json | 8 +++ .../lang/untranslated/pt_br.json | 8 +++ .../lang/untranslated/ru_ru.json | 8 +++ .../lang/untranslated/zh_cn.json | 8 +++ .../lang/untranslated/zh_tw.json | 8 +++ .../resources/data/c/tags/items/dusts.json | 60 +++++++++++++++++++ .../resources/data/c/tags/items/gears.json | 15 +++++ .../resources/data/c/tags/items/ingots.json | 38 ++++++++++++ .../resources/data/c/tags/items/nuggets.json | 37 ++++++++++++ .../resources/data/c/tags/items/ores.json | 22 +++---- .../resources/data/c/tags/items/plates.json | 37 ++++++++++++ .../resources/data/c/tags/items/raw_ores.json | 15 +++++ .../data/c/tags/items/tiny_dusts.json | 59 ++++++++++++++++++ .../datagen/tag/TagsToGenerate.java | 13 ++-- .../materials/part/MIParts.java | 13 ++++ .../materials/part/OrePart.java | 2 +- .../materials/part/PartTemplate.java | 8 ++- 18 files changed, 350 insertions(+), 17 deletions(-) create mode 100644 src/generated/resources/data/c/tags/items/dusts.json create mode 100644 src/generated/resources/data/c/tags/items/gears.json create mode 100644 src/generated/resources/data/c/tags/items/ingots.json create mode 100644 src/generated/resources/data/c/tags/items/nuggets.json create mode 100644 src/generated/resources/data/c/tags/items/plates.json create mode 100644 src/generated/resources/data/c/tags/items/raw_ores.json create mode 100644 src/generated/resources/data/c/tags/items/tiny_dusts.json diff --git a/src/generated/resources/assets/modern_industrialization/lang/en_us.json b/src/generated/resources/assets/modern_industrialization/lang/en_us.json index a5ed50573..4f2df13a2 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -1207,6 +1207,7 @@ "tag.c.diamond_dusts": "Diamond Dusts", "tag.c.diamond_plates": "Diamond Plates", "tag.c.diamond_tiny_dusts": "Diamond Tiny Dusts", + "tag.c.dusts": "Dusts", "tag.c.electrum_blocks": "Electrum Blocks", "tag.c.electrum_dusts": "Electrum Dusts", "tag.c.electrum_ingots": "Electrum Ingots", @@ -1217,6 +1218,7 @@ "tag.c.emerald_plates": "Emerald Plates", "tag.c.emerald_tiny_dusts": "Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "Fire Clay Dusts", + "tag.c.gears": "Gears", "tag.c.gold_dusts": "Gold Dusts", "tag.c.gold_gears": "Gold Gears", "tag.c.gold_plates": "Gold Plates", @@ -1231,6 +1233,7 @@ "tag.c.he_uranium_ingots": "HE Uranium Ingots", "tag.c.he_uranium_nuggets": "HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "HE Uranium Tiny Dusts", + "tag.c.ingots": "Ingots", "tag.c.invar_blocks": "Invar Blocks", "tag.c.invar_dusts": "Invar Dusts", "tag.c.invar_gears": "Invar Gears", @@ -1297,6 +1300,9 @@ "tag.c.nickel_plates": "Nickel Plates", "tag.c.nickel_tiny_dusts": "Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "Nuclear Alloy Plates", + "tag.c.nuggets": "Nuggets", + "tag.c.ores": "Ores", + "tag.c.plates": "Plates", "tag.c.platinum_blocks": "Platinum Blocks", "tag.c.platinum_dusts": "Platinum Dusts", "tag.c.platinum_ingots": "Platinum Ingots", @@ -1320,6 +1326,7 @@ "tag.c.raw_lead_ores": "Raw Lead Ores", "tag.c.raw_nickel_blocks": "Raw Nickel Blocks", "tag.c.raw_nickel_ores": "Raw Nickel Ores", + "tag.c.raw_ores": "Raw Ores", "tag.c.raw_platinum_blocks": "Raw Platinum Blocks", "tag.c.raw_platinum_ores": "Raw Platinum Ores", "tag.c.raw_silver_blocks": "Raw Silver Blocks", @@ -1387,6 +1394,7 @@ "tag.c.tin_ores": "Tin Ores", "tag.c.tin_plates": "Tin Plates", "tag.c.tin_tiny_dusts": "Tin Tiny Dusts", + "tag.c.tiny_dusts": "Tiny Dusts", "tag.c.titanium_blocks": "Titanium Blocks", "tag.c.titanium_dusts": "Titanium Dusts", "tag.c.titanium_gears": "Titanium Gears", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json index 22a64ac90..50aeff0d8 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json @@ -1414,6 +1414,7 @@ "tag.c.diamond_dusts": "[UNTRANSLATED] Diamond Dusts", "tag.c.diamond_plates": "[UNTRANSLATED] Diamond Plates", "tag.c.diamond_tiny_dusts": "[UNTRANSLATED] Diamond Tiny Dusts", + "tag.c.dusts": "[UNTRANSLATED] Dusts", "tag.c.electrum_blocks": "[UNTRANSLATED] Electrum Blocks", "tag.c.electrum_dusts": "[UNTRANSLATED] Electrum Dusts", "tag.c.electrum_ingots": "[UNTRANSLATED] Electrum Ingots", @@ -1424,6 +1425,7 @@ "tag.c.emerald_plates": "[UNTRANSLATED] Emerald Plates", "tag.c.emerald_tiny_dusts": "[UNTRANSLATED] Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "[UNTRANSLATED] Fire Clay Dusts", + "tag.c.gears": "[UNTRANSLATED] Gears", "tag.c.gold_dusts": "[UNTRANSLATED] Gold Dusts", "tag.c.gold_gears": "[UNTRANSLATED] Gold Gears", "tag.c.gold_plates": "[UNTRANSLATED] Gold Plates", @@ -1438,6 +1440,7 @@ "tag.c.he_uranium_ingots": "[UNTRANSLATED] HE Uranium Ingots", "tag.c.he_uranium_nuggets": "[UNTRANSLATED] HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "[UNTRANSLATED] HE Uranium Tiny Dusts", + "tag.c.ingots": "[UNTRANSLATED] Ingots", "tag.c.invar_blocks": "[UNTRANSLATED] Invar Blocks", "tag.c.invar_dusts": "[UNTRANSLATED] Invar Dusts", "tag.c.invar_gears": "[UNTRANSLATED] Invar Gears", @@ -1504,6 +1507,9 @@ "tag.c.nickel_plates": "[UNTRANSLATED] Nickel Plates", "tag.c.nickel_tiny_dusts": "[UNTRANSLATED] Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "[UNTRANSLATED] Nuclear Alloy Plates", + "tag.c.nuggets": "[UNTRANSLATED] Nuggets", + "tag.c.ores": "[UNTRANSLATED] Ores", + "tag.c.plates": "[UNTRANSLATED] Plates", "tag.c.platinum_blocks": "[UNTRANSLATED] Platinum Blocks", "tag.c.platinum_dusts": "[UNTRANSLATED] Platinum Dusts", "tag.c.platinum_ingots": "[UNTRANSLATED] Platinum Ingots", @@ -1527,6 +1533,7 @@ "tag.c.raw_lead_ores": "[UNTRANSLATED] Raw Lead Ores", "tag.c.raw_nickel_blocks": "[UNTRANSLATED] Raw Nickel Blocks", "tag.c.raw_nickel_ores": "[UNTRANSLATED] Raw Nickel Ores", + "tag.c.raw_ores": "[UNTRANSLATED] Raw Ores", "tag.c.raw_platinum_blocks": "[UNTRANSLATED] Raw Platinum Blocks", "tag.c.raw_platinum_ores": "[UNTRANSLATED] Raw Platinum Ores", "tag.c.raw_silver_blocks": "[UNTRANSLATED] Raw Silver Blocks", @@ -1594,6 +1601,7 @@ "tag.c.tin_ores": "[UNTRANSLATED] Tin Ores", "tag.c.tin_plates": "[UNTRANSLATED] Tin Plates", "tag.c.tin_tiny_dusts": "[UNTRANSLATED] Tin Tiny Dusts", + "tag.c.tiny_dusts": "[UNTRANSLATED] Tiny Dusts", "tag.c.titanium_blocks": "[UNTRANSLATED] Titanium Blocks", "tag.c.titanium_dusts": "[UNTRANSLATED] Titanium Dusts", "tag.c.titanium_gears": "[UNTRANSLATED] Titanium Gears", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json index 0c8411c2f..53781905a 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json @@ -1207,6 +1207,7 @@ "tag.c.diamond_dusts": "[UNTRANSLATED] Diamond Dusts", "tag.c.diamond_plates": "[UNTRANSLATED] Diamond Plates", "tag.c.diamond_tiny_dusts": "[UNTRANSLATED] Diamond Tiny Dusts", + "tag.c.dusts": "[UNTRANSLATED] Dusts", "tag.c.electrum_blocks": "[UNTRANSLATED] Electrum Blocks", "tag.c.electrum_dusts": "[UNTRANSLATED] Electrum Dusts", "tag.c.electrum_ingots": "[UNTRANSLATED] Electrum Ingots", @@ -1217,6 +1218,7 @@ "tag.c.emerald_plates": "[UNTRANSLATED] Emerald Plates", "tag.c.emerald_tiny_dusts": "[UNTRANSLATED] Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "[UNTRANSLATED] Fire Clay Dusts", + "tag.c.gears": "[UNTRANSLATED] Gears", "tag.c.gold_dusts": "[UNTRANSLATED] Gold Dusts", "tag.c.gold_gears": "[UNTRANSLATED] Gold Gears", "tag.c.gold_plates": "[UNTRANSLATED] Gold Plates", @@ -1231,6 +1233,7 @@ "tag.c.he_uranium_ingots": "[UNTRANSLATED] HE Uranium Ingots", "tag.c.he_uranium_nuggets": "[UNTRANSLATED] HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "[UNTRANSLATED] HE Uranium Tiny Dusts", + "tag.c.ingots": "[UNTRANSLATED] Ingots", "tag.c.invar_blocks": "[UNTRANSLATED] Invar Blocks", "tag.c.invar_dusts": "[UNTRANSLATED] Invar Dusts", "tag.c.invar_gears": "[UNTRANSLATED] Invar Gears", @@ -1297,6 +1300,9 @@ "tag.c.nickel_plates": "[UNTRANSLATED] Nickel Plates", "tag.c.nickel_tiny_dusts": "[UNTRANSLATED] Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "[UNTRANSLATED] Nuclear Alloy Plates", + "tag.c.nuggets": "[UNTRANSLATED] Nuggets", + "tag.c.ores": "[UNTRANSLATED] Ores", + "tag.c.plates": "[UNTRANSLATED] Plates", "tag.c.platinum_blocks": "[UNTRANSLATED] Platinum Blocks", "tag.c.platinum_dusts": "[UNTRANSLATED] Platinum Dusts", "tag.c.platinum_ingots": "[UNTRANSLATED] Platinum Ingots", @@ -1320,6 +1326,7 @@ "tag.c.raw_lead_ores": "[UNTRANSLATED] Raw Lead Ores", "tag.c.raw_nickel_blocks": "[UNTRANSLATED] Raw Nickel Blocks", "tag.c.raw_nickel_ores": "[UNTRANSLATED] Raw Nickel Ores", + "tag.c.raw_ores": "[UNTRANSLATED] Raw Ores", "tag.c.raw_platinum_blocks": "[UNTRANSLATED] Raw Platinum Blocks", "tag.c.raw_platinum_ores": "[UNTRANSLATED] Raw Platinum Ores", "tag.c.raw_silver_blocks": "[UNTRANSLATED] Raw Silver Blocks", @@ -1387,6 +1394,7 @@ "tag.c.tin_ores": "[UNTRANSLATED] Tin Ores", "tag.c.tin_plates": "[UNTRANSLATED] Tin Plates", "tag.c.tin_tiny_dusts": "[UNTRANSLATED] Tin Tiny Dusts", + "tag.c.tiny_dusts": "[UNTRANSLATED] Tiny Dusts", "tag.c.titanium_blocks": "[UNTRANSLATED] Titanium Blocks", "tag.c.titanium_dusts": "[UNTRANSLATED] Titanium Dusts", "tag.c.titanium_gears": "[UNTRANSLATED] Titanium Gears", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json index 5571da958..873357dbc 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json @@ -1207,6 +1207,7 @@ "tag.c.diamond_dusts": "[UNTRANSLATED] Diamond Dusts", "tag.c.diamond_plates": "[UNTRANSLATED] Diamond Plates", "tag.c.diamond_tiny_dusts": "[UNTRANSLATED] Diamond Tiny Dusts", + "tag.c.dusts": "[UNTRANSLATED] Dusts", "tag.c.electrum_blocks": "[UNTRANSLATED] Electrum Blocks", "tag.c.electrum_dusts": "[UNTRANSLATED] Electrum Dusts", "tag.c.electrum_ingots": "[UNTRANSLATED] Electrum Ingots", @@ -1217,6 +1218,7 @@ "tag.c.emerald_plates": "[UNTRANSLATED] Emerald Plates", "tag.c.emerald_tiny_dusts": "[UNTRANSLATED] Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "[UNTRANSLATED] Fire Clay Dusts", + "tag.c.gears": "[UNTRANSLATED] Gears", "tag.c.gold_dusts": "[UNTRANSLATED] Gold Dusts", "tag.c.gold_gears": "[UNTRANSLATED] Gold Gears", "tag.c.gold_plates": "[UNTRANSLATED] Gold Plates", @@ -1231,6 +1233,7 @@ "tag.c.he_uranium_ingots": "[UNTRANSLATED] HE Uranium Ingots", "tag.c.he_uranium_nuggets": "[UNTRANSLATED] HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "[UNTRANSLATED] HE Uranium Tiny Dusts", + "tag.c.ingots": "[UNTRANSLATED] Ingots", "tag.c.invar_blocks": "[UNTRANSLATED] Invar Blocks", "tag.c.invar_dusts": "[UNTRANSLATED] Invar Dusts", "tag.c.invar_gears": "[UNTRANSLATED] Invar Gears", @@ -1297,6 +1300,9 @@ "tag.c.nickel_plates": "[UNTRANSLATED] Nickel Plates", "tag.c.nickel_tiny_dusts": "[UNTRANSLATED] Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "[UNTRANSLATED] Nuclear Alloy Plates", + "tag.c.nuggets": "[UNTRANSLATED] Nuggets", + "tag.c.ores": "[UNTRANSLATED] Ores", + "tag.c.plates": "[UNTRANSLATED] Plates", "tag.c.platinum_blocks": "[UNTRANSLATED] Platinum Blocks", "tag.c.platinum_dusts": "[UNTRANSLATED] Platinum Dusts", "tag.c.platinum_ingots": "[UNTRANSLATED] Platinum Ingots", @@ -1320,6 +1326,7 @@ "tag.c.raw_lead_ores": "[UNTRANSLATED] Raw Lead Ores", "tag.c.raw_nickel_blocks": "[UNTRANSLATED] Raw Nickel Blocks", "tag.c.raw_nickel_ores": "[UNTRANSLATED] Raw Nickel Ores", + "tag.c.raw_ores": "[UNTRANSLATED] Raw Ores", "tag.c.raw_platinum_blocks": "[UNTRANSLATED] Raw Platinum Blocks", "tag.c.raw_platinum_ores": "[UNTRANSLATED] Raw Platinum Ores", "tag.c.raw_silver_blocks": "[UNTRANSLATED] Raw Silver Blocks", @@ -1387,6 +1394,7 @@ "tag.c.tin_ores": "[UNTRANSLATED] Tin Ores", "tag.c.tin_plates": "[UNTRANSLATED] Tin Plates", "tag.c.tin_tiny_dusts": "[UNTRANSLATED] Tin Tiny Dusts", + "tag.c.tiny_dusts": "[UNTRANSLATED] Tiny Dusts", "tag.c.titanium_blocks": "[UNTRANSLATED] Titanium Blocks", "tag.c.titanium_dusts": "[UNTRANSLATED] Titanium Dusts", "tag.c.titanium_gears": "[UNTRANSLATED] Titanium Gears", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json index cafec8775..4d018a054 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json @@ -1207,6 +1207,7 @@ "tag.c.diamond_dusts": "[UNTRANSLATED] Diamond Dusts", "tag.c.diamond_plates": "[UNTRANSLATED] Diamond Plates", "tag.c.diamond_tiny_dusts": "[UNTRANSLATED] Diamond Tiny Dusts", + "tag.c.dusts": "[UNTRANSLATED] Dusts", "tag.c.electrum_blocks": "[UNTRANSLATED] Electrum Blocks", "tag.c.electrum_dusts": "[UNTRANSLATED] Electrum Dusts", "tag.c.electrum_ingots": "[UNTRANSLATED] Electrum Ingots", @@ -1217,6 +1218,7 @@ "tag.c.emerald_plates": "[UNTRANSLATED] Emerald Plates", "tag.c.emerald_tiny_dusts": "[UNTRANSLATED] Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "[UNTRANSLATED] Fire Clay Dusts", + "tag.c.gears": "[UNTRANSLATED] Gears", "tag.c.gold_dusts": "[UNTRANSLATED] Gold Dusts", "tag.c.gold_gears": "[UNTRANSLATED] Gold Gears", "tag.c.gold_plates": "[UNTRANSLATED] Gold Plates", @@ -1231,6 +1233,7 @@ "tag.c.he_uranium_ingots": "[UNTRANSLATED] HE Uranium Ingots", "tag.c.he_uranium_nuggets": "[UNTRANSLATED] HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "[UNTRANSLATED] HE Uranium Tiny Dusts", + "tag.c.ingots": "[UNTRANSLATED] Ingots", "tag.c.invar_blocks": "[UNTRANSLATED] Invar Blocks", "tag.c.invar_dusts": "[UNTRANSLATED] Invar Dusts", "tag.c.invar_gears": "[UNTRANSLATED] Invar Gears", @@ -1297,6 +1300,9 @@ "tag.c.nickel_plates": "[UNTRANSLATED] Nickel Plates", "tag.c.nickel_tiny_dusts": "[UNTRANSLATED] Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "[UNTRANSLATED] Nuclear Alloy Plates", + "tag.c.nuggets": "[UNTRANSLATED] Nuggets", + "tag.c.ores": "[UNTRANSLATED] Ores", + "tag.c.plates": "[UNTRANSLATED] Plates", "tag.c.platinum_blocks": "[UNTRANSLATED] Platinum Blocks", "tag.c.platinum_dusts": "[UNTRANSLATED] Platinum Dusts", "tag.c.platinum_ingots": "[UNTRANSLATED] Platinum Ingots", @@ -1320,6 +1326,7 @@ "tag.c.raw_lead_ores": "[UNTRANSLATED] Raw Lead Ores", "tag.c.raw_nickel_blocks": "[UNTRANSLATED] Raw Nickel Blocks", "tag.c.raw_nickel_ores": "[UNTRANSLATED] Raw Nickel Ores", + "tag.c.raw_ores": "[UNTRANSLATED] Raw Ores", "tag.c.raw_platinum_blocks": "[UNTRANSLATED] Raw Platinum Blocks", "tag.c.raw_platinum_ores": "[UNTRANSLATED] Raw Platinum Ores", "tag.c.raw_silver_blocks": "[UNTRANSLATED] Raw Silver Blocks", @@ -1387,6 +1394,7 @@ "tag.c.tin_ores": "[UNTRANSLATED] Tin Ores", "tag.c.tin_plates": "[UNTRANSLATED] Tin Plates", "tag.c.tin_tiny_dusts": "[UNTRANSLATED] Tin Tiny Dusts", + "tag.c.tiny_dusts": "[UNTRANSLATED] Tiny Dusts", "tag.c.titanium_blocks": "[UNTRANSLATED] Titanium Blocks", "tag.c.titanium_dusts": "[UNTRANSLATED] Titanium Dusts", "tag.c.titanium_gears": "[UNTRANSLATED] Titanium Gears", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json index 85effdeec..02cac54d9 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json @@ -1404,6 +1404,7 @@ "tag.c.diamond_dusts": "[UNTRANSLATED] Diamond Dusts", "tag.c.diamond_plates": "[UNTRANSLATED] Diamond Plates", "tag.c.diamond_tiny_dusts": "[UNTRANSLATED] Diamond Tiny Dusts", + "tag.c.dusts": "[UNTRANSLATED] Dusts", "tag.c.electrum_blocks": "[UNTRANSLATED] Electrum Blocks", "tag.c.electrum_dusts": "[UNTRANSLATED] Electrum Dusts", "tag.c.electrum_ingots": "[UNTRANSLATED] Electrum Ingots", @@ -1414,6 +1415,7 @@ "tag.c.emerald_plates": "[UNTRANSLATED] Emerald Plates", "tag.c.emerald_tiny_dusts": "[UNTRANSLATED] Emerald Tiny Dusts", "tag.c.fire_clay_dusts": "[UNTRANSLATED] Fire Clay Dusts", + "tag.c.gears": "[UNTRANSLATED] Gears", "tag.c.gold_dusts": "[UNTRANSLATED] Gold Dusts", "tag.c.gold_gears": "[UNTRANSLATED] Gold Gears", "tag.c.gold_plates": "[UNTRANSLATED] Gold Plates", @@ -1428,6 +1430,7 @@ "tag.c.he_uranium_ingots": "[UNTRANSLATED] HE Uranium Ingots", "tag.c.he_uranium_nuggets": "[UNTRANSLATED] HE Uranium Nuggets", "tag.c.he_uranium_tiny_dusts": "[UNTRANSLATED] HE Uranium Tiny Dusts", + "tag.c.ingots": "[UNTRANSLATED] Ingots", "tag.c.invar_blocks": "[UNTRANSLATED] Invar Blocks", "tag.c.invar_dusts": "[UNTRANSLATED] Invar Dusts", "tag.c.invar_gears": "[UNTRANSLATED] Invar Gears", @@ -1494,6 +1497,9 @@ "tag.c.nickel_plates": "[UNTRANSLATED] Nickel Plates", "tag.c.nickel_tiny_dusts": "[UNTRANSLATED] Nickel Tiny Dusts", "tag.c.nuclear_alloy_plates": "[UNTRANSLATED] Nuclear Alloy Plates", + "tag.c.nuggets": "[UNTRANSLATED] Nuggets", + "tag.c.ores": "[UNTRANSLATED] Ores", + "tag.c.plates": "[UNTRANSLATED] Plates", "tag.c.platinum_blocks": "[UNTRANSLATED] Platinum Blocks", "tag.c.platinum_dusts": "[UNTRANSLATED] Platinum Dusts", "tag.c.platinum_ingots": "[UNTRANSLATED] Platinum Ingots", @@ -1517,6 +1523,7 @@ "tag.c.raw_lead_ores": "[UNTRANSLATED] Raw Lead Ores", "tag.c.raw_nickel_blocks": "[UNTRANSLATED] Raw Nickel Blocks", "tag.c.raw_nickel_ores": "[UNTRANSLATED] Raw Nickel Ores", + "tag.c.raw_ores": "[UNTRANSLATED] Raw Ores", "tag.c.raw_platinum_blocks": "[UNTRANSLATED] Raw Platinum Blocks", "tag.c.raw_platinum_ores": "[UNTRANSLATED] Raw Platinum Ores", "tag.c.raw_silver_blocks": "[UNTRANSLATED] Raw Silver Blocks", @@ -1584,6 +1591,7 @@ "tag.c.tin_ores": "[UNTRANSLATED] Tin Ores", "tag.c.tin_plates": "[UNTRANSLATED] Tin Plates", "tag.c.tin_tiny_dusts": "[UNTRANSLATED] Tin Tiny Dusts", + "tag.c.tiny_dusts": "[UNTRANSLATED] Tiny Dusts", "tag.c.titanium_blocks": "[UNTRANSLATED] Titanium Blocks", "tag.c.titanium_dusts": "[UNTRANSLATED] Titanium Dusts", "tag.c.titanium_gears": "[UNTRANSLATED] Titanium Gears", diff --git a/src/generated/resources/data/c/tags/items/dusts.json b/src/generated/resources/data/c/tags/items/dusts.json new file mode 100644 index 000000000..693833dce --- /dev/null +++ b/src/generated/resources/data/c/tags/items/dusts.json @@ -0,0 +1,60 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_dusts", + "#c:annealed_copper_dusts", + "#c:antimony_dusts", + "#c:battery_alloy_dusts", + "#c:bauxite_dusts", + "#c:beryllium_dusts", + "#c:brick_dusts", + "#c:bronze_dusts", + "#c:cadmium_dusts", + "#c:carbon_dusts", + "#c:chromium_dusts", + "#c:coal_dusts", + "#c:coke_dusts", + "#c:copper_dusts", + "#c:cupronickel_dusts", + "#c:diamond_dusts", + "#c:electrum_dusts", + "#c:emerald_dusts", + "#c:fire_clay_dusts", + "#c:gold_dusts", + "#c:he_mox_dusts", + "#c:he_uranium_dusts", + "#c:invar_dusts", + "#c:iridium_dusts", + "#c:iron_dusts", + "#c:kanthal_dusts", + "#c:lapis_dusts", + "#c:le_mox_dusts", + "#c:le_uranium_dusts", + "#c:lead_dusts", + "#c:lignite_coal_dusts", + "#c:manganese_dusts", + "#c:mozanite_dusts", + "#c:neodymium_dusts", + "#c:nickel_dusts", + "#c:platinum_dusts", + "#c:plutonium_dusts", + "#c:quartz_dusts", + "#c:ruby_dusts", + "#c:salt_dusts", + "#c:silicon_dusts", + "#c:silver_dusts", + "#c:sodium_dusts", + "#c:soldering_alloy_dusts", + "#c:stainless_steel_dusts", + "#c:steel_dusts", + "#c:sulfur_dusts", + "#c:superconductor_dusts", + "#c:tin_dusts", + "#c:titanium_dusts", + "#c:tungsten_dusts", + "#c:uranium_235_dusts", + "#c:uranium_238_dusts", + "#c:uranium_dusts", + "#c:yttrium_dusts" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/gears.json b/src/generated/resources/data/c/tags/items/gears.json new file mode 100644 index 000000000..8738fe3d1 --- /dev/null +++ b/src/generated/resources/data/c/tags/items/gears.json @@ -0,0 +1,15 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_gears", + "#c:bronze_gears", + "#c:copper_gears", + "#c:gold_gears", + "#c:invar_gears", + "#c:iron_gears", + "#c:stainless_steel_gears", + "#c:steel_gears", + "#c:tin_gears", + "#c:titanium_gears" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/ingots.json b/src/generated/resources/data/c/tags/items/ingots.json new file mode 100644 index 000000000..3379e6a2d --- /dev/null +++ b/src/generated/resources/data/c/tags/items/ingots.json @@ -0,0 +1,38 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_ingots", + "#c:annealed_copper_ingots", + "#c:antimony_ingots", + "#c:battery_alloy_ingots", + "#c:beryllium_ingots", + "#c:blastproof_alloy_ingots", + "#c:bronze_ingots", + "#c:cadmium_ingots", + "#c:chromium_ingots", + "#c:cupronickel_ingots", + "#c:electrum_ingots", + "#c:he_mox_ingots", + "#c:he_uranium_ingots", + "#c:invar_ingots", + "#c:iridium_ingots", + "#c:kanthal_ingots", + "#c:le_mox_ingots", + "#c:le_uranium_ingots", + "#c:lead_ingots", + "#c:nickel_ingots", + "#c:platinum_ingots", + "#c:plutonium_ingots", + "#c:silicon_ingots", + "#c:silver_ingots", + "#c:stainless_steel_ingots", + "#c:steel_ingots", + "#c:superconductor_ingots", + "#c:tin_ingots", + "#c:titanium_ingots", + "#c:tungsten_ingots", + "#c:uranium_235_ingots", + "#c:uranium_238_ingots", + "#c:uranium_ingots" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/nuggets.json b/src/generated/resources/data/c/tags/items/nuggets.json new file mode 100644 index 000000000..e0a7d79cc --- /dev/null +++ b/src/generated/resources/data/c/tags/items/nuggets.json @@ -0,0 +1,37 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_nuggets", + "#c:annealed_copper_nuggets", + "#c:antimony_nuggets", + "#c:battery_alloy_nuggets", + "#c:beryllium_nuggets", + "#c:bronze_nuggets", + "#c:chromium_nuggets", + "#c:copper_nuggets", + "#c:cupronickel_nuggets", + "#c:electrum_nuggets", + "#c:he_mox_nuggets", + "#c:he_uranium_nuggets", + "#c:invar_nuggets", + "#c:iridium_nuggets", + "#c:kanthal_nuggets", + "#c:le_mox_nuggets", + "#c:le_uranium_nuggets", + "#c:lead_nuggets", + "#c:nickel_nuggets", + "#c:platinum_nuggets", + "#c:plutonium_nuggets", + "#c:silicon_nuggets", + "#c:silver_nuggets", + "#c:stainless_steel_nuggets", + "#c:steel_nuggets", + "#c:superconductor_nuggets", + "#c:tin_nuggets", + "#c:titanium_nuggets", + "#c:tungsten_nuggets", + "#c:uranium_235_nuggets", + "#c:uranium_238_nuggets", + "#c:uranium_nuggets" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/ores.json b/src/generated/resources/data/c/tags/items/ores.json index d6f480c1b..9fd4b4317 100644 --- a/src/generated/resources/data/c/tags/items/ores.json +++ b/src/generated/resources/data/c/tags/items/ores.json @@ -1,19 +1,19 @@ { "replace": false, "values": [ - "#c:salt_ores", - "#c:platinum_ores", - "#c:lead_ores", - "#c:uranium_ores", - "#c:tin_ores", - "#c:quartz_ores", + "#c:antimony_ores", + "#c:bauxite_ores", "#c:iridium_ores", - "#c:tungsten_ores", - "#c:titanium_ores", + "#c:lead_ores", "#c:lignite_coal_ores", - "#c:bauxite_ores", - "#c:antimony_ores", + "#c:mozanite_ores", "#c:nickel_ores", - "#c:mozanite_ores" + "#c:platinum_ores", + "#c:quartz_ores", + "#c:salt_ores", + "#c:tin_ores", + "#c:titanium_ores", + "#c:tungsten_ores", + "#c:uranium_ores" ] } \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/plates.json b/src/generated/resources/data/c/tags/items/plates.json new file mode 100644 index 000000000..255918897 --- /dev/null +++ b/src/generated/resources/data/c/tags/items/plates.json @@ -0,0 +1,37 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_plates", + "#c:annealed_copper_plates", + "#c:battery_alloy_plates", + "#c:beryllium_plates", + "#c:blastproof_alloy_plates", + "#c:bronze_plates", + "#c:cadmium_plates", + "#c:carbon_plates", + "#c:chromium_plates", + "#c:copper_plates", + "#c:cupronickel_plates", + "#c:diamond_plates", + "#c:electrum_plates", + "#c:emerald_plates", + "#c:gold_plates", + "#c:invar_plates", + "#c:iridium_plates", + "#c:iron_plates", + "#c:kanthal_plates", + "#c:lapis_plates", + "#c:lead_plates", + "#c:nickel_plates", + "#c:nuclear_alloy_plates", + "#c:platinum_plates", + "#c:silicon_plates", + "#c:silver_plates", + "#c:stainless_steel_plates", + "#c:steel_plates", + "#c:superconductor_plates", + "#c:tin_plates", + "#c:titanium_plates", + "#c:tungsten_plates" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/raw_ores.json b/src/generated/resources/data/c/tags/items/raw_ores.json new file mode 100644 index 000000000..ca46a3f90 --- /dev/null +++ b/src/generated/resources/data/c/tags/items/raw_ores.json @@ -0,0 +1,15 @@ +{ + "replace": false, + "values": [ + "#c:raw_antimony_ores", + "#c:raw_iridium_ores", + "#c:raw_lead_ores", + "#c:raw_nickel_ores", + "#c:raw_platinum_ores", + "#c:raw_silver_ores", + "#c:raw_tin_ores", + "#c:raw_titanium_ores", + "#c:raw_tungsten_ores", + "#c:raw_uranium_ores" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/items/tiny_dusts.json b/src/generated/resources/data/c/tags/items/tiny_dusts.json new file mode 100644 index 000000000..59707e4fa --- /dev/null +++ b/src/generated/resources/data/c/tags/items/tiny_dusts.json @@ -0,0 +1,59 @@ +{ + "replace": false, + "values": [ + "#c:aluminum_tiny_dusts", + "#c:annealed_copper_tiny_dusts", + "#c:antimony_tiny_dusts", + "#c:battery_alloy_tiny_dusts", + "#c:bauxite_tiny_dusts", + "#c:beryllium_tiny_dusts", + "#c:brick_tiny_dusts", + "#c:bronze_tiny_dusts", + "#c:cadmium_tiny_dusts", + "#c:carbon_tiny_dusts", + "#c:chromium_tiny_dusts", + "#c:coal_tiny_dusts", + "#c:copper_tiny_dusts", + "#c:cupronickel_tiny_dusts", + "#c:diamond_tiny_dusts", + "#c:electrum_tiny_dusts", + "#c:emerald_tiny_dusts", + "#c:gold_tiny_dusts", + "#c:he_mox_tiny_dusts", + "#c:he_uranium_tiny_dusts", + "#c:invar_tiny_dusts", + "#c:iridium_tiny_dusts", + "#c:iron_tiny_dusts", + "#c:kanthal_tiny_dusts", + "#c:lapis_tiny_dusts", + "#c:le_mox_tiny_dusts", + "#c:le_uranium_tiny_dusts", + "#c:lead_tiny_dusts", + "#c:lignite_coal_tiny_dusts", + "#c:manganese_tiny_dusts", + "#c:mozanite_tiny_dusts", + "#c:neodymium_tiny_dusts", + "#c:nickel_tiny_dusts", + "#c:platinum_tiny_dusts", + "#c:plutonium_tiny_dusts", + "#c:quartz_tiny_dusts", + "#c:redstone_tiny_dusts", + "#c:ruby_tiny_dusts", + "#c:salt_tiny_dusts", + "#c:silicon_tiny_dusts", + "#c:silver_tiny_dusts", + "#c:sodium_tiny_dusts", + "#c:soldering_alloy_tiny_dusts", + "#c:stainless_steel_tiny_dusts", + "#c:steel_tiny_dusts", + "#c:sulfur_tiny_dusts", + "#c:superconductor_tiny_dusts", + "#c:tin_tiny_dusts", + "#c:titanium_tiny_dusts", + "#c:tungsten_tiny_dusts", + "#c:uranium_235_tiny_dusts", + "#c:uranium_238_tiny_dusts", + "#c:uranium_tiny_dusts", + "#c:yttrium_tiny_dusts" + ] +} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/datagen/tag/TagsToGenerate.java b/src/main/java/aztech/modern_industrialization/datagen/tag/TagsToGenerate.java index c80e68e01..f5c7fe826 100644 --- a/src/main/java/aztech/modern_industrialization/datagen/tag/TagsToGenerate.java +++ b/src/main/java/aztech/modern_industrialization/datagen/tag/TagsToGenerate.java @@ -35,16 +35,20 @@ public class TagsToGenerate { public static final Map tagTranslations = new HashMap<>(); static final Map> tagToBeAddedToAnotherTag = new HashMap<>(); + private static void addTranslation(String tag, String tagEnglishName) { + var tagId = new ResourceLocation(tag); + tagTranslations.put("tag.%s.%s".formatted(tagId.getNamespace(), tagId.getPath()).replace('/', '.'), tagEnglishName); + } + public static void generateTag(String tag, Item item, String tagEnglishName) { if (tag.startsWith("#")) { throw new IllegalArgumentException("Tag must not start with #: " + tag); } tagToItemMap.computeIfAbsent(tag, t -> new ArrayList<>()).add(item); - var tagId = new ResourceLocation(tag); - tagTranslations.put("tag.%s.%s".formatted(tagId.getNamespace(), tagId.getPath()).replace('/', '.'), tagEnglishName); + addTranslation(tag, tagEnglishName); } - public static void addTagToTag(String tagTobeAdded, String tagTarget) { + public static void addTagToTag(String tagTobeAdded, String tagTarget, String targetEnglishName) { if (tagTobeAdded.startsWith("#")) { throw new IllegalArgumentException("Tag must not start with #: " + tagTobeAdded); } @@ -52,7 +56,8 @@ public static void addTagToTag(String tagTobeAdded, String tagTarget) { throw new IllegalArgumentException("Tag must not start with #: " + tagTarget); } - tagToBeAddedToAnotherTag.computeIfAbsent(tagTarget, t -> new HashSet<>()).add(tagTobeAdded); + tagToBeAddedToAnotherTag.computeIfAbsent(tagTarget, t -> new TreeSet<>()).add(tagTobeAdded); + addTranslation(tagTarget, targetEnglishName); } public static void generateTag(TagKey tag, Item item, String tagEnglishName) { diff --git a/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java b/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java index 34ef04627..3eaf2fa89 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java @@ -29,6 +29,7 @@ import aztech.modern_industrialization.items.SortOrder; import java.util.HashSet; import java.util.List; +import java.util.Map; import java.util.Set; public class MIParts { @@ -98,6 +99,18 @@ public class MIParts { RAW_METAL_BLOCK); public static final Set TAGGED_PARTS = new HashSet<>(TAGGED_PARTS_LIST); + public static final Map CATEGORY_TAGS = Map.of( + DUST.key(), new CategoryTag("c:dusts", "Dusts"), + GEAR.key(), new CategoryTag("c:gears", "Gears"), + INGOT.key(), new CategoryTag("c:ingots", "Ingots"), + NUGGET.key(), new CategoryTag("c:nuggets", "Nuggets"), + PLATE.key(), new CategoryTag("c:plates", "Plates"), + RAW_METAL.key(), new CategoryTag("c:raw_ores", "Raw Ores"), + TINY_DUST.key(), new CategoryTag("c:tiny_dusts", "Tiny Dusts")); + + public record CategoryTag(String tag, String englishName) { + } + public static final List BLOCKS = PartKeyProvider.of(ORE, BARREL, BLOCK, COIL, MACHINE_CASING, MACHINE_CASING_SPECIAL, MACHINE_CASING_PIPE, RAW_METAL_BLOCK); diff --git a/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java b/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java index a73b1f3c9..a9060c817 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java @@ -131,7 +131,7 @@ public PartTemplate of(OrePartParams oreParams) { String tag = "c:" + partContext.getMaterialName() + "_ores"; TagsToGenerate.generateTag(tag, oreBlockBlockDefinition.asItem(), partContext.getMaterialEnglishName() + " Ores"); - TagsToGenerate.addTagToTag(tag, ConventionalItemTags.ORES.location().toString()); + TagsToGenerate.addTagToTag(tag, ConventionalItemTags.ORES.location().toString(), "Ores"); MIConfig config = MIConfig.getConfig(); diff --git a/src/main/java/aztech/modern_industrialization/materials/part/PartTemplate.java b/src/main/java/aztech/modern_industrialization/materials/part/PartTemplate.java index 9c3df28e0..458fee755 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/PartTemplate.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/PartTemplate.java @@ -85,7 +85,13 @@ private static void setupTag(MaterialBuilder.PartContext context, PartKey part, // added to the tags for (PartKey partTagged : MIParts.TAGGED_PARTS) { if (partTagged.equals(part)) { - TagsToGenerate.generateTag(itemTag.replaceFirst("#", ""), item, getTagEnglishName(context, itemTag)); + var generatedTag = itemTag.replaceFirst("#", ""); + TagsToGenerate.generateTag(generatedTag, item, getTagEnglishName(context, itemTag)); + + var categoryTag = MIParts.CATEGORY_TAGS.get(partTagged.key()); + if (categoryTag != null) { + TagsToGenerate.addTagToTag(generatedTag, categoryTag.tag(), categoryTag.englishName()); + } } } } From 307c87c00cc3f254a8479a64d4788dbeae136ed2 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:34:51 +0200 Subject: [PATCH 09/11] Add config option for max distillation tower size. Closes #553 --- .../resources/assets/modern_industrialization/lang/en_us.json | 1 + .../modern_industrialization/lang/untranslated/ko_kr.json | 1 + .../modern_industrialization/lang/untranslated/pt_br.json | 1 + .../modern_industrialization/lang/untranslated/ru_ru.json | 1 + .../modern_industrialization/lang/untranslated/zh_cn.json | 1 + .../modern_industrialization/lang/untranslated/zh_tw.json | 1 + src/main/java/aztech/modern_industrialization/MIConfig.java | 3 +++ .../multiblocks/DistillationTowerBlockEntity.java | 3 ++- 8 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/generated/resources/assets/modern_industrialization/lang/en_us.json b/src/generated/resources/assets/modern_industrialization/lang/en_us.json index 4f2df13a2..ca0df8319 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -1448,6 +1448,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "Ore Generation Enabled (Restart needed)", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "Display when a new version is available", "text.autoconfig.modern_industrialization.option.removeIndustrialistTrades": "Removes trades from the Industrialist villager (Restart needed)", "text.autoconfig.modern_industrialization.option.respawnWithGuideBook": "Grant Guidebook at Respawn", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json index 50aeff0d8..4625ef178 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ko_kr.json @@ -1655,6 +1655,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "광석 생성 활성화 (재시작 필요)", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "[UNTRANSLATED] Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "[UNTRANSLATED] Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "새로운 버전 알림 받기", "text.autoconfig.modern_industrialization.option.removeIndustrialistTrades": "[UNTRANSLATED] Removes trades from the Industrialist villager (Restart needed)", "text.autoconfig.modern_industrialization.option.replicatorBlacklist": "[UNUSED, PLEASE REMOVE] 복제기 블랙리스트", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json index 53781905a..d10c90d7f 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/pt_br.json @@ -1449,6 +1449,7 @@ "text.autoconfig.modern_industrialization.option.enableNoJeiMessage": "[UNUSED, PLEASE REMOVE] Ativar mensagem de login quando JEI e REI não estão presentes", "text.autoconfig.modern_industrialization.option.generateOres": "Geração de Minérios Ativada (Requer Reinício)", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "[UNTRANSLATED] Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "[UNTRANSLATED] Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "Mostrar quando uma nova versão está disponível", "text.autoconfig.modern_industrialization.option.removeIndustrialistTrades": "[UNTRANSLATED] Removes trades from the Industrialist villager (Restart needed)", "text.autoconfig.modern_industrialization.option.respawnWithGuideBook": "Dar Guia ao Renascer", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json index 873357dbc..94dec9bcb 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/ru_ru.json @@ -1449,6 +1449,7 @@ "text.autoconfig.modern_industrialization.option.enableNoJeiMessage": "[UNUSED, PLEASE REMOVE] Включить сообщение при входе в игру в том случае, когда отсутствуют JEI и REI", "text.autoconfig.modern_industrialization.option.generateOres": "Включить генерацию руды (Необходим перезапуск)", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "[UNTRANSLATED] Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "[UNTRANSLATED] Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "Отобразить, когда доступна новая версия", "text.autoconfig.modern_industrialization.option.removeIndustrialistTrades": "[UNTRANSLATED] Removes trades from the Industrialist villager (Restart needed)", "text.autoconfig.modern_industrialization.option.respawnWithGuideBook": "Предоставить руководство при возрождении", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json index 4d018a054..c4f05ef56 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_cn.json @@ -1448,6 +1448,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "启用全部矿物生成(需要重新启动)", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "[UNTRANSLATED] Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "[UNTRANSLATED] Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "有新版本可用时显示", "text.autoconfig.modern_industrialization.option.removeIndustrialistTrades": "[UNTRANSLATED] Removes trades from the Industrialist villager (Restart needed)", "text.autoconfig.modern_industrialization.option.respawnWithGuideBook": "重生时给予指南", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json index 02cac54d9..b6b9975bf 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json @@ -1645,6 +1645,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "啟用全部礦物生成", "text.autoconfig.modern_industrialization.option.loadRuntimeGeneratedResources": "[UNTRANSLATED] Additionally load resources in modern_industrialization/generated_resources", + "text.autoconfig.modern_industrialization.option.maxDistillationTowerHeight": "[UNTRANSLATED] Maximum height of the Distillation Tower multiblock (Restart needed)", "text.autoconfig.modern_industrialization.option.newVersionMessage": "[UNTRANSLATED] Display when a new version is available", "text.autoconfig.modern_industrialization.option.ores": "[UNUSED, PLEASE REMOVE] 啟用獨立礦物生成", "text.autoconfig.modern_industrialization.option.ores.generateAntimony": "[UNUSED, PLEASE REMOVE] 生成銻礦", diff --git a/src/main/java/aztech/modern_industrialization/MIConfig.java b/src/main/java/aztech/modern_industrialization/MIConfig.java index abfa4ca11..13aa88a84 100644 --- a/src/main/java/aztech/modern_industrialization/MIConfig.java +++ b/src/main/java/aztech/modern_industrialization/MIConfig.java @@ -82,6 +82,9 @@ public class MIConfig implements ConfigData { @ConfigEntry.Gui.RequiresRestart @EnglishTranslation(value = "Removes trades from the Industrialist villager (Restart needed)") public boolean removeIndustrialistTrades = false; + @ConfigEntry.Gui.RequiresRestart + @EnglishTranslation(value = "Maximum height of the Distillation Tower multiblock (Restart needed)") + public int maxDistillationTowerHeight = 9; @ConfigEntry.Gui.Excluded private transient static boolean registered = false; diff --git a/src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/DistillationTowerBlockEntity.java b/src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/DistillationTowerBlockEntity.java index 8272ffc0c..630c3ef25 100644 --- a/src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/DistillationTowerBlockEntity.java +++ b/src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/DistillationTowerBlockEntity.java @@ -24,6 +24,7 @@ package aztech.modern_industrialization.machines.blockentities.multiblocks; import aztech.modern_industrialization.MIBlock; +import aztech.modern_industrialization.MIConfig; import aztech.modern_industrialization.MIIdentifier; import aztech.modern_industrialization.MIText; import aztech.modern_industrialization.compat.rei.machines.ReiMachineRecipes; @@ -52,7 +53,7 @@ // TODO: should the common part with ElectricCraftingMultiblockBlockEntity be refactored? public class DistillationTowerBlockEntity extends AbstractCraftingMultiblockBlockEntity implements EnergyListComponentHolder { - private static final int MAX_HEIGHT = 9; + private static final int MAX_HEIGHT = MIConfig.getConfig().maxDistillationTowerHeight; private static final ShapeTemplate[] shapeTemplates; public DistillationTowerBlockEntity(BEP bep) { From 0653a964a034867b1d086ec8c564623c771129fd Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 10:59:10 +0200 Subject: [PATCH 10/11] Inject generated_resources/ pack right after mods pack (i.e. with lower priority than kubejs pack). Closes #481 --- .../RuntimeResourcesHelper.java | 22 +++++++++++++++++++ .../MultiPackResourceManagerMixin.java | 2 +- .../runtime_resources/PackConfigMixin.java | 2 +- .../ReloadableResourceManagerMixin.java | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeResourcesHelper.java b/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeResourcesHelper.java index 192ce2fa1..834cf004c 100644 --- a/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeResourcesHelper.java +++ b/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeResourcesHelper.java @@ -24,6 +24,7 @@ package aztech.modern_industrialization.misc.runtime_datagen; import aztech.modern_industrialization.resource.GeneratedFolderPackResources; +import java.util.List; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.server.packs.PackResources; import net.minecraft.server.packs.PackType; @@ -35,4 +36,25 @@ public static PackResources createPack(PackType packType) { var generatedDirectory = FabricLoader.getInstance().getGameDir().resolve("modern_industrialization/generated_resources"); return new GeneratedFolderPackResources(generatedDirectory.toFile(), packType); } + + public static void injectPack(PackType packType, List list) { + // Try to inject right after "Fabric Mods" pack + for (int i = 0; i < list.size(); ++i) { + var pack = list.get(i); + if (pack.getName().equals("Fabric Mods")) { + list.add(i + 1, createPack(packType)); + return; + } + } + // No "Fabric Mods" pack - inject after vanilla pack + for (int i = 0; i < list.size(); ++i) { + var pack = list.get(i); + if (pack.getName().equals("Default")) { + list.add(i + 1, createPack(packType)); + return; + } + } + // Otherwise inject at end + list.add(createPack(packType)); + } } diff --git a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/MultiPackResourceManagerMixin.java b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/MultiPackResourceManagerMixin.java index e9217ef4c..e81ebf582 100644 --- a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/MultiPackResourceManagerMixin.java +++ b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/MultiPackResourceManagerMixin.java @@ -49,7 +49,7 @@ private void injectRuntimeResources(PackType packType, List list, if (RuntimeResourcesHelper.IS_CREATING_SERVER_RELOAD_PACK.get() != null) { RuntimeResourcesHelper.IS_CREATING_SERVER_RELOAD_PACK.remove(); packs = new ArrayList<>(packs); - packs.add(RuntimeResourcesHelper.createPack(packType)); + RuntimeResourcesHelper.injectPack(packType, packs); } } } diff --git a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/PackConfigMixin.java b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/PackConfigMixin.java index a3a29f110..0dcdc0f34 100644 --- a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/PackConfigMixin.java +++ b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/PackConfigMixin.java @@ -40,7 +40,7 @@ public class PackConfigMixin { private List injectCreateReload(List resourcePacks) { if (MIConfig.getConfig().loadRuntimeGeneratedResources) { var mutableList = new ArrayList<>(resourcePacks); - mutableList.add(RuntimeResourcesHelper.createPack(PackType.SERVER_DATA)); + RuntimeResourcesHelper.injectPack(PackType.SERVER_DATA, mutableList); return mutableList; } else { return resourcePacks; diff --git a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/ReloadableResourceManagerMixin.java b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/ReloadableResourceManagerMixin.java index 54f73783d..ec9a3fb93 100644 --- a/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/ReloadableResourceManagerMixin.java +++ b/src/main/java/aztech/modern_industrialization/mixin/runtime_resources/ReloadableResourceManagerMixin.java @@ -40,7 +40,7 @@ public abstract class ReloadableResourceManagerMixin { private List injectCreateReload(List resourcePacks) { if (MIConfig.getConfig().loadRuntimeGeneratedResources) { var mutableList = new ArrayList<>(resourcePacks); - mutableList.add(RuntimeResourcesHelper.createPack(PackType.CLIENT_RESOURCES)); + RuntimeResourcesHelper.injectPack(PackType.CLIENT_RESOURCES, mutableList); return mutableList; } else { return resourcePacks; From 416513b58e07951ec853ee22c18bb3573cf71fb1 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 30 Sep 2023 11:16:54 +0200 Subject: [PATCH 11/11] Spell qubit properly (thanks @PoolloverNathan) --- .../resources/assets/modern_industrialization/lang/en_us.json | 2 +- .../modern_industrialization/lang/untranslated/zh_tw.json | 2 +- src/main/java/aztech/modern_industrialization/MIItem.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/generated/resources/assets/modern_industrialization/lang/en_us.json b/src/generated/resources/assets/modern_industrialization/lang/en_us.json index ca0df8319..d4455090e 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -861,7 +861,7 @@ "item.modern_industrialization.purple_fluid_pipe": "Purple Fluid Pipe", "item.modern_industrialization.purple_item_pipe": "Purple Item Pipe", "item.modern_industrialization.purple_me_wire": "Purple ME Wire", - "item.modern_industrialization.qbit": "QBit", + "item.modern_industrialization.qbit": "Qubit", "item.modern_industrialization.quantum_boots": "Quantum Boots", "item.modern_industrialization.quantum_chestplate": "Quantum Chestplate", "item.modern_industrialization.quantum_circuit": "Quantum Circuit", diff --git a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json index b6b9975bf..1d5e5d35c 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json +++ b/src/generated/resources/assets/modern_industrialization/lang/untranslated/zh_tw.json @@ -1025,7 +1025,7 @@ "item.modern_industrialization.purple_fluid_pipe": "[UNTRANSLATED] Purple Fluid Pipe", "item.modern_industrialization.purple_item_pipe": "[UNTRANSLATED] Purple Item Pipe", "item.modern_industrialization.purple_me_wire": "[UNTRANSLATED] Purple ME Wire", - "item.modern_industrialization.qbit": "[UNTRANSLATED] QBit", + "item.modern_industrialization.qbit": "[UNTRANSLATED] Qubit", "item.modern_industrialization.quantum_boots": "[UNTRANSLATED] Quantum Boots", "item.modern_industrialization.quantum_chestplate": "[UNTRANSLATED] Quantum Chestplate", "item.modern_industrialization.quantum_circuit": "[UNTRANSLATED] Quantum Circuit", diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index d92a5c166..44f2f5236 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -124,7 +124,8 @@ public final class MIItem { public static final ItemDefinition RANDOM_ACCESS_MEMORY = item("Random Access Memory", "random_access_memory", ITEMS_OTHER); // Quantum circuits - public static final ItemDefinition QBIT = item("QBit", "qbit", (p) -> new Item(p.rarity(Rarity.RARE)), ITEMS_OTHER); + // TODO 1.21: Change item id to "qubit" + public static final ItemDefinition QUBIT = item("Qubit", "qbit", (p) -> new Item(p.rarity(Rarity.RARE)), ITEMS_OTHER); public static final ItemDefinition COOLING_CELL = item("Cooling Cell", "cooling_cell", ITEMS_OTHER); public static final ItemDefinition ULTRADENSE_METAL_BALL = item("Ultradense Metal Ball", "ultradense_metal_ball", ITEMS_OTHER); public static final ItemDefinition SINGULARITY = item("Singularity", "singularity", p -> new Item(p.rarity(Rarity.EPIC)), ITEMS_OTHER);