diff --git a/src/client/java/aztech/modern_industrialization/util/RenderHelper.java b/src/client/java/aztech/modern_industrialization/util/RenderHelper.java index 645e7023e..f1486ccae 100644 --- a/src/client/java/aztech/modern_industrialization/util/RenderHelper.java +++ b/src/client/java/aztech/modern_industrialization/util/RenderHelper.java @@ -226,6 +226,8 @@ public static void drawFluidInGui(GuiGraphics guiGraphics, FluidVariant fluid, f BufferUploader.drawWithShader(bufferBuilder.end()); RenderSystem.enableDepthTest(); + + SodiumCompat.markSpriteActive(sprite); } /** 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 928f397b5..b772ed5d5 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", @@ -1205,6 +1205,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", @@ -1215,6 +1216,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", @@ -1229,6 +1231,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", @@ -1295,6 +1298,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", @@ -1318,6 +1324,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", @@ -1385,6 +1392,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", @@ -1438,6 +1446,7 @@ "text.autoconfig.modern_industrialization.option.enableHatchPlacementOverlay": "Show valid positions in multiblocks when holding a hatch", "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "Enable login message when EMI, JEI and REI are missing", "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 8e7461279..e7a00e665 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 @@ -1420,6 +1420,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", @@ -1430,6 +1431,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", @@ -1444,6 +1446,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", @@ -1510,6 +1513,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", @@ -1533,6 +1539,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", @@ -1600,6 +1607,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", @@ -1654,6 +1662,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "[UNUSED, PLEASE REMOVE] 광석 생성 활성화 (재시작 필요)", "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 fc1387c5d..01b8cdefd 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 @@ -1213,6 +1213,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", @@ -1223,6 +1224,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", @@ -1237,6 +1239,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", @@ -1303,6 +1306,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", @@ -1326,6 +1332,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", @@ -1393,6 +1400,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", @@ -1448,6 +1456,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": "[UNUSED, PLEASE REMOVE] 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 6702b6293..20be90784 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 @@ -1213,6 +1213,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", @@ -1223,6 +1224,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", @@ -1237,6 +1239,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", @@ -1303,6 +1306,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", @@ -1326,6 +1332,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", @@ -1393,6 +1400,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", @@ -1448,6 +1456,7 @@ "text.autoconfig.modern_industrialization.option.enableNoJeiMessage": "[UNUSED, PLEASE REMOVE] Включить сообщение при входе в игру в том случае, когда отсутствуют JEI и REI", "text.autoconfig.modern_industrialization.option.generateOres": "[UNUSED, PLEASE REMOVE] Включить генерацию руды (Необходим перезапуск)", "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 41d4ed677..6e7ca7c42 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 @@ -1213,6 +1213,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", @@ -1223,6 +1224,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", @@ -1237,6 +1239,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", @@ -1303,6 +1306,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", @@ -1326,6 +1332,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", @@ -1393,6 +1400,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", @@ -1447,6 +1455,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "[UNUSED, PLEASE REMOVE] 启用全部矿物生成(需要重新启动)", "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 5ae67fcaa..afe00bbca 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 @@ -1028,7 +1028,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", @@ -1407,6 +1407,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", @@ -1417,6 +1418,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", @@ -1431,6 +1433,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", @@ -1497,6 +1500,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", @@ -1520,6 +1526,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", @@ -1587,6 +1594,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", @@ -1641,6 +1649,7 @@ "text.autoconfig.modern_industrialization.option.enableNoEmiMessage": "[UNTRANSLATED] Enable login message when EMI, JEI and REI are missing", "text.autoconfig.modern_industrialization.option.generateOres": "[UNUSED, PLEASE REMOVE] 啟用全部礦物生成", "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/generated/resources/data/c/tags/items/dusts.json b/src/generated/resources/data/c/tags/items/dusts.json new file mode 100644 index 000000000..92a9ab745 --- /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:monazite_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 de44d2043..452b76432 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:monazite_ores", - "#c:bauxite_ores", - "#c:antimony_ores", - "#c:nickel_ores" + "#c:nickel_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..cafaf124b --- /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:monazite_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/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 00f08b1ac..fdc1e23fb 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/MIConfig.java b/src/main/java/aztech/modern_industrialization/MIConfig.java index 0da9ddaad..5dad35534 100644 --- a/src/main/java/aztech/modern_industrialization/MIConfig.java +++ b/src/main/java/aztech/modern_industrialization/MIConfig.java @@ -75,6 +75,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/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index b21016d5b..7a29e7543 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -123,7 +123,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); diff --git a/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java b/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java index 14dc4715a..f0d06fbaa 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.*; @@ -110,6 +111,7 @@ public static void initialize() { setupPackets(); setupFuels(); MIArmorEffects.init(); + QuantumSword.init(); setupWrench(); ChunkEventListeners.init(); 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 85e65b1d5..c769e9538 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(); + } + }); } }; 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 8f19ae810..a5fa752c8 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) 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/inventory/ConfigurableItemStack.java b/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java index 528c74822..21f40e4d7 100644 --- a/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java +++ b/src/main/java/aztech/modern_industrialization/inventory/ConfigurableItemStack.java @@ -219,12 +219,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 e1b018cf7..eb94281c0 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; } @@ -64,7 +64,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/items/tools/QuantumSword.java b/src/main/java/aztech/modern_industrialization/items/tools/QuantumSword.java index daf79b7b6..b843f195c 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.DamageTypes; 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(attacker.level().damageSources().source(DamageTypes.GENERIC_KILL, attacker), 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 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 fafd74e16..1298a5100 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 8153765e1..0f512cfad 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/blockentities/multiblocks/DistillationTowerBlockEntity.java b/src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/DistillationTowerBlockEntity.java index 87adb5c29..9ad97034d 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.api.machine.holder.EnergyListComponentHolder; @@ -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) { 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); } 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(); 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 183e86e15..0ba5b800c 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/OrePart.java @@ -125,7 +125,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"); if (oreParams.generate) { ResourceLocation oreGenId = new MIIdentifier( 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 63b1fd117..3ab864f9e 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()); + } } } } diff --git a/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeDataGen.java b/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeDataGen.java index 5a36de0ab..fe869e633 100644 --- a/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeDataGen.java +++ b/src/main/java/aztech/modern_industrialization/misc/runtime_datagen/RuntimeDataGen.java @@ -29,18 +29,20 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; import java.util.stream.Stream; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.Util; +import net.minecraft.core.Registry; import net.minecraft.core.RegistryAccess; +import net.minecraft.core.RegistrySetBuilder; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.registries.VanillaRegistries; +import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.resources.ResourceKey; public class RuntimeDataGen { public static void run(Consumer config) { @@ -73,7 +75,23 @@ private static void runInner(Consumer config) throws E var registriesFuture = CompletableFuture.supplyAsync(() -> { var vanillaBuilder = VanillaRegistries.BUILDER; DynamicRegistryDatagen.run(vanillaBuilder); - return vanillaBuilder.build(RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY)); + + // Combine entries by registry + Map>, List>> map = new HashMap<>(); + for (var entry : vanillaBuilder.entries) { + map.computeIfAbsent(entry.key(), k -> new ArrayList<>()).add(entry.bootstrap()); + } + + var combinedBuilder = new RegistrySetBuilder(); + for (var entry : map.entrySet()) { + combinedBuilder.add((ResourceKey) entry.getKey(), ctx -> { + for (var bootstrap : entry.getValue()) { + bootstrap.run((BootstapContext) ctx); + } + }); + } + + return combinedBuilder.build(RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY)); }, Util.backgroundExecutor()); var gen = new FabricDataGenerator(dataOutput, modContainer, true, registriesFuture); config.accept(gen.createPack()); 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 5379beac2..81d0d0ec0 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.GeneratedPathPackResources; +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 GeneratedPathPackResources(generatedDirectory, 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.packId().equals("fabric")) { + 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.packId().equals("vanilla")) { + 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 13e8f6f7d..d3f0903cb 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; 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 2a359c520..05d7758d8 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; } } diff --git a/src/main/resources/modern_industrialization.accesswidener b/src/main/resources/modern_industrialization.accesswidener index 47a946a24..426af72db 100644 --- a/src/main/resources/modern_industrialization.accesswidener +++ b/src/main/resources/modern_industrialization.accesswidener @@ -19,6 +19,8 @@ accessible field net/minecraft/data/models/ItemModelGenerators output Ljav accessible field net/minecraft/data/DataGenerator$PackGenerator output Lnet/minecraft/data/PackOutput; # Used by runtime datagen +accessible class net/minecraft/core/RegistrySetBuilder$RegistryStub +accessible field net/minecraft/core/RegistrySetBuilder entries Ljava/util/List; accessible field net/minecraft/data/registries/VanillaRegistries BUILDER Lnet/minecraft/core/RegistrySetBuilder; # Access list of renderables in the screen