From 8c687d40b0fd4f912ce54bb58694e7858b7a6cca Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 22 Oct 2023 12:56:10 -0700 Subject: [PATCH 01/18] Remove references to diesel tools --- .../viewer/impl/rei/ManualPluginRei.java | 24 +- .../viewer/usage/FluidFuelsCategory.java | 8 +- .../modern_industrialization/lang/en_us.json | 4 - .../lang/untranslated/ko_kr.json | 6 - .../lang/untranslated/pt_br.json | 6 - .../lang/untranslated/ru_ru.json | 6 - .../lang/untranslated/zh_cn.json | 12 +- .../lang/untranslated/zh_tw.json | 6 - .../models/item/diesel_chainsaw.json | 6 - .../models/item/diesel_mining_drill.json | 6 - .../advancements/diesel_chainsaw.json | 38 --- .../advancements/diesel_mining_drill.json | 38 --- .../modern_industrialization/MIItem.java | 27 +- .../advancement/MIAdvancementsProvider.java | 2 - .../items/diesel_tools/DieselToolItem.java | 298 ------------------ .../modern_industrialization/lang/ko_kr.json | 6 - .../modern_industrialization/lang/pt_br.json | 6 - .../modern_industrialization/lang/ru_ru.json | 6 - .../modern_industrialization/lang/zh_cn.json | 10 - .../modern_industrialization/lang/zh_tw.json | 6 - .../en_us/entries/electric_age/jetpack.json | 10 - .../ko_kr/entries/electric_age/jetpack.json | 10 - .../ru_ru/entries/electric_age/jetpack.json | 10 - .../zh_cn/entries/electric_age/jetpack.json | 10 - .../textures/item/diesel_chainsaw.png | Bin 2148 -> 0 bytes .../textures/item/diesel_mining_drill.png | Bin 2423 -> 0 bytes .../resources/data/c/tags/items/axes.json | 1 - .../resources/data/c/tags/items/hoes.json | 1 - .../resources/data/c/tags/items/pickaxes.json | 1 - .../resources/data/c/tags/items/shears.json | 1 - .../resources/data/c/tags/items/shovels.json | 1 - .../resources/data/c/tags/items/swords.json | 1 - .../recipes/tools/diesel_chainsaw.json | 25 -- .../recipes/tools/diesel_mining_drill.json | 31 -- 34 files changed, 25 insertions(+), 598 deletions(-) delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/diesel_chainsaw.json delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/diesel_mining_drill.json delete mode 100644 src/generated/resources/data/modern_industrialization/advancements/diesel_chainsaw.json delete mode 100644 src/generated/resources/data/modern_industrialization/advancements/diesel_mining_drill.json delete mode 100644 src/main/java/aztech/modern_industrialization/items/diesel_tools/DieselToolItem.java delete mode 100644 src/main/resources/assets/modern_industrialization/textures/item/diesel_chainsaw.png delete mode 100644 src/main/resources/assets/modern_industrialization/textures/item/diesel_mining_drill.png delete mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/diesel_chainsaw.json delete mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/diesel_mining_drill.json diff --git a/src/client/java/aztech/modern_industrialization/compat/viewer/impl/rei/ManualPluginRei.java b/src/client/java/aztech/modern_industrialization/compat/viewer/impl/rei/ManualPluginRei.java index 73c1d3614..f0e5e52b9 100644 --- a/src/client/java/aztech/modern_industrialization/compat/viewer/impl/rei/ManualPluginRei.java +++ b/src/client/java/aztech/modern_industrialization/compat/viewer/impl/rei/ManualPluginRei.java @@ -23,33 +23,12 @@ */ package aztech.modern_industrialization.compat.viewer.impl.rei; -import aztech.modern_industrialization.items.diesel_tools.DieselToolItem; import aztech.modern_industrialization.machines.gui.MachineScreen; import me.shedaniel.rei.api.client.plugins.REIClientPlugin; -import me.shedaniel.rei.api.client.registry.category.CategoryRegistry; import me.shedaniel.rei.api.client.registry.screen.ScreenRegistry; import me.shedaniel.rei.api.client.registry.transfer.TransferHandlerRegistry; -import me.shedaniel.rei.api.common.util.EntryStacks; -import me.shedaniel.rei.plugin.common.BuiltinPlugin; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.tags.ItemTags; -import net.minecraft.world.item.Item; public class ManualPluginRei implements REIClientPlugin { - @Override - public void registerCategories(CategoryRegistry registry) { - for (Item item : BuiltInRegistries.ITEM) { - if (item instanceof DieselToolItem) { - if (item.builtInRegistryHolder().is(ItemTags.AXES)) { - registry.addWorkstations(BuiltinPlugin.STRIPPING, EntryStacks.of(item)); - } - if (item.builtInRegistryHolder().is(ItemTags.SHOVELS)) { - registry.addWorkstations(BuiltinPlugin.PATHING, EntryStacks.of(item)); - } - } - } - } - @Override public void registerTransferHandlers(TransferHandlerRegistry registry) { registry.register(new MachineSlotLockingHandler()); @@ -62,7 +41,8 @@ public void registerScreens(ScreenRegistry registry) { registry.registerClickArea(MachineScreen.class, new MachineClickAreaHandler()); registry.registerFocusedStack(new MachineFocusedStackProvider()); registry.exclusionZones().register(MachineScreen.class, screen -> { - return screen.getExtraBoxes().stream().map(r -> new me.shedaniel.math.Rectangle(r.x(), r.y(), r.w(), r.h())).toList(); + return screen.getExtraBoxes().stream().map(r -> new me.shedaniel.math.Rectangle(r.x(), r.y(), r.w(), r.h())) + .toList(); }); } } diff --git a/src/client/java/aztech/modern_industrialization/compat/viewer/usage/FluidFuelsCategory.java b/src/client/java/aztech/modern_industrialization/compat/viewer/usage/FluidFuelsCategory.java index ae1424cb8..7ed5b58b3 100644 --- a/src/client/java/aztech/modern_industrialization/compat/viewer/usage/FluidFuelsCategory.java +++ b/src/client/java/aztech/modern_industrialization/compat/viewer/usage/FluidFuelsCategory.java @@ -38,16 +38,18 @@ public class FluidFuelsCategory extends ViewerCategory { public FluidFuelsCategory() { - super(Fluid.class, new MIIdentifier("fluid_fuels"), MIText.FluidFuels.text(), MIFluids.DIESEL.getBucket().getDefaultInstance(), 150, 35); + super(Fluid.class, new MIIdentifier("fluid_fuels"), MIText.FluidFuels.text(), + MIFluids.DIESEL.getBucket().getDefaultInstance(), 150, 35); } @Override public void buildWorkstations(WorkstationConsumer consumer) { - consumer.accept("lv_diesel_generator", "mv_diesel_generator", "hv_diesel_generator", "large_diesel_generator", "large_steam_boiler", + consumer.accept("lv_diesel_generator", "mv_diesel_generator", "hv_diesel_generator", "large_diesel_generator", + "large_steam_boiler", "advanced_large_steam_boiler", "high_pressure_large_steam_boiler", "high_pressure_advanced_large_steam_boiler"); - consumer.accept(MIItem.DIESEL_JETPACK, MIItem.DIESEL_CHAINSAW, MIItem.DIESEL_MINING_DRILL); + consumer.accept(MIItem.DIESEL_JETPACK); } @Override 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 b772ed5d5..b2817681e 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -25,12 +25,8 @@ "advancements.modern_industrialization.chemical_reactor.description": "Craft a Chemical Reactor", "advancements.modern_industrialization.coke_oven": "Coke-A Cola", "advancements.modern_industrialization.coke_oven.description": "Craft a Coke Oven to start Steel Production", - "advancements.modern_industrialization.diesel_chainsaw": "The Texas Chain Saw Massacre", - "advancements.modern_industrialization.diesel_chainsaw.description": "Craft a Diesel Chainsaw", "advancements.modern_industrialization.diesel_jetpack": "Ely... We Meant Jetpack!", "advancements.modern_industrialization.diesel_jetpack.description": "Craft a Diesel Jetpack", - "advancements.modern_industrialization.diesel_mining_drill": "Through The Walls Of Ba Sing Se", - "advancements.modern_industrialization.diesel_mining_drill.description": "Craft a Diesel Mining Drill", "advancements.modern_industrialization.digital_circuit": "No need for Sodium anymore", "advancements.modern_industrialization.digital_circuit.description": "Craft a Digital Circuit", "advancements.modern_industrialization.distillation_tower": "TOTAL™ Distillation", 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 e7a00e665..3dd37b4b7 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 @@ -33,14 +33,10 @@ "advancements.modern_industrialization.coke_oven.description": "강철 생산을 위해 코크스로를 제작하세요", "advancements.modern_industrialization.crowbar": "[UNUSED, PLEASE REMOVE] 나는 빠루고, 얘는 ...", "advancements.modern_industrialization.crowbar.description": "[UNUSED, PLEASE REMOVE] ... 내 친구 빠루야. 기계 및 케이싱을 손보기 위해 빠루를 제작하세요", - "advancements.modern_industrialization.diesel_chainsaw": "텍사스 전기톱 연쇄살인사건", - "advancements.modern_industrialization.diesel_chainsaw.description": "디젤 전기톱을 제작하세요", "advancements.modern_industrialization.diesel_generator": "[UNUSED, PLEASE REMOVE] 분노의 질주", "advancements.modern_industrialization.diesel_generator.description": "[UNUSED, PLEASE REMOVE] 디젤 발전기를 제작하세요", "advancements.modern_industrialization.diesel_jetpack": "어... 그니까 제트팩이에요!", "advancements.modern_industrialization.diesel_jetpack.description": "디젤 제트팩을 제작하세요", - "advancements.modern_industrialization.diesel_mining_drill": "바싱세의 벽을 넘어", - "advancements.modern_industrialization.diesel_mining_drill.description": "디젤 채광용 드릴을 제작하세요", "advancements.modern_industrialization.digital_circuit": "더이상 나트륨은 필요 없어", "advancements.modern_industrialization.digital_circuit.description": "디지털 회로를 제작하세요", "advancements.modern_industrialization.distillation_tower": "완벽™ 증류", @@ -777,9 +773,7 @@ "item.modern_industrialization.diamond_plate": "다이아몬드 판", "item.modern_industrialization.diamond_tiny_dust": "작은 다이아몬드 가루", "item.modern_industrialization.diesel_bucket": "[UNTRANSLATED] Diesel Bucket", - "item.modern_industrialization.diesel_chainsaw": "디젤 전기톱", "item.modern_industrialization.diesel_jetpack": "디젤 제트팩", - "item.modern_industrialization.diesel_mining_drill": "디젤 채광 드릴", "item.modern_industrialization.diethyl_ether_bucket": "[UNTRANSLATED] Diethyl Ether Bucket", "item.modern_industrialization.digital_circuit": "디지털 회로", "item.modern_industrialization.digital_circuit_board": "디지털 회로 판", 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 01b8cdefd..f1898fd8f 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 @@ -25,14 +25,10 @@ "advancements.modern_industrialization.chemical_reactor.description": "Fabrique um Reator Químico", "advancements.modern_industrialization.coke_oven": "Coque-Cola", "advancements.modern_industrialization.coke_oven.description": "Fabrique um Forno de Coque para começar a produzir Aço", - "advancements.modern_industrialization.diesel_chainsaw": "O Massacre da Serra Elétrica", - "advancements.modern_industrialization.diesel_chainsaw.description": "Fabrique uma Motosserra à Diesel", "advancements.modern_industrialization.diesel_generator": "[UNUSED, PLEASE REMOVE] Velozes e Furiosos", "advancements.modern_industrialization.diesel_generator.description": "[UNUSED, PLEASE REMOVE] Fabrique um Gerador à Diesel", "advancements.modern_industrialization.diesel_jetpack": "Éli... Quer Dizer, Jetpack!", "advancements.modern_industrialization.diesel_jetpack.description": "Fabrique uma Jetpack à Diesel", - "advancements.modern_industrialization.diesel_mining_drill": "Pelas Paredes de Ba Sing Se", - "advancements.modern_industrialization.diesel_mining_drill.description": "Fabrique uma Broca de Mineração à Diesel", "advancements.modern_industrialization.digital_circuit": "Sem Uso para Sódio Agora", "advancements.modern_industrialization.digital_circuit.description": "Fabrique um Circuito Digital", "advancements.modern_industrialization.distillation_tower": "Destilação TOTAL™", @@ -625,9 +621,7 @@ "item.modern_industrialization.diamond_plate": "Chapa de Diamante", "item.modern_industrialization.diamond_tiny_dust": "Pó Pequeno de Diamante", "item.modern_industrialization.diesel_bucket": "Balde de Diesel", - "item.modern_industrialization.diesel_chainsaw": "Motosserra à Diesel", "item.modern_industrialization.diesel_jetpack": "Jetpack à Diesel", - "item.modern_industrialization.diesel_mining_drill": "Broca de Mineração à Diesel", "item.modern_industrialization.diethyl_ether_bucket": "Balde de Éter Etílico", "item.modern_industrialization.digital_circuit": "Circuito Digital", "item.modern_industrialization.digital_circuit_board": "Placa de Circuito Digital", 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 20be90784..ce6c28773 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 @@ -25,14 +25,10 @@ "advancements.modern_industrialization.chemical_reactor.description": "Создай химический реактор", "advancements.modern_industrialization.coke_oven": "Кока кола", "advancements.modern_industrialization.coke_oven.description": "Создай коксовую печь, чтобы начать Производство стали", - "advancements.modern_industrialization.diesel_chainsaw": "Техас, резня бензопилой", - "advancements.modern_industrialization.diesel_chainsaw.description": "Создай Дизельную цепную пилу", "advancements.modern_industrialization.diesel_generator": "[UNUSED, PLEASE REMOVE] Как из рога изобилия", "advancements.modern_industrialization.diesel_generator.description": "[UNUSED, PLEASE REMOVE] Создай дизель-генератор", "advancements.modern_industrialization.diesel_jetpack": "Эли... мы подразумевали Реактивный ранец!", "advancements.modern_industrialization.diesel_jetpack.description": "Создай дизельный реактивный ранец", - "advancements.modern_industrialization.diesel_mining_drill": "Несмотря на стены Ба Синг Се", - "advancements.modern_industrialization.diesel_mining_drill.description": "Создай дизельный горный бур", "advancements.modern_industrialization.digital_circuit": "Больше нет необходимости в Натрии", "advancements.modern_industrialization.digital_circuit.description": "Создай цифровую микросхему", "advancements.modern_industrialization.distillation_tower": "ТОТАЛЬ™ дистилляция", @@ -625,9 +621,7 @@ "item.modern_industrialization.diamond_plate": "Алмазная пластина", "item.modern_industrialization.diamond_tiny_dust": "Алмазный мельчайший порошок", "item.modern_industrialization.diesel_bucket": "Ведро дизельного топлива", - "item.modern_industrialization.diesel_chainsaw": "Дизельная цепная пила", "item.modern_industrialization.diesel_jetpack": "Дизельный реактивный ранец", - "item.modern_industrialization.diesel_mining_drill": "Дизельный горный бур", "item.modern_industrialization.diethyl_ether_bucket": "Ведро диэтилового эфира", "item.modern_industrialization.digital_circuit": "Цифровая микросхема", "item.modern_industrialization.digital_circuit_board": "Цифровая электроплата", 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 6e7ca7c42..1592d3d93 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 @@ -25,14 +25,8 @@ "advancements.modern_industrialization.chemical_reactor.description": "制作化学反应釜", "advancements.modern_industrialization.coke_oven": "“焦炭”味可口可乐", "advancements.modern_industrialization.coke_oven.description": "制作焦炉以开始炼钢", - "advancements.modern_industrialization.diesel_chainsaw": "德州电锯杀人狂", - "advancements.modern_industrialization.diesel_chainsaw.description": "制作柴油链锯", - "advancements.modern_industrialization.diesel_generator": "[UNUSED, PLEASE REMOVE] 速度与激情", - "advancements.modern_industrialization.diesel_generator.description": "[UNUSED, PLEASE REMOVE] 制作柴油发动机", - "advancements.modern_industrialization.diesel_jetpack": "最昂贵的喷气背包", - "advancements.modern_industrialization.diesel_jetpack.description": "制作柴油喷气背包", - "advancements.modern_industrialization.diesel_mining_drill": "挖穿永固城", - "advancements.modern_industrialization.diesel_mining_drill.description": "制作柴油采矿钻头", + "advancements.modern_industrialization.diesel_jetpack": "[UNTRANSLATED] Ely... We Meant Jetpack!", + "advancements.modern_industrialization.diesel_jetpack.description": "[UNTRANSLATED] Craft a Diesel Jetpack", "advancements.modern_industrialization.digital_circuit": "再也无钠", "advancements.modern_industrialization.digital_circuit.description": "制作数字电路", "advancements.modern_industrialization.distillation_tower": "高效™蒸馏", @@ -625,9 +619,7 @@ "item.modern_industrialization.diamond_plate": "钻石板", "item.modern_industrialization.diamond_tiny_dust": "小堆钻石粉", "item.modern_industrialization.diesel_bucket": "[UNTRANSLATED] Diesel Bucket", - "item.modern_industrialization.diesel_chainsaw": "柴油链锯", "item.modern_industrialization.diesel_jetpack": "柴油喷气背包", - "item.modern_industrialization.diesel_mining_drill": "柴油采矿钻头", "item.modern_industrialization.diethyl_ether_bucket": "[UNTRANSLATED] Diethyl Ether Bucket", "item.modern_industrialization.digital_circuit": "数字电路", "item.modern_industrialization.digital_circuit_board": "数字电路板", 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 afe00bbca..371fb0f41 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 @@ -29,14 +29,10 @@ "advancements.modern_industrialization.chemical_reactor.description": "[UNTRANSLATED] Craft a Chemical Reactor", "advancements.modern_industrialization.coke_oven": "“焦炭味”可口可樂", "advancements.modern_industrialization.coke_oven.description": "製作焦爐以開始煉鋼", - "advancements.modern_industrialization.diesel_chainsaw": "德州電鋸殺人狂", - "advancements.modern_industrialization.diesel_chainsaw.description": "製作柴油鏈鋸", "advancements.modern_industrialization.diesel_generator": "[UNUSED, PLEASE REMOVE] 速度與激情", "advancements.modern_industrialization.diesel_generator.description": "[UNUSED, PLEASE REMOVE] 製作柴油發動機", "advancements.modern_industrialization.diesel_jetpack": "[UNTRANSLATED] Ely... We Meant Jetpack!", "advancements.modern_industrialization.diesel_jetpack.description": "[UNTRANSLATED] Craft a Diesel Jetpack", - "advancements.modern_industrialization.diesel_mining_drill": "挖穿永固城", - "advancements.modern_industrialization.diesel_mining_drill.description": "製作柴油採礦鑽頭", "advancements.modern_industrialization.digital_circuit": "[UNTRANSLATED] No need for Sodium anymore", "advancements.modern_industrialization.digital_circuit.description": "[UNTRANSLATED] Craft a Digital Circuit", "advancements.modern_industrialization.distillation_tower": "[UNTRANSLATED] TOTAL™ Distillation", @@ -723,9 +719,7 @@ "item.modern_industrialization.diamond_plate": "[UNTRANSLATED] Diamond Plate", "item.modern_industrialization.diamond_tiny_dust": "[UNTRANSLATED] Diamond Tiny Dust", "item.modern_industrialization.diesel_bucket": "[UNTRANSLATED] Diesel Bucket", - "item.modern_industrialization.diesel_chainsaw": "柴油鏈鋸", "item.modern_industrialization.diesel_jetpack": "[UNTRANSLATED] Diesel Jetpack", - "item.modern_industrialization.diesel_mining_drill": "柴油採礦鑽頭", "item.modern_industrialization.diethyl_ether_bucket": "[UNTRANSLATED] Diethyl Ether Bucket", "item.modern_industrialization.digital_circuit": "數字電路", "item.modern_industrialization.digital_circuit_board": "數字電路板", diff --git a/src/generated/resources/assets/modern_industrialization/models/item/diesel_chainsaw.json b/src/generated/resources/assets/modern_industrialization/models/item/diesel_chainsaw.json deleted file mode 100644 index 8b6c70be9..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/diesel_chainsaw.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/diesel_chainsaw" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/diesel_mining_drill.json b/src/generated/resources/assets/modern_industrialization/models/item/diesel_mining_drill.json deleted file mode 100644 index 7199f6ddc..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/diesel_mining_drill.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/diesel_mining_drill" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/advancements/diesel_chainsaw.json b/src/generated/resources/data/modern_industrialization/advancements/diesel_chainsaw.json deleted file mode 100644 index 9a79db750..000000000 --- a/src/generated/resources/data/modern_industrialization/advancements/diesel_chainsaw.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "parent": "modern_industrialization:distillery", - "criteria": { - "checkInv": { - "conditions": { - "items": [ - { - "items": [ - "modern_industrialization:diesel_chainsaw" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - } - }, - "display": { - "announce_to_chat": true, - "description": { - "translate": "advancements.modern_industrialization.diesel_chainsaw.description" - }, - "frame": "challenge", - "hidden": false, - "icon": { - "item": "modern_industrialization:diesel_chainsaw" - }, - "show_toast": true, - "title": { - "translate": "advancements.modern_industrialization.diesel_chainsaw" - } - }, - "requirements": [ - [ - "checkInv" - ] - ], - "sends_telemetry_event": true -} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/advancements/diesel_mining_drill.json b/src/generated/resources/data/modern_industrialization/advancements/diesel_mining_drill.json deleted file mode 100644 index 7b940e2bd..000000000 --- a/src/generated/resources/data/modern_industrialization/advancements/diesel_mining_drill.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "parent": "modern_industrialization:distillery", - "criteria": { - "checkInv": { - "conditions": { - "items": [ - { - "items": [ - "modern_industrialization:diesel_mining_drill" - ] - } - ] - }, - "trigger": "minecraft:inventory_changed" - } - }, - "display": { - "announce_to_chat": true, - "description": { - "translate": "advancements.modern_industrialization.diesel_mining_drill.description" - }, - "frame": "challenge", - "hidden": false, - "icon": { - "item": "modern_industrialization:diesel_mining_drill" - }, - "show_toast": true, - "title": { - "translate": "advancements.modern_industrialization.diesel_mining_drill" - } - }, - "requirements": [ - [ - "checkInv" - ] - ], - "sends_telemetry_event": true -} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index 7a29e7543..0ff5d8592 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -32,7 +32,6 @@ import aztech.modern_industrialization.items.armor.JetpackItem; import aztech.modern_industrialization.items.armor.QuantumArmorItem; import aztech.modern_industrialization.items.armor.RubberArmorMaterial; -import aztech.modern_industrialization.items.diesel_tools.DieselToolItem; import aztech.modern_industrialization.items.tools.QuantumSword; import aztech.modern_industrialization.nuclear.INeutronBehaviour; import aztech.modern_industrialization.nuclear.NuclearComponentItem; @@ -141,10 +140,10 @@ public final class MIItem { public static final ItemDefinition STEAM_MINING_DRILL = itemHandheld("Steam Mining Drill", "steam_mining_drill",SteamDrillItem::new); - public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) - .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); - public static final ItemDefinition DIESEL_CHAINSAW = itemHandheld("Diesel Chainsaw", "diesel_chainsaw", p -> new DieselToolItem(p, 12)) - .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); + // public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) + // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); + // public static final ItemDefinition DIESEL_CHAINSAW = itemHandheld("Diesel Chainsaw", "diesel_chainsaw", p -> new DieselToolItem(p, 12)) + // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); public static final ItemDefinition PORTABLE_STORAGE_UNIT = itemHandheld("Portable Storage Unit", "portable_storage_unit", PortableStorageUnit::new) .withItemRegistrationEvent(item -> EnergyApi.ITEM.registerForItems((stack, ctx) -> SimpleEnergyItem.createStorage(ctx, item.getEnergyCapacity(stack), item.getEnergyMaxInput(stack), item.getEnergyMaxOutput(stack)), item)); @@ -203,7 +202,8 @@ public static ItemDefinition item(String englishName, String path, SortOrd ModelTemplates.FLAT_ITEM), sortOrder); } - public static ItemDefinition item(String englishName, String path, Function ctor, + public static ItemDefinition item(String englishName, String path, + Function ctor, SortOrder sortOrder) { return MIItem.item(englishName, path, ctor, (item, modelGenerator) -> modelGenerator.generateFlatItem(item, ModelTemplates.FLAT_ITEM), sortOrder); @@ -218,20 +218,25 @@ public static ItemDefinition itemNoModel(String englishName, String path, }, sortOrder); } - public static ItemDefinition itemNoModel(String englishName, String path, Function ctor, + public static ItemDefinition itemNoModel(String englishName, String path, + Function ctor, SortOrder sortOrder) { return MIItem.item(englishName, path, ctor, (item, modelGenerator) -> { }, sortOrder); } - public static ItemDefinition itemHandheld(String englishName, String path, Function ctor) { + public static ItemDefinition itemHandheld(String englishName, String path, + Function ctor) { return itemHandheld(englishName, path, ctor, ITEMS_OTHER); } - public static ItemDefinition itemHandheld(String englishName, String path, Function ctor, + public static ItemDefinition itemHandheld(String englishName, String path, + Function ctor, SortOrder sortOrder) { - return MIItem.item(englishName, path, p -> ctor.apply(p.maxCount(1)), (item, modelGenerator) -> modelGenerator.generateFlatItem(item, - ModelTemplates.FLAT_HANDHELD_ITEM), sortOrder); + return MIItem.item(englishName, path, p -> ctor.apply(p.maxCount(1)), + (item, modelGenerator) -> modelGenerator.generateFlatItem(item, + ModelTemplates.FLAT_HANDHELD_ITEM), + sortOrder); } private MIItem() { diff --git a/src/main/java/aztech/modern_industrialization/datagen/advancement/MIAdvancementsProvider.java b/src/main/java/aztech/modern_industrialization/datagen/advancement/MIAdvancementsProvider.java index a5eb92d28..3a2d34802 100644 --- a/src/main/java/aztech/modern_industrialization/datagen/advancement/MIAdvancementsProvider.java +++ b/src/main/java/aztech/modern_industrialization/datagen/advancement/MIAdvancementsProvider.java @@ -83,8 +83,6 @@ public void generateAdvancement(Consumer consumer) { var mvSteamTurbine = createBasic(consumer, "mv_steam_turbine", electronicCircuit, FrameType.GOAL, "Better Than Wind Mills", "Craft an Advanced Steam Turbine"); var dieselGenerator = createBasic(consumer, "mv_diesel_generator", distillery, "Fast and Furious", "Craft an MV Diesel Generator"); var dieselJetpack = createBasic(consumer, "diesel_jetpack", distillery, FrameType.CHALLENGE, "Ely... We Meant Jetpack!", "Craft a Diesel Jetpack"); - var dieselChainsaw = createBasic(consumer, "diesel_chainsaw", distillery, FrameType.CHALLENGE, "The Texas Chain Saw Massacre", "Craft a Diesel Chainsaw"); - var dieselMiningDrill = createBasic(consumer, "diesel_mining_drill", distillery, FrameType.CHALLENGE, "Through The Walls Of Ba Sing Se", "Craft a Diesel Mining Drill"); var digitalCircuit = createBasic(consumer, "digital_circuit", distillery, "No need for Sodium anymore", "Craft a Digital Circuit"); var turboDieselGenerator = createBasic(consumer, "hv_diesel_generator", dieselGenerator, "Fast and Furious 2 : Revenge", "Craft an HV Diesel Generator"); var largeDieselGenerator = createBasic(consumer, "large_diesel_generator", turboDieselGenerator, "Fast and Furious 42 : Armageddon", "Craft a Large Diesel Generator"); diff --git a/src/main/java/aztech/modern_industrialization/items/diesel_tools/DieselToolItem.java b/src/main/java/aztech/modern_industrialization/items/diesel_tools/DieselToolItem.java deleted file mode 100644 index bc578c24f..000000000 --- a/src/main/java/aztech/modern_industrialization/items/diesel_tools/DieselToolItem.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2020 Azercoco & Technici4n - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package aztech.modern_industrialization.items.diesel_tools; - -import aztech.modern_industrialization.MIText; -import aztech.modern_industrialization.api.FluidFuelRegistry; -import aztech.modern_industrialization.fluid.MIFluid; -import aztech.modern_industrialization.items.DynamicEnchantmentItem; -import aztech.modern_industrialization.items.DynamicToolItem; -import aztech.modern_industrialization.items.FluidFuelItemHelper; -import aztech.modern_industrialization.items.ItemHelper; -import com.google.common.collect.ImmutableMultimap; -import com.google.common.collect.Multimap; -import com.mojang.datafixers.util.Pair; -import it.unimi.dsi.fastutil.objects.Reference2IntArrayMap; -import it.unimi.dsi.fastutil.objects.Reference2IntMap; -import java.util.List; -import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Predicate; -import net.fabricmc.fabric.api.mininglevel.v1.MiningLevelManager; -import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags; -import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; -import net.minecraft.core.BlockPos; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.chat.Component; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.sounds.SoundSource; -import net.minecraft.tags.ItemTags; -import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.InteractionResultHolder; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.Shearable; -import net.minecraft.world.entity.ai.attributes.Attribute; -import net.minecraft.world.entity.ai.attributes.AttributeModifier; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.*; -import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.world.item.enchantment.Enchantments; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.RotatedPillarBlock; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.gameevent.GameEvent; -import net.minecraft.world.level.material.Fluid; - -public class DieselToolItem extends Item implements Vanishable, DynamicEnchantmentItem, DynamicToolItem { - public static final int CAPACITY = 4 * 81000; - private final double damage; - - public DieselToolItem(Properties settings, double damage) { - super(settings.stacksTo(1).rarity(Rarity.UNCOMMON)); - this.damage = damage; - } - - @Override - public boolean isEnchantable(ItemStack stack) { - return false; - } - - @Override - public boolean mineBlock(ItemStack stack, Level world, BlockState state, BlockPos pos, LivingEntity miner) { - if (state.getDestroySpeed(world, pos) != 0.0f) { - FluidFuelItemHelper.decrement(stack); - } - return true; - } - - @Override - public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) { - FluidFuelItemHelper.decrement(stack); - return true; - } - - @Override - public boolean isSuitableFor(ItemStack stack, BlockState state) { - int requiredLevel = MiningLevelManager.getRequiredMiningLevel(state); - return requiredLevel <= 4 && FluidFuelItemHelper.getAmount(stack) > 0 && isSupportedBlock(stack, state); - } - - @Override - public float getDestroySpeed(ItemStack stack, BlockState state) { - if (isSupportedBlock(stack, state)) { - return getMiningSpeedMultiplier(stack); - } - return 1; - } - - private float getMiningSpeedMultiplier(ItemStack stack) { - long amount = FluidFuelItemHelper.getAmount(stack); - if (amount > 0) { - FluidVariant fluid = FluidFuelItemHelper.getFluid(stack); - int burnTicks = FluidFuelRegistry.getEu(fluid.getFluid()); - if (burnTicks > 0) { - return 1.0f + burnTicks / 8.0f; - } - } - return 1.0f; - } - - @Override - public Multimap getAttributeModifiers(ItemStack stack, EquipmentSlot slot) { - if (slot == EquipmentSlot.MAINHAND && FluidFuelItemHelper.getAmount(stack) > 0) { - return ItemHelper.createToolModifiers(damage * FluidFuelRegistry.getEu(FluidFuelItemHelper.getFluid(stack).getFluid()) / 600); - } - return ImmutableMultimap.of(); - } - - @Override - public void appendHoverText(ItemStack stack, Level world, List tooltip, TooltipFlag context) { - FluidFuelItemHelper.appendTooltip(stack, tooltip, CAPACITY); - } - - @Override - public boolean isBarVisible(ItemStack stack) { - return true; - } - - @Override - public int getBarWidth(ItemStack stack) { - return (int) Math.round(getDurabilityBarProgress(stack) * 13); - } - - @Override - public int getBarColor(ItemStack stack) { - Fluid fluid = FluidFuelItemHelper.getFluid(stack).getFluid(); - - if (fluid instanceof MIFluid cf) { - return cf.color; - } else { - return 0; - } - } - - public double getDurabilityBarProgress(ItemStack stack) { - return (double) FluidFuelItemHelper.getAmount(stack) / CAPACITY; - } - - private static boolean isFortune(ItemStack stack) { - CompoundTag tag = stack.getTag(); - return tag != null && tag.getBoolean("fortune"); - } - - private static void setFortune(ItemStack stack, boolean fortune) { - if (fortune) { - stack.getOrCreateTag().putBoolean("fortune", true); - } else { - stack.removeTagKey("fortune"); - } - } - - @Override - public InteractionResultHolder use(Level world, Player user, InteractionHand hand) { - // Toggle between silk touch and fortune - if (hand == InteractionHand.MAIN_HAND && user.isShiftKeyDown()) { - ItemStack stack = user.getItemInHand(hand); - setFortune(stack, !isFortune(stack)); - if (!world.isClientSide) { - user.displayClientMessage( - isFortune(stack) ? MIText.ToolSwitchedFortune.text() : MIText.ToolSwitchedSilkTouch.text(), - true); - } - return InteractionResultHolder.sidedSuccess(stack, world.isClientSide); - } - return super.use(world, user, hand); - } - - @Override - public InteractionResult useOn(UseOnContext context) { - ItemStack stack = context.getItemInHand(); - Level w = context.getLevel(); - BlockPos pos = context.getClickedPos(); - BlockState state = w.getBlockState(pos); - Player player = context.getPlayer(); - if (FluidFuelItemHelper.getAmount(stack) > 0) { - if (stack.is(ItemTags.AXES)) { - Block newBlock = StrippingAccess.getStrippedBlocks().get(state.getBlock()); - if (newBlock != null) { - w.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1, 1); - if (!w.isClientSide) { - w.setBlock(pos, newBlock.defaultBlockState().setValue(RotatedPillarBlock.AXIS, state.getValue(RotatedPillarBlock.AXIS)), 11); - FluidFuelItemHelper.decrement(stack); - } - return InteractionResult.sidedSuccess(w.isClientSide); - } - } - if (stack.is(ItemTags.SHOVELS)) { - BlockState newState = PathingAccess.getPathStates().get(state.getBlock()); - if (newState != null) { - w.playSound(player, pos, SoundEvents.SHOVEL_FLATTEN, SoundSource.BLOCKS, 1, 1); - if (!w.isClientSide) { - w.setBlock(pos, newState, 11); - FluidFuelItemHelper.decrement(stack); - } - return InteractionResult.sidedSuccess(w.isClientSide); - } - } - if (stack.is(ItemTags.HOES)) { - Pair, Consumer> pair = HoeItem.TILLABLES.get(state.getBlock()); - if (pair != null) { - Predicate predicate = pair.getFirst(); - Consumer consumer = pair.getSecond(); - if (predicate.test(context)) { - w.playSound(player, pos, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1.0F, 1.0F); - if (!w.isClientSide) { - consumer.accept(context); - if (player != null) { - FluidFuelItemHelper.decrement(stack); - } - } - - return InteractionResult.sidedSuccess(w.isClientSide); - } - } - } - - } - return super.useOn(context); - } - - @Override - public Reference2IntMap getEnchantments(ItemStack stack) { - Reference2IntMap map = new Reference2IntArrayMap<>(); - if (FluidFuelItemHelper.getAmount(stack) > 0) { - if (!isFortune(stack)) { - map.put(Enchantments.SILK_TOUCH, Enchantments.SILK_TOUCH.getMaxLevel()); - } else { - map.put(Enchantments.BLOCK_FORTUNE, Enchantments.BLOCK_FORTUNE.getMaxLevel()); - } - } - return map; - } - - private static class StrippingAccess extends AxeItem { - private StrippingAccess(Tier material, float attackDamage, float attackSpeed, Properties settings) { - super(material, attackDamage, attackSpeed, settings); - } - - public static Map getStrippedBlocks() { - return STRIPPABLES; - } - } - - private static class PathingAccess extends ShovelItem { - private PathingAccess(Tier material, float attackDamage, float attackSpeed, Properties settings) { - super(material, attackDamage, attackSpeed, settings); - } - - public static Map getPathStates() { - return FLATTENABLES; - } - } - - public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity interactionTarget, InteractionHand usedHand) { - - final int defaultMb = 100; - float speedMultiplier = this.getMiningSpeedMultiplier(stack); - int costMb = (int) (defaultMb / speedMultiplier); - - if (FluidFuelItemHelper.getAmount(stack) >= costMb) { - if (stack.is(ConventionalItemTags.SHEARS) && interactionTarget instanceof Shearable shearable) { - if (!interactionTarget.level().isClientSide && shearable.readyForShearing()) { - shearable.shear(SoundSource.PLAYERS); - interactionTarget.gameEvent(GameEvent.SHEAR, player); - return InteractionResult.SUCCESS; - } else { - return InteractionResult.CONSUME; - } - } - } - - return InteractionResult.PASS; - } -} diff --git a/src/main/resources/assets/modern_industrialization/lang/ko_kr.json b/src/main/resources/assets/modern_industrialization/lang/ko_kr.json index 891d5a405..cfdc2baaf 100644 --- a/src/main/resources/assets/modern_industrialization/lang/ko_kr.json +++ b/src/main/resources/assets/modern_industrialization/lang/ko_kr.json @@ -33,14 +33,10 @@ "advancements.modern_industrialization.coke_oven.description": "강철 생산을 위해 코크스로를 제작하세요", "advancements.modern_industrialization.crowbar": "나는 빠루고, 얘는 ...", "advancements.modern_industrialization.crowbar.description": "... 내 친구 빠루야. 기계 및 케이싱을 손보기 위해 빠루를 제작하세요", - "advancements.modern_industrialization.diesel_chainsaw": "텍사스 전기톱 연쇄살인사건", - "advancements.modern_industrialization.diesel_chainsaw.description": "디젤 전기톱을 제작하세요", "advancements.modern_industrialization.diesel_generator": "분노의 질주", "advancements.modern_industrialization.diesel_generator.description": "디젤 발전기를 제작하세요", "advancements.modern_industrialization.diesel_jetpack": "어... 그니까 제트팩이에요!", "advancements.modern_industrialization.diesel_jetpack.description": "디젤 제트팩을 제작하세요", - "advancements.modern_industrialization.diesel_mining_drill": "바싱세의 벽을 넘어", - "advancements.modern_industrialization.diesel_mining_drill.description": "디젤 채광용 드릴을 제작하세요", "advancements.modern_industrialization.digital_circuit": "더이상 나트륨은 필요 없어", "advancements.modern_industrialization.digital_circuit.description": "디지털 회로를 제작하세요", "advancements.modern_industrialization.distillation_tower": "완벽™ 증류", @@ -730,9 +726,7 @@ "item.modern_industrialization.diamond_large_plate": "다이아몬드 대형 판", "item.modern_industrialization.diamond_plate": "다이아몬드 판", "item.modern_industrialization.diamond_tiny_dust": "작은 다이아몬드 가루", - "item.modern_industrialization.diesel_chainsaw": "디젤 전기톱", "item.modern_industrialization.diesel_jetpack": "디젤 제트팩", - "item.modern_industrialization.diesel_mining_drill": "디젤 채광 드릴", "item.modern_industrialization.digital_circuit": "디지털 회로", "item.modern_industrialization.digital_circuit_board": "디지털 회로 판", "item.modern_industrialization.diode": "다이오드", diff --git a/src/main/resources/assets/modern_industrialization/lang/pt_br.json b/src/main/resources/assets/modern_industrialization/lang/pt_br.json index 1be1c2303..9a97ab833 100644 --- a/src/main/resources/assets/modern_industrialization/lang/pt_br.json +++ b/src/main/resources/assets/modern_industrialization/lang/pt_br.json @@ -25,14 +25,10 @@ "advancements.modern_industrialization.chemical_reactor.description": "Fabrique um Reator Químico", "advancements.modern_industrialization.coke_oven": "Coque-Cola", "advancements.modern_industrialization.coke_oven.description": "Fabrique um Forno de Coque para começar a produzir Aço", - "advancements.modern_industrialization.diesel_chainsaw": "O Massacre da Serra Elétrica", - "advancements.modern_industrialization.diesel_chainsaw.description": "Fabrique uma Motosserra à Diesel", "advancements.modern_industrialization.diesel_generator": "Velozes e Furiosos", "advancements.modern_industrialization.diesel_generator.description": "Fabrique um Gerador à Diesel", "advancements.modern_industrialization.diesel_jetpack": "Éli... Quer Dizer, Jetpack!", "advancements.modern_industrialization.diesel_jetpack.description": "Fabrique uma Jetpack à Diesel", - "advancements.modern_industrialization.diesel_mining_drill": "Pelas Paredes de Ba Sing Se", - "advancements.modern_industrialization.diesel_mining_drill.description": "Fabrique uma Broca de Mineração à Diesel", "advancements.modern_industrialization.digital_circuit": "Sem Uso para Sódio Agora", "advancements.modern_industrialization.digital_circuit.description": "Fabrique um Circuito Digital", "advancements.modern_industrialization.distillation_tower": "Destilação TOTAL™", @@ -613,9 +609,7 @@ "item.modern_industrialization.diamond_plate": "Chapa de Diamante", "item.modern_industrialization.diamond_tiny_dust": "Pó Pequeno de Diamante", "item.modern_industrialization.diesel_bucket": "Balde de Diesel", - "item.modern_industrialization.diesel_chainsaw": "Motosserra à Diesel", "item.modern_industrialization.diesel_jetpack": "Jetpack à Diesel", - "item.modern_industrialization.diesel_mining_drill": "Broca de Mineração à Diesel", "item.modern_industrialization.diethyl_ether_bucket": "Balde de Éter Etílico", "item.modern_industrialization.digital_circuit": "Circuito Digital", "item.modern_industrialization.digital_circuit_board": "Placa de Circuito Digital", diff --git a/src/main/resources/assets/modern_industrialization/lang/ru_ru.json b/src/main/resources/assets/modern_industrialization/lang/ru_ru.json index dd4a0996a..29102ca4e 100644 --- a/src/main/resources/assets/modern_industrialization/lang/ru_ru.json +++ b/src/main/resources/assets/modern_industrialization/lang/ru_ru.json @@ -25,14 +25,10 @@ "advancements.modern_industrialization.chemical_reactor.description": "Создай химический реактор", "advancements.modern_industrialization.coke_oven": "Кока кола", "advancements.modern_industrialization.coke_oven.description": "Создай коксовую печь, чтобы начать Производство стали", - "advancements.modern_industrialization.diesel_chainsaw": "Техас, резня бензопилой", - "advancements.modern_industrialization.diesel_chainsaw.description": "Создай Дизельную цепную пилу", "advancements.modern_industrialization.diesel_generator": "Как из рога изобилия", "advancements.modern_industrialization.diesel_generator.description": "Создай дизель-генератор", "advancements.modern_industrialization.diesel_jetpack": "Эли... мы подразумевали Реактивный ранец!", "advancements.modern_industrialization.diesel_jetpack.description": "Создай дизельный реактивный ранец", - "advancements.modern_industrialization.diesel_mining_drill": "Несмотря на стены Ба Синг Се", - "advancements.modern_industrialization.diesel_mining_drill.description": "Создай дизельный горный бур", "advancements.modern_industrialization.digital_circuit": "Больше нет необходимости в Натрии", "advancements.modern_industrialization.digital_circuit.description": "Создай цифровую микросхему", "advancements.modern_industrialization.distillation_tower": "ТОТАЛЬ™ дистилляция", @@ -613,9 +609,7 @@ "item.modern_industrialization.diamond_plate": "Алмазная пластина", "item.modern_industrialization.diamond_tiny_dust": "Алмазный мельчайший порошок", "item.modern_industrialization.diesel_bucket": "Ведро дизельного топлива", - "item.modern_industrialization.diesel_chainsaw": "Дизельная цепная пила", "item.modern_industrialization.diesel_jetpack": "Дизельный реактивный ранец", - "item.modern_industrialization.diesel_mining_drill": "Дизельный горный бур", "item.modern_industrialization.diethyl_ether_bucket": "Ведро диэтилового эфира", "item.modern_industrialization.digital_circuit": "Цифровая микросхема", "item.modern_industrialization.digital_circuit_board": "Цифровая электроплата", diff --git a/src/main/resources/assets/modern_industrialization/lang/zh_cn.json b/src/main/resources/assets/modern_industrialization/lang/zh_cn.json index 700103b0d..d88caba77 100644 --- a/src/main/resources/assets/modern_industrialization/lang/zh_cn.json +++ b/src/main/resources/assets/modern_industrialization/lang/zh_cn.json @@ -25,14 +25,6 @@ "advancements.modern_industrialization.chemical_reactor.description": "制作化学反应釜", "advancements.modern_industrialization.coke_oven": "“焦炭”味可口可乐", "advancements.modern_industrialization.coke_oven.description": "制作焦炉以开始炼钢", - "advancements.modern_industrialization.diesel_chainsaw": "德州电锯杀人狂", - "advancements.modern_industrialization.diesel_chainsaw.description": "制作柴油链锯", - "advancements.modern_industrialization.diesel_generator": "速度与激情", - "advancements.modern_industrialization.diesel_generator.description": "制作柴油发动机", - "advancements.modern_industrialization.diesel_jetpack": "最昂贵的喷气背包", - "advancements.modern_industrialization.diesel_jetpack.description": "制作柴油喷气背包", - "advancements.modern_industrialization.diesel_mining_drill": "挖穿永固城", - "advancements.modern_industrialization.diesel_mining_drill.description": "制作柴油采矿钻头", "advancements.modern_industrialization.digital_circuit": "再也无钠", "advancements.modern_industrialization.digital_circuit.description": "制作数字电路", "advancements.modern_industrialization.distillation_tower": "高效™蒸馏", @@ -580,9 +572,7 @@ "item.modern_industrialization.diamond_large_plate": "大型钻石板", "item.modern_industrialization.diamond_plate": "钻石板", "item.modern_industrialization.diamond_tiny_dust": "小堆钻石粉", - "item.modern_industrialization.diesel_chainsaw": "柴油链锯", "item.modern_industrialization.diesel_jetpack": "柴油喷气背包", - "item.modern_industrialization.diesel_mining_drill": "柴油采矿钻头", "item.modern_industrialization.digital_circuit": "数字电路", "item.modern_industrialization.digital_circuit_board": "数字电路板", "item.modern_industrialization.diode": "二极管", diff --git a/src/main/resources/assets/modern_industrialization/lang/zh_tw.json b/src/main/resources/assets/modern_industrialization/lang/zh_tw.json index 9683e7e5b..476a04ad3 100644 --- a/src/main/resources/assets/modern_industrialization/lang/zh_tw.json +++ b/src/main/resources/assets/modern_industrialization/lang/zh_tw.json @@ -15,12 +15,8 @@ "advancements.modern_industrialization.capacitor.description": "製作電容器", "advancements.modern_industrialization.coke_oven": "“焦炭味”可口可樂", "advancements.modern_industrialization.coke_oven.description": "製作焦爐以開始煉鋼", - "advancements.modern_industrialization.diesel_chainsaw": "德州電鋸殺人狂", - "advancements.modern_industrialization.diesel_chainsaw.description": "製作柴油鏈鋸", "advancements.modern_industrialization.diesel_generator": "速度與激情", "advancements.modern_industrialization.diesel_generator.description": "製作柴油發動機", - "advancements.modern_industrialization.diesel_mining_drill": "挖穿永固城", - "advancements.modern_industrialization.diesel_mining_drill.description": "製作柴油採礦鑽頭", "advancements.modern_industrialization.electric_blast_furnace": "電力挚友", "advancements.modern_industrialization.electric_blast_furnace.description": "製作電力高爐以開始生成鋁", "advancements.modern_industrialization.electric_quarry": "財源滾滾", @@ -347,8 +343,6 @@ "item.modern_industrialization.depleted_uranium_fuel_rod": "枯竭鈾燃料棒", "item.modern_industrialization.depleted_uranium_fuel_rod_double": "枯竭鈾雙聯燃料棒", "item.modern_industrialization.depleted_uranium_fuel_rod_quad": "枯竭鈾四聯燃料棒", - "item.modern_industrialization.diesel_chainsaw": "柴油鏈鋸", - "item.modern_industrialization.diesel_mining_drill": "柴油採礦鑽頭", "item.modern_industrialization.digital_circuit": "數字電路", "item.modern_industrialization.digital_circuit_board": "數字電路板", "item.modern_industrialization.diode": "二極體", diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json index a926c7ec7..6d10efda2 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json @@ -12,16 +12,6 @@ "type": "crafting", "recipe": "modern_industrialization:armor/rubber_helmet", "recipe2": "modern_industrialization:armor/rubber_boots" - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_mining_drill", - "text": "This Mining Drill can finally replace your Pickaxes and Shovels. Fill it with powerful fuel for the best speed!$(br2)Toggle between Silk Touch and Fortune III with shift right-click." - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_chainsaw", - "text": "Cutting down trees in style!" } ], "sortnum": 110 diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/ko_kr/entries/electric_age/jetpack.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/ko_kr/entries/electric_age/jetpack.json index 92cb7f853..0de79bc5b 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/ko_kr/entries/electric_age/jetpack.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/ko_kr/entries/electric_age/jetpack.json @@ -12,16 +12,6 @@ "type": "crafting", "recipe": "modern_industrialization:armor/rubber_helmet", "recipe2": "modern_industrialization:armor/rubber_boots" - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_mining_drill", - "text": "디젤 채광 드릴이 있으면, 더 이상 삽과 곡괭이는 필요없습니다. 강력한 연료로 구동시켜서 속도를 최대한 높이세요!$(br2)웅크리고 우클릭해서 섬세한 손길 혹은 행운 3으로 사용할 수 있습니다." - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_chainsaw", - "text": "나무를 빠르게 벨 수 있습니다." } ], "sortnum": 109 diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/ru_ru/entries/electric_age/jetpack.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/ru_ru/entries/electric_age/jetpack.json index 9d8c17549..db167cb16 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/ru_ru/entries/electric_age/jetpack.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/ru_ru/entries/electric_age/jetpack.json @@ -12,16 +12,6 @@ "type": "crafting", "recipe": "modern_industrialization:armor/rubber_helmet", "recipe2": "modern_industrialization:armor/rubber_boots" - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_mining_drill", - "text": "Этот шахтёрский бур, наконец, сможет заменить ваши кирки и лопаты. Заполните его мощным топливом для максимальной скорости!$(br2)Переключайтесь между режимами Шёлкового касания и Удачи III, используя Shift+ПКМ." - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_chainsaw", - "text": "Вырубайте деревья стильно!" } ], "sortnum": 109 diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/zh_cn/entries/electric_age/jetpack.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/zh_cn/entries/electric_age/jetpack.json index 48272456a..b7b195a61 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/zh_cn/entries/electric_age/jetpack.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/zh_cn/entries/electric_age/jetpack.json @@ -12,16 +12,6 @@ "type": "crafting", "recipe": "modern_industrialization:armor/rubber_helmet", "recipe2": "modern_industrialization:armor/rubber_boots" - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_mining_drill", - "text": "这个采矿钻头终于可以取代你的镐和锹了。用强大的燃料填充它以获得最佳速度!$(br2)使用Shift+右键点击在精准采集和时运III模式之间切换。" - }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/diesel_chainsaw", - "text": "砍树也得有范儿!" } ], "sortnum": 109 diff --git a/src/main/resources/assets/modern_industrialization/textures/item/diesel_chainsaw.png b/src/main/resources/assets/modern_industrialization/textures/item/diesel_chainsaw.png deleted file mode 100644 index 2a59df0b03d1bc57e765f4b1f030c666af87dfcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2148 zcmV-q2%GnbP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1dFu_P%B{Ktwl0ZD+s9L|XKV9np;sG9D6_skU0 z1qcd~Od)8~|ND2CfABCzHqL7dDFlnhC6_p(5bb`_dXshQeJb`UJlW0Nz%U7N*;UP_ ze}>)v`rw*_%Cp_X)57r#MEAh!kva1$w?~k$^R|;a1EszTAw_+JTFyZAbX-u*&)u+g zHtXiepkS$aOeD-*NbGvMjX>s)B_sEEvn2E*i6}d92ALN=gMpBz<=q6@M}nS6zDnkm z{k!x+KIdbX7cRr$2!(eW$iLX-o`xSMmKza2Hxy^}&2r9fj26e}dv)0bFdB|WEwbqv z1|171m-SgdQv5v1x>7=lHrooxo2|AWRZ7HAWf*eQDAS<6@=6sD9d}mb%#~%?q9`Y> zGIeq@(O{J%4XUwJ?nVS=zOm4nH?8?9MadT%3Pcvc@gzyqX zp-qwuv7GbpA9WEvl)ZT8y$@b}G(PzpB)H&12pVRP%PQ*BYf#mwNpqCwqK_eJj4{QW zI0<5)Pa$cFDW#m*WK5JXR!08}OW`8L6<L!jCJkYtg{CdG z)N&`&5h=RszK5{mA!vpZ zKQ)75>E7*N#?=c&Wc^+!{PxH?Q8d_$7OKZ}(7BEZB z&x5IJ-Yr$6cLY9@{}QAR1{!dQRUB$ZbkbtqRjvca!vYg0uDWrRYCx6LkWV*^pjWq_ z<>uoK()xj+Zp0$39FQDGZen+1b0c+}3})3Tnn>zt8y=D-_|2)>iVwfSWxl%r>Cqnr zt8}s>$dRo`$0=t{)q}X$4t0#LfOu@``bVZ4yp~pgWhD0%ogbssyga*L7>Qqz`Bi?A zJ^Ue|V~SkvRp@cT1~04;DEUlR;jbcliA8EN;&#_4lgHCC0b{$6{MzBgeGbZeqVO|F zAlNN~KtG3irQNSLsr|iO{#WGBzVCR{>fEH!ot1<-_dCn& zx*75NkUX3doLQ2OBgYj9z^(aRaz7#amE4{Vohm&zoT#_A4o@KXkXw-utxSz~^y;{z zzHt8~$KQ#N-{SbD*hq?JK@*}1Ux*R)n|C#>)|5)>Zl6Zla3fGxcBSJw-+fRMQ$wA6 zr!;(~)jI#q{VdmPhF{|hcG`UEV>fBcikN;}xfBp4LT6=>K(`2Qe+@Y46ZYDM)5$6B zFBdk}L}vp0c}ZRAS`-a=AC~zR?ibi49oSBB+g{!9FFVPy3hq+4cIH<|6>O$0qYX z3!hz;*=9he0004nX+uL$Nkc;*aB^>EX>4Tx0C=2zkv&MmKpe$iQ%gmv4t5YfAVYPs zASxnGQpF-zC~bvS9ZasD(4-+rad8w}3l4rPRvlcNb#-tR1i=pwM<*vm7b)?7NufoI z2gm(*ckglc4iM^PrWhULfTEguA{r6XnN`vM3Ll2igF(zn%+O-V#S~n}*F8LZy$ka! z_j7-a?rhFrfJY>rW14OfZxBy!ni}VQ;vg$ZS>kizF`X_*{K$3L;Wy3&n+2X3)KiIh z;vlhDXk)pJSy5Mrr-(yYMWuWp?QoX!7H6egWzBo?7Y1_bN|Ng|hY-aQVu(Y8j4Dbf z!$g=?l@tRB+K;&S2W)?wTr#;zVB}ap1qvkF5B>+gyEXEY6HZbf0{C7m>th7)?*fgQ zWqlu8R^tTlJ_A>3%U`JjGoPf_T3YA`=-mb`u3MVC2VCv|{ZE>tOSa^tDdh9O`x$*x z2I#v5y4IZDn)^6?08-S|@(pls2#gjed)?*To$bB-d#2gn58HEc(FlaJ^8f$<24YJ` zL;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2j&GG5G*ue`EF(a z009I^L_t(I%bn6OO9L?g#qrk?a1aW0a&T}^Y`fdZMI3Yr_#L`PKSIH+-JCjgl7LG) zIoRRw9J=;1Xej3mg&xQ~rwizENi${nzaN1Bdz{W>&h{+kJ}ug_n2Fsnu{&N2 z#;k|RZ`W6N{Ye1;#bGmCep;=Z9we7>WHX+RUaDgy1^>&D&HQ8~1(g)+Oy-Pi7A{lY zQAzP9_Ld7ynZ_+DDR`@sFuCBAyzIGwVEJ)Frg4j3&qo|~5%%U0KU}P&a3fW{0Dx~} z@L>Abey(A3j+^@ijLyCOi2KTAe0p{OqjN0Yw-_u@s~V^Qz_1IR91AD=#%`b-Det~9 a0Q>? zaB^>EX>4U6ba`-PAZ2)IW&i+q+O1b!cm3)bAapTGUQM6& z{Dgk_`oZyG@_oMwdxXL^WG=(=!^88a*ISV2r`2!lHWb^cxETB`)VvLqJ#j+WUwgq? z#b~R$4iA>9z!4KQHmv8{E(AQj#0jO~O&l@La6sL%RkH}&7znvr-bJ9kCFqXiQ&W%Z zU$qDFDeZoK;L>f5P|33YLe-u&9ayRh?W|8lthJi_67D7 zsqoOrj>mNJ9JxX@;zCU^qnj=)X8MiOUoiomtHD$fHcIxiDh%vWsj)R{3)P_8Xxl&{+W zD1vVR7{gFNJHuj}(VoZ~10DkeN%NB`d%9HHsy;oxP|a-BXeu@4`AaqQD({a8 zGt!9+&7c@r1I7JN00B)yGaZbzG?W{f=}6cVLI5d48&%Cv3=-OANV>VS`%>;B-IRon zbfce?Q$xBxp`3zr&$_)(t&Vf9OvTnN9Gq&#?!$NsNl{4SP)q-}{LD~?9<$nA>49~c z1DcypvziNzqt^cfAW|;@xVRkE1olcTvlV0Wu|;pi;O3!CO9sd1YI&nDOm($F@)gN` zj_Kc)>aoML%FAxHzQma0Y%!P4sV<;6HF!h{8qIOdT-;dNXf}jKP}Z` z2iJ52LIg2Rq1kev$4j2*9AQ&?Ib3yLyv}Nq6``G%O_qsWiVw44q=ne5`H4yOJ%yh# zmXlhIpnGl{WVJG)&fL>!*9rrUR)k^S^K|EcJeX!==Yn8~;nU!I7v$<5;CpRm+Fx~)TCDX($XO-aO>fk>w_RxH9~&(vcLWd#h}<8o)hRxy;EL*hz zQWBuIjV}X=geQ6YG(@@E!0>n%_4k2OO1cC>NZbXBUU39^?q@Ywt4pBw^W36#77un~ z)c}B_FP^A|xki^QY*yMxyCa6qXBFx>-QDib2dv$lXu>7<$X(`s0iqV^Y~fFL@FUqc z5_TH#+??%tQ`iNfifv&>7H;evH}iI+tPlWDTUu}|1L)`wpak>oYN5-qub+~$v!UaDUF|lWw+eUE&2wy$Aap*2{<8xwk1CD!6*SnfLJ-Wlv@zD4|W9^Cj-|Amsz?~olA@P7fYu%2w(Eej+700D(*LqkwWLqi~N za&Km7Y-Iodc$|HaJxIeq9K~N#OGT; zj20++-R0e#?Y;ebrrF;Q+jDZ!2!yor00006VoOIv0RI600RN!9r;`8x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru<^>%PEHGu1s(%0g0mMl}K~y-)osuzV6JZp`e_wh~ zsI>(J$q+%g>d~UDi=Bij?O>Nccd=jvLH9ZYr;wo)EENP5gJd*|P;dyL94$_Tf(Dn^ z6VLW2A*F}8lEA^m=OFp8Nvp;;eek{i|M&R6r})pZ@&y5ibt^Q}S+Vj3xqoAfsO)tw zy!q9U<-LlS>8t=4{~|Q31m~}syc#^q-P#VLJ$>B~JwMcB+Ye-Deoi}#KGTq@z_5-o~;L!Vbx}G4HG-P%qQr9wd z6_q`<2zfYohJ{*{QnSIfy9+?6+329h0L;t1dJ4lzuu!W4u=rOop>&3$PalV(@WpPdwojGbXG>}b+P?G zmiH<$Vz2AHx0h;><1fo>4%b+H8!$ODz=ZesaO1%~&f>gkH!uLcyDpo002ovPDHLkV1fm=h35bO diff --git a/src/main/resources/data/c/tags/items/axes.json b/src/main/resources/data/c/tags/items/axes.json index 15aa8189f..a22514f66 100644 --- a/src/main/resources/data/c/tags/items/axes.json +++ b/src/main/resources/data/c/tags/items/axes.json @@ -1,6 +1,5 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_chainsaw" ] } \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/hoes.json b/src/main/resources/data/c/tags/items/hoes.json index 15aa8189f..a22514f66 100644 --- a/src/main/resources/data/c/tags/items/hoes.json +++ b/src/main/resources/data/c/tags/items/hoes.json @@ -1,6 +1,5 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_chainsaw" ] } \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/pickaxes.json b/src/main/resources/data/c/tags/items/pickaxes.json index 348d3180b..fdd35f474 100644 --- a/src/main/resources/data/c/tags/items/pickaxes.json +++ b/src/main/resources/data/c/tags/items/pickaxes.json @@ -1,7 +1,6 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_mining_drill", "modern_industrialization:steam_mining_drill" ] } \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/shears.json b/src/main/resources/data/c/tags/items/shears.json index 15aa8189f..a22514f66 100644 --- a/src/main/resources/data/c/tags/items/shears.json +++ b/src/main/resources/data/c/tags/items/shears.json @@ -1,6 +1,5 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_chainsaw" ] } \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/shovels.json b/src/main/resources/data/c/tags/items/shovels.json index 348d3180b..fdd35f474 100644 --- a/src/main/resources/data/c/tags/items/shovels.json +++ b/src/main/resources/data/c/tags/items/shovels.json @@ -1,7 +1,6 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_mining_drill", "modern_industrialization:steam_mining_drill" ] } \ No newline at end of file diff --git a/src/main/resources/data/c/tags/items/swords.json b/src/main/resources/data/c/tags/items/swords.json index 15aa8189f..a22514f66 100644 --- a/src/main/resources/data/c/tags/items/swords.json +++ b/src/main/resources/data/c/tags/items/swords.json @@ -1,6 +1,5 @@ { "replace": false, "values": [ - "modern_industrialization:diesel_chainsaw" ] } \ No newline at end of file diff --git a/src/main/resources/data/modern_industrialization/recipes/tools/diesel_chainsaw.json b/src/main/resources/data/modern_industrialization/recipes/tools/diesel_chainsaw.json deleted file mode 100644 index 2d86c5a89..000000000 --- a/src/main/resources/data/modern_industrialization/recipes/tools/diesel_chainsaw.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "type" : "minecraft:crafting_shaped", - "pattern" : [ - " Rr", - "MrR", - "tM " - ], - "key" : { - "M": { - "item" : "modern_industrialization:large_motor" - }, - "r" : { - "item" : "modern_industrialization:invar_rotary_blade" - }, - "t" : { - "item" : "modern_industrialization:aluminum_tank" - }, - "R" : { - "item" : "modern_industrialization:rubber_sheet" - } - }, - "result": { - "item" : "modern_industrialization:diesel_chainsaw" - } -} \ No newline at end of file diff --git a/src/main/resources/data/modern_industrialization/recipes/tools/diesel_mining_drill.json b/src/main/resources/data/modern_industrialization/recipes/tools/diesel_mining_drill.json deleted file mode 100644 index ab178f37b..000000000 --- a/src/main/resources/data/modern_industrialization/recipes/tools/diesel_mining_drill.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "type" : "minecraft:crafting_shaped", - "pattern" : [ - "crH", - "MPr", - "tMc" - ], - "key" : { - "P" : { - "item" : "modern_industrialization:large_pump" - }, - "M": { - "item" : "modern_industrialization:large_motor" - }, - "r" : { - "item" : "modern_industrialization:invar_rotary_blade" - }, - "t" : { - "item" : "modern_industrialization:aluminum_tank" - }, - "c": { - "item" : "modern_industrialization:electronic_circuit" - }, - "H" : { - "item" : "modern_industrialization:aluminum_drill_head" - } - }, - "result": { - "item" : "modern_industrialization:diesel_mining_drill" - } -} \ No newline at end of file From 49f00cb07116a0b56d3e28d08918b0b8cc29a9de Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 22 Oct 2023 12:56:34 -0700 Subject: [PATCH 02/18] Non-functioning tool station block --- .../blockstates/tool_station.json | 7 ++ .../modern_industrialization/lang/en_us.json | 3 +- .../lang/untranslated/pt_br.json | 7 +- .../lang/untranslated/ru_ru.json | 1 + .../lang/untranslated/zh_cn.json | 7 +- .../lang/untranslated/zh_tw.json | 1 + .../models/item/tool_station.json | 3 + .../minecraft/tags/blocks/mineable/axe.json | 6 ++ .../loot_tables/blocks/tool_station.json | 20 +++++ .../modern_industrialization/MIBlock.java | 30 +++++-- .../ModernIndustrialization.java | 28 +++++-- .../blocks/toolstation/ToolStationBlock.java | 67 +++++++++++++++ .../toolstation/ToolStationScreenHandler.java | 76 ++++++++++++++++++ .../items/SortOrder.java | 1 + .../models/block/tool_station.json | 12 +++ .../textures/block/tool_station_bottom.png | Bin 0 -> 496 bytes .../textures/block/tool_station_front.png | Bin 0 -> 624 bytes .../textures/block/tool_station_side.png | Bin 0 -> 619 bytes .../recipes/tool_station.json | 20 +++++ 19 files changed, 260 insertions(+), 29 deletions(-) create mode 100644 src/generated/resources/assets/modern_industrialization/blockstates/tool_station.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/tool_station.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json create mode 100644 src/generated/resources/data/modern_industrialization/loot_tables/blocks/tool_station.json create mode 100644 src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java create mode 100644 src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java create mode 100644 src/main/resources/assets/modern_industrialization/models/block/tool_station.json create mode 100644 src/main/resources/assets/modern_industrialization/textures/block/tool_station_bottom.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/block/tool_station_front.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/block/tool_station_side.png create mode 100644 src/main/resources/data/modern_industrialization/recipes/tool_station.json diff --git a/src/generated/resources/assets/modern_industrialization/blockstates/tool_station.json b/src/generated/resources/assets/modern_industrialization/blockstates/tool_station.json new file mode 100644 index 000000000..3b4de87e4 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/blockstates/tool_station.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "modern_industrialization:block/tool_station" + } + } +} \ No newline at end of file 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 b2817681e..a5059cd27 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -422,6 +422,7 @@ "block.modern_industrialization.titanium_ore": "Titanium Ore", "block.modern_industrialization.titanium_tank": "Titanium Tank", "block.modern_industrialization.toluene": "Toluene", + "block.modern_industrialization.tool_station": "Tool Station", "block.modern_industrialization.trash_can": "Automatic Trash Can", "block.modern_industrialization.tritium": "Tritium", "block.modern_industrialization.tungsten_block": "Block of Tungsten", @@ -615,9 +616,7 @@ "item.modern_industrialization.diamond_plate": "Diamond Plate", "item.modern_industrialization.diamond_tiny_dust": "Diamond Tiny Dust", "item.modern_industrialization.diesel_bucket": "Diesel Bucket", - "item.modern_industrialization.diesel_chainsaw": "Diesel Chainsaw", "item.modern_industrialization.diesel_jetpack": "Diesel Jetpack", - "item.modern_industrialization.diesel_mining_drill": "Diesel Mining Drill", "item.modern_industrialization.diethyl_ether_bucket": "Diethyl Ether Bucket", "item.modern_industrialization.digital_circuit": "Digital Circuit", "item.modern_industrialization.digital_circuit_board": "Digital Circuit Board", 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 f1898fd8f..a11c60431 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 @@ -427,6 +427,7 @@ "block.modern_industrialization.titanium_ore": "Minério de Titânio", "block.modern_industrialization.titanium_tank": "Tanque de Titânio", "block.modern_industrialization.toluene": "Tolueno", + "block.modern_industrialization.tool_station": "[UNTRANSLATED] Tool Station", "block.modern_industrialization.trash_can": "Lixeira Automática", "block.modern_industrialization.tritium": "Trítio", "block.modern_industrialization.tungsten_block": "Bloco de Tungstênio", @@ -622,12 +623,6 @@ "item.modern_industrialization.diamond_tiny_dust": "Pó Pequeno de Diamante", "item.modern_industrialization.diesel_bucket": "Balde de Diesel", "item.modern_industrialization.diesel_jetpack": "Jetpack à Diesel", - "item.modern_industrialization.diethyl_ether_bucket": "Balde de Éter Etílico", - "item.modern_industrialization.digital_circuit": "Circuito Digital", - "item.modern_industrialization.digital_circuit_board": "Placa de Circuito Digital", - "item.modern_industrialization.diode": "Diodo", - "item.modern_industrialization.electronic_circuit": "Circuito Eletrônico", - "item.modern_industrialization.electronic_circuit_board": "Placa de Circuito Eletrônico", "item.modern_industrialization.electrum_cable": "Cabo de Electro", "item.modern_industrialization.electrum_double_ingot": "Barra Dupla de Electro", "item.modern_industrialization.electrum_dust": "Pó de Electro", 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 ce6c28773..41d8cc1c0 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 @@ -427,6 +427,7 @@ "block.modern_industrialization.titanium_ore": "Титановая руда", "block.modern_industrialization.titanium_tank": "Титановый бак", "block.modern_industrialization.toluene": "Талуол", + "block.modern_industrialization.tool_station": "[UNTRANSLATED] Tool Station", "block.modern_industrialization.trash_can": "Автоматическое мусорное ведро", "block.modern_industrialization.tritium": "Тритий", "block.modern_industrialization.tungsten_block": "Вольфрамовый блок", 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 1592d3d93..87c190aa5 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 @@ -425,6 +425,7 @@ "block.modern_industrialization.titanium_ore": "钛矿石", "block.modern_industrialization.titanium_tank": "钛储罐", "block.modern_industrialization.toluene": "甲苯", + "block.modern_industrialization.tool_station": "[UNTRANSLATED] Tool Station", "block.modern_industrialization.trash_can": "自动垃圾桶", "block.modern_industrialization.tritium": "氚", "block.modern_industrialization.tungsten_block": "钨块", @@ -620,12 +621,6 @@ "item.modern_industrialization.diamond_tiny_dust": "小堆钻石粉", "item.modern_industrialization.diesel_bucket": "[UNTRANSLATED] Diesel Bucket", "item.modern_industrialization.diesel_jetpack": "柴油喷气背包", - "item.modern_industrialization.diethyl_ether_bucket": "[UNTRANSLATED] Diethyl Ether Bucket", - "item.modern_industrialization.digital_circuit": "数字电路", - "item.modern_industrialization.digital_circuit_board": "数字电路板", - "item.modern_industrialization.diode": "二极管", - "item.modern_industrialization.electronic_circuit": "电子电路", - "item.modern_industrialization.electronic_circuit_board": "电子电路板", "item.modern_industrialization.electrum_cable": "琥珀金电缆", "item.modern_industrialization.electrum_double_ingot": "琥珀金双层锭", "item.modern_industrialization.electrum_dust": "琥珀金粉", 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 371fb0f41..891df4ce5 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 @@ -486,6 +486,7 @@ "block.modern_industrialization.titanium_ore": "[UNTRANSLATED] Titanium Ore", "block.modern_industrialization.titanium_tank": "[UNTRANSLATED] Titanium Tank", "block.modern_industrialization.toluene": "[UNTRANSLATED] Toluene", + "block.modern_industrialization.tool_station": "[UNTRANSLATED] Tool Station", "block.modern_industrialization.trash_can": "自動垃圾桶", "block.modern_industrialization.tritium": "[UNTRANSLATED] Tritium", "block.modern_industrialization.tungsten_block": "[UNTRANSLATED] Block of Tungsten", diff --git a/src/generated/resources/assets/modern_industrialization/models/item/tool_station.json b/src/generated/resources/assets/modern_industrialization/models/item/tool_station.json new file mode 100644 index 000000000..f79cb551b --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/tool_station.json @@ -0,0 +1,3 @@ +{ + "parent": "modern_industrialization:block/tool_station" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 000000000..dd32a323b --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "modern_industrialization:tool_station" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/loot_tables/blocks/tool_station.json b/src/generated/resources/data/modern_industrialization/loot_tables/blocks/tool_station.json new file mode 100644 index 000000000..5b3bda30c --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/loot_tables/blocks/tool_station.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "modern_industrialization:tool_station" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/MIBlock.java b/src/main/java/aztech/modern_industrialization/MIBlock.java index 16c33b812..2fd1cd995 100644 --- a/src/main/java/aztech/modern_industrialization/MIBlock.java +++ b/src/main/java/aztech/modern_industrialization/MIBlock.java @@ -35,6 +35,7 @@ import aztech.modern_industrialization.blocks.storage.tank.TankBlock; import aztech.modern_industrialization.blocks.storage.tank.TankItem; import aztech.modern_industrialization.blocks.storage.tank.creativetank.CreativeTankBlockEntity; +import aztech.modern_industrialization.blocks.toolstation.ToolStationBlock; import aztech.modern_industrialization.definition.BlockDefinition; import aztech.modern_industrialization.items.SortOrder; import aztech.modern_industrialization.materials.part.TankPart; @@ -57,6 +58,7 @@ import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.MapColor; @@ -72,6 +74,9 @@ public class MIBlock { BlockDefinitionParams.defaultStone().withBlockConstructor(ForgeHammerBlock::new).sortOrder(SortOrder.FORGE_HAMMER).noModel().destroyTime(6.0f).explosionResistance(1200) .sound(SoundType.ANVIL), ForgeHammerBlock.class); + public static final BlockDefinition TOOL_STATION = block("Tool Station", "tool_station", + BlockDefinitionParams.copy(Blocks.SMITHING_TABLE).withBlockConstructor(ToolStationBlock::new).sortOrder(SortOrder.TOOL_STATION).noModel().clearTags().addMoreTags(List.of(BlockTags.MINEABLE_WITH_AXE)), + ToolStationBlock.class); // Bronze stuff public static final BlockDefinition TRASH_CAN = block("Automatic Trash Can", "trash_can", @@ -136,7 +141,8 @@ private static BlockDefinition block( BiConsumer lootTableGenerator, List> tags, SortOrder sortOrder) { - BlockDefinition definition = new BlockDefinition<>(englishName, id, block, blockItemCtor, modelGenerator, itemModelGenerator, + BlockDefinition definition = new BlockDefinition<>(englishName, id, block, blockItemCtor, modelGenerator, + itemModelGenerator, lootTableGenerator, tags, sortOrder); if (BLOCKS.put(definition.getId(), definition) != null) { @@ -179,7 +185,8 @@ public static BlockDefinition blockExplosive(String englishName, String i englishName, id, BlockDefinitionParams.of( - BlockBehaviour.Properties.of().mapColor(MapColor.FIRE).ignitedByLava().instabreak().sound(SoundType.GRASS)) + BlockBehaviour.Properties.of().mapColor(MapColor.FIRE).ignitedByLava().instabreak() + .sound(SoundType.GRASS)) .clearTags().noModel()); // TODO : Datagen model @@ -219,11 +226,18 @@ public static BlockDefinitionParams of(BlockBehaviour.Properties properti } public static BlockDefinitionParams defaultStone() { - return of(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).destroyTime(4.0f).requiresCorrectToolForDrops()); + return of(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).destroyTime(4.0f) + .requiresCorrectToolForDrops()); } - public BlockDefinitionParams withBlockConstructor(Function ctor) { - return new BlockDefinitionParams<>(this, ctor, (BiFunction) this.blockItemCtor, this.modelGenerator, this.lootTableGenerator, this.tags); + public static BlockDefinitionParams copy(BlockBehaviour block) { + return of(FabricBlockSettings.copy(block)); + } + + public BlockDefinitionParams withBlockConstructor( + Function ctor) { + return new BlockDefinitionParams<>(this, ctor, (BiFunction) this.blockItemCtor, this.modelGenerator, + this.lootTableGenerator, this.tags); } public BlockDefinitionParams withBlockConstructor(Supplier ctor) { @@ -235,7 +249,8 @@ public BlockDefinitionParams withBlockConstructor(Supplier< this.tags); } - public BlockDefinitionParams withBlockItemConstructor(BiFunction blockItemCtor) { + public BlockDefinitionParams withBlockItemConstructor( + BiFunction blockItemCtor) { this.blockItemCtor = blockItemCtor; return this; } @@ -261,7 +276,8 @@ public BlockDefinitionParams withBlockEntityRendererItemModel() { // Skip default item model gen.skipAutoItemBlock(block); }).withItemModel((item, gen) -> { - // We need the builtin/entity parent and the proper transforms (copied from block/block.json from vanilla) + // We need the builtin/entity parent and the proper transforms (copied from + // block/block.json from vanilla) gen.output.accept(ModelLocationUtils.getModelLocation(item), () -> { var json = JsonParser.parseString(""" { diff --git a/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java b/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java index f0d06fbaa..ab30dc71b 100644 --- a/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java +++ b/src/main/java/aztech/modern_industrialization/ModernIndustrialization.java @@ -27,6 +27,7 @@ import aztech.modern_industrialization.blocks.WrenchableBlockEntity; import aztech.modern_industrialization.blocks.forgehammer.ForgeHammerScreenHandler; import aztech.modern_industrialization.blocks.storage.barrel.BarrelBlock; +import aztech.modern_industrialization.blocks.toolstation.ToolStationScreenHandler; import aztech.modern_industrialization.compat.ae2.AECompatCondition; import aztech.modern_industrialization.compat.kubejs.KubeJSProxy; import aztech.modern_industrialization.definition.BlockDefinition; @@ -76,13 +77,19 @@ public class ModernIndustrialization { public static final String MOD_ID = "modern_industrialization"; public static final Logger LOGGER = LogManager.getLogger("Modern Industrialization"); - public static final ResourceKey TAB_KEY = ResourceKey.create(Registries.CREATIVE_MODE_TAB, new MIIdentifier("general")); + public static final ResourceKey TAB_KEY = ResourceKey.create(Registries.CREATIVE_MODE_TAB, + new MIIdentifier("general")); // ScreenHandlerType public static final MenuType SCREEN_HANDLER_MACHINE = Registry.register(BuiltInRegistries.MENU, - new MIIdentifier("machine"), new ExtendedScreenHandlerType<>(CommonProxy.INSTANCE::createClientMachineMenu)); - public static final MenuType SCREEN_HANDLER_FORGE_HAMMER = Registry.register(BuiltInRegistries.MENU, + new MIIdentifier("machine"), + new ExtendedScreenHandlerType<>(CommonProxy.INSTANCE::createClientMachineMenu)); + public static final MenuType SCREEN_HANDLER_FORGE_HAMMER = Registry.register( + BuiltInRegistries.MENU, new MIIdentifier("forge_hammer"), new MenuType<>(ForgeHammerScreenHandler::new, FeatureFlags.VANILLA_SET)); + public static final MenuType SCREEN_HANDLER_TOOL_STATION = Registry.register( + BuiltInRegistries.MENU, + new MIIdentifier("tool_station"), new MenuType<>(ToolStationScreenHandler::new, FeatureFlags.VANILLA_SET)); public static void initialize() { Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, TAB_KEY, FabricItemGroup.builder() @@ -115,7 +122,8 @@ public static void initialize() { setupWrench(); ChunkEventListeners.init(); - ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD.register((player, oldWorld, newWorld) -> MIKeyMap.clear(player)); + ServerEntityWorldChangeEvents.AFTER_PLAYER_CHANGE_WORLD + .register((player, oldWorld, newWorld) -> MIKeyMap.clear(player)); ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { MIKeyMap.clear(handler.player); }); @@ -169,10 +177,14 @@ private static void setupPackets() { ConfigurableInventoryPacketHandlers.C2S.DO_SLOT_DRAGGING); ServerPlayNetworking.registerGlobalReceiver(ConfigurableInventoryPackets.ADJUST_SLOT_CAPACITY, ConfigurableInventoryPacketHandlers.C2S.ADJUST_SLOT_CAPACITY); - ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.CHANGE_SHAPE, MachinePackets.C2S.ON_CHANGE_SHAPE); - ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.SET_AUTO_EXTRACT, MachinePackets.C2S.ON_SET_AUTO_EXTRACT); - ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.FORGE_HAMMER_MOVE_RECIPE, MachinePackets.C2S.ON_FORGE_HAMMER_MOVE_RECIPE); - ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.REI_LOCK_SLOTS, MachinePackets.C2S.ON_REI_LOCK_SLOTS); + ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.CHANGE_SHAPE, + MachinePackets.C2S.ON_CHANGE_SHAPE); + ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.SET_AUTO_EXTRACT, + MachinePackets.C2S.ON_SET_AUTO_EXTRACT); + ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.FORGE_HAMMER_MOVE_RECIPE, + MachinePackets.C2S.ON_FORGE_HAMMER_MOVE_RECIPE); + ServerPlayNetworking.registerGlobalReceiver(MachinePackets.C2S.REI_LOCK_SLOTS, + MachinePackets.C2S.ON_REI_LOCK_SLOTS); CommonProxy.INSTANCE.registerUnsidedPacket(ArmorPackets.UPDATE_KEYS, ArmorPackets.ON_UPDATE_KEYS); CommonProxy.INSTANCE.registerUnsidedPacket(ArmorPackets.ACTIVATE_CHEST, ArmorPackets.ON_ACTIVATE_CHEST); } diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java new file mode 100644 index 000000000..053b47fa6 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 Justin Hu + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package aztech.modern_industrialization.blocks.toolstation; + +import aztech.modern_industrialization.MIBlock; +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.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerLevelAccess; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; + +public class ToolStationBlock extends Block { + public ToolStationBlock(Properties properties) { + super(properties); + } + + @Override + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, + BlockHitResult hit) { + if (world.isClientSide) { + return InteractionResult.SUCCESS; + } else { + player.openMenu(new MenuProvider() { + + @Override + public AbstractContainerMenu createMenu(int syncId, Inventory inv, Player player) { + return new ToolStationScreenHandler(syncId, inv, ContainerLevelAccess.create(world, pos)); + } + + @Override + public Component getDisplayName() { + return Component.translatable(MIBlock.TOOL_STATION.asBlock().getDescriptionId()); + } + }); + return InteractionResult.CONSUME; + } + } +} diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java new file mode 100644 index 000000000..70bd8e27f --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 Justin Hu + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package aztech.modern_industrialization.blocks.toolstation; + +import aztech.modern_industrialization.ModernIndustrialization; +import java.util.ArrayList; +import java.util.List; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerLevelAccess; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +public class ToolStationScreenHandler extends AbstractContainerMenu { + public final Slot tool; + public final Slot energyStorage; + public final Slot energyConverter; + public final Slot head; + public final List addons; + + private final ContainerLevelAccess context; + private final Level world; + private final Player player; + + public ToolStationScreenHandler(int syncId, Inventory playerInventory) { + this(syncId, playerInventory, ContainerLevelAccess.NULL); + } + + public ToolStationScreenHandler(int syncId, Inventory playerInventory, ContainerLevelAccess context) { + super(ModernIndustrialization.SCREEN_HANDLER_TOOL_STATION, syncId); + + this.context = context; + this.world = playerInventory.player.level(); + this.player = playerInventory.player; + + // TODO + this.tool = null; + this.energyStorage = null; + this.energyConverter = null; + this.head = null; + this.addons = new ArrayList<>(); + } + + @Override + public boolean stillValid(Player player) { + return true; + } + + @Override + public ItemStack quickMoveStack(Player player, int index) { + return ItemStack.EMPTY; + } +} diff --git a/src/main/java/aztech/modern_industrialization/items/SortOrder.java b/src/main/java/aztech/modern_industrialization/items/SortOrder.java index fe4957365..002eaccb3 100644 --- a/src/main/java/aztech/modern_industrialization/items/SortOrder.java +++ b/src/main/java/aztech/modern_industrialization/items/SortOrder.java @@ -28,6 +28,7 @@ public final class SortOrder implements Comparable { public static final SortOrder GUIDE_BOOK = new SortOrder(); public static final SortOrder FORGE_HAMMER = new SortOrder(); + public static final SortOrder TOOL_STATION = new SortOrder(); public static final SortOrder HAMMER = new SortOrder(); public static final SortOrder STEAM_TIER = new SortOrder(); public static final SortOrder ITEMS_OTHER = new SortOrder(); diff --git a/src/main/resources/assets/modern_industrialization/models/block/tool_station.json b/src/main/resources/assets/modern_industrialization/models/block/tool_station.json new file mode 100644 index 000000000..810e30523 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/block/tool_station.json @@ -0,0 +1,12 @@ +{ + "parent": "minecraft:block/cube", + "textures": { + "down": "modern_industrialization:block/tool_station_bottom", + "east": "modern_industrialization:block/tool_station_side", + "north": "modern_industrialization:block/tool_station_front", + "particle": "modern_industrialization:block/tool_station_front", + "south": "modern_industrialization:block/tool_station_front", + "up": "minecraft:block/smithing_table_top", + "west": "modern_industrialization:block/tool_station_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/textures/block/tool_station_bottom.png b/src/main/resources/assets/modern_industrialization/textures/block/tool_station_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..2701c2fb0dd35e6f87c7d578b4ea7de405e80227 GIT binary patch literal 496 zcmV9*F)SRGm^Yd)wleQ`d zcOz_7VDhqYS;gH(lhOSHLHao1DRbQqv@1Mi1>-CSU|+`ojI*459XI%KmJ{?3dko(1 zFif9$m%IjGuzu0!+EPqj^6^L$I3glZn(1tg$xBq+#pET{EEu*%m+?d8WCkWLF_atA z;*DNw79>hH{E^pd6F+|%tbDBpI%;?zkb3)0=l0j-O8&F2@zu*c{)fUYNloT*FrCde z+SaG|ArN2W1h8g7;9ifm>XQ%KO#l+5N!uQ5%Yk2$y!f@?;`Eqd`b?s9o%z090+5=l zk%MrZ3x7X?>1D|;greAkc#tA^5j?a#DAXviB*t!Qy4yAB&Lo7S9yYt#5PdMb z;eT%)|NqZS&)E3sU4UkzisRS_A?fRjQL9x6hmZ!bSb}Z4*n#zG<)D>=<*;oR(OLzVZLJdt13No^NTt$2Q+OYaFxIm_Ik4M7Rm59OZr8zo)gwa0 z(c0z3>{+i+SBR)Y*A)+*d;s9;)JXu0c+49Tm0Y~_1|i}^5{Z7acKNvcm7$~rV8d2y z+Acp`4Zzxu-)!10-#!;YObil;wS*q%WK@fG0DwG zZ-YU-LP)fBNgGLS-+M{UEMb)^URF(Sl`B}~3P8tUpv^$n6=uB===8I%8Q|g5`2f2z zeGMUG`x;kT`pjQjT^_t%T;gCd&YkO%WV6}!U}<;^e4X=)Uq}xhAUzBN`}PJNTt0V# z|3$A59=*Yd85Z6xapcS#A}T%IEf0KOp4~m)J;2}OaybApnGB|5O+l;gesGS%PYSu^y3D!!$ z%HL4L07xJ)u(2`1#Dc_7Bp5)50hS6Pkss zUw_~CrY@{rJO(&Qdqh!)5R#c0i+;aHK7@3ztP%&|_82y;RfJX%Q4|6Y1U~(K53LnJ z;G1HtA`ZfBv{nWS+dCBUz~SLvT(@G1^6&Y`V^b%~r;f*{3OiRAkKy@s7KQA?vwN2Z zO^HGjB|1^ueDoH8TQ{lzIJPy|tSGs9=Osee6iTI8w2t}s`6~-$3BYcs*b8G~l>qST z=RSL3%zW8qFC4Kbm1Zeqi_?p9ELB_pR)*O2k3Rs^s>=W3%(QI0e)f+Y$+NpWn;WFz3PAv-;aduScwx|Puw>x~v` zwH3}@y3bmp#q0M?e#aVs7jHf>Umi^-(@IEZ#GqDPX0EzU^VMyxtv_Y|!$YIN^(*Hm z#s^=rF-n492c=Uy&qEX?p6Bte)1|GB0Py?($F_*#p2?YC3NSQDqTu@zqPPe3$75$@ zdSuO6gzX&)LOOs?z0sQR!MAqD=(A9k?1lrqGA{@rM;ff2JA)J_09e#1FzEx~2P{=w zlup^$d^ZrWwbe9~luq%7x6-jKqk$T3=-AennOa*-{sU**8P(8mZw>$e002ovPDHLk FV1lwk4>kY* literal 0 HcmV?d00001 diff --git a/src/main/resources/data/modern_industrialization/recipes/tool_station.json b/src/main/resources/data/modern_industrialization/recipes/tool_station.json new file mode 100644 index 000000000..e1870f259 --- /dev/null +++ b/src/main/resources/data/modern_industrialization/recipes/tool_station.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ss", + "pp", + "pp" + ], + "key": { + "s": { + "item": "modern_industrialization:steel_ingot" + }, + "p": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "modern_industrialization:tool_station" + } +} + From 449e1007cf64601ab70e7371bebe873442d6362f Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Tue, 24 Oct 2023 22:31:05 -0700 Subject: [PATCH 03/18] Add rotary blades to the material system --- .../modern_industrialization/lang/en_us.json | 4 + .../lang/untranslated/ko_kr.json | 5 + .../lang/untranslated/pt_br.json | 10 ++ .../lang/untranslated/ru_ru.json | 4 + .../lang/untranslated/zh_cn.json | 10 ++ .../lang/untranslated/zh_tw.json | 4 + .../models/item/aluminum_rotary_blade.json | 6 + .../item/stainless_steel_rotary_blade.json | 6 + .../models/item/steel_rotary_blade.json | 6 + .../models/item/titanium_rotary_blade.json | 6 + .../textures/item/aluminum_rotary_blade.png | Bin 0 -> 861 bytes .../textures/item/invar_rotary_blade.png | Bin 0 -> 848 bytes .../item/stainless_steel_rotary_blade.png | Bin 0 -> 853 bytes .../textures/item/steel_rotary_blade.png | Bin 0 -> 809 bytes .../textures/item/titanium_rotary_blade.png | Bin 0 -> 854 bytes .../aluminum/assembler/rotary_blade.json | 21 +++ .../aluminum/craft/rotary_blade.json | 20 +++ .../invar/assembler/rotary_blade.json} | 10 +- .../materials/invar/craft/rotary_blade.json | 20 +++ .../assembler/rotary_blade.json | 21 +++ .../stainless_steel/craft/rotary_blade.json | 20 +++ .../steel/assembler/rotary_blade.json | 21 +++ .../materials/steel/craft/rotary_blade.json | 20 +++ .../titanium/assembler/rotary_blade.json | 21 +++ .../titanium/craft/rotary_blade.json | 20 +++ .../modern_industrialization/MIItem.java | 1 - .../materials/MIMaterials.java | 14 +- .../materials/part/MIParts.java | 34 ++-- .../materials/recipe/StandardRecipes.java | 151 ++++++++++++------ .../textures/item/invar_rotary_blade.png | Bin 3166 -> 0 bytes .../materialsets/common/rotary_blade.png | Bin 0 -> 2650 bytes .../common/rotary_blade_overlay.png | Bin 0 -> 3003 bytes .../craft/invar_rotary_blade_asbl.json | 19 --- 33 files changed, 384 insertions(+), 90 deletions(-) create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/aluminum_rotary_blade.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_rotary_blade.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/steel_rotary_blade.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/titanium_rotary_blade.json create mode 100644 src/generated/resources/assets/modern_industrialization/textures/item/aluminum_rotary_blade.png create mode 100644 src/generated/resources/assets/modern_industrialization/textures/item/invar_rotary_blade.png create mode 100644 src/generated/resources/assets/modern_industrialization/textures/item/stainless_steel_rotary_blade.png create mode 100644 src/generated/resources/assets/modern_industrialization/textures/item/steel_rotary_blade.png create mode 100644 src/generated/resources/assets/modern_industrialization/textures/item/titanium_rotary_blade.png create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/rotary_blade.json rename src/generated/resources/data/modern_industrialization/recipes/{assembler_generated/electric_age/component/craft/invar_rotary_blade.json => materials/invar/assembler/rotary_blade.json} (82%) create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/invar/craft/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/rotary_blade.json delete mode 100644 src/main/resources/assets/modern_industrialization/textures/item/invar_rotary_blade.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/materialsets/common/rotary_blade.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/materialsets/common/rotary_blade_overlay.png delete mode 100644 src/main/resources/data/modern_industrialization/recipes/electric_age/component/craft/invar_rotary_blade_asbl.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 a5059cd27..64616648e 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -468,6 +468,7 @@ "item.modern_industrialization.aluminum_plate": "Aluminum Plate", "item.modern_industrialization.aluminum_ring": "Aluminum Ring", "item.modern_industrialization.aluminum_rod": "Aluminum Rod", + "item.modern_industrialization.aluminum_rotary_blade": "Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Aluminum Rotor", "item.modern_industrialization.aluminum_tiny_dust": "Aluminum Tiny Dust", "item.modern_industrialization.aluminum_wire": "Aluminum Wire", @@ -941,6 +942,7 @@ "item.modern_industrialization.stainless_steel_ring": "Stainless Steel Ring", "item.modern_industrialization.stainless_steel_rod": "Stainless Steel Rod", "item.modern_industrialization.stainless_steel_rod_magnetic": "Magnetic Stainless Steel Rod", + "item.modern_industrialization.stainless_steel_rotary_blade": "Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Stainless Steel Rotor", "item.modern_industrialization.stainless_steel_tiny_dust": "Stainless Steel Tiny Dust", "item.modern_industrialization.steam_bucket": "Steam Bucket", @@ -963,6 +965,7 @@ "item.modern_industrialization.steel_ring": "Steel Ring", "item.modern_industrialization.steel_rod": "Steel Rod", "item.modern_industrialization.steel_rod_magnetic": "Magnetic Steel Rod", + "item.modern_industrialization.steel_rotary_blade": "Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Steel Tiny Dust", "item.modern_industrialization.steel_upgrade": "Steel Upgrade", "item.modern_industrialization.styrene_bucket": "Styrene Bucket", @@ -1018,6 +1021,7 @@ "item.modern_industrialization.titanium_plate": "Titanium Plate", "item.modern_industrialization.titanium_ring": "Titanium Ring", "item.modern_industrialization.titanium_rod": "Titanium Rod", + "item.modern_industrialization.titanium_rotary_blade": "Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Titanium Rotor", "item.modern_industrialization.titanium_tiny_dust": "Titanium Tiny Dust", "item.modern_industrialization.toluene_bucket": "Toluene Bucket", 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 3dd37b4b7..b4a69e42f 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 @@ -479,6 +479,7 @@ "block.modern_industrialization.titanium_ore": "티타늄 광석", "block.modern_industrialization.titanium_tank": "티타늄 탱크", "block.modern_industrialization.toluene": "톨루엔", + "block.modern_industrialization.tool_station": "[UNTRANSLATED] Tool Station", "block.modern_industrialization.trash_can": "자동 쓰레기통", "block.modern_industrialization.tritium": "삼중수소", "block.modern_industrialization.tungsten_block": "텅스텐 블록", @@ -535,6 +536,7 @@ "item.modern_industrialization.aluminum_plate": "알루미늄 판", "item.modern_industrialization.aluminum_ring": "알루미늄 고리", "item.modern_industrialization.aluminum_rod": "알루미늄 막대", + "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "알루미늄 로터", "item.modern_industrialization.aluminum_tiny_dust": "작은 알루미늄 가루", "item.modern_industrialization.aluminum_wire": "알루미늄 선", @@ -1132,6 +1134,7 @@ "item.modern_industrialization.stainless_steel_ring": "스테인리스강 고리", "item.modern_industrialization.stainless_steel_rod": "스테인리스강 막대", "item.modern_industrialization.stainless_steel_rod_magnetic": "자성 스테인리스강 막대", + "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "스테인리스강 로터", "item.modern_industrialization.stainless_steel_tiny_dust": "작은 스테인리스강 가루", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", @@ -1155,6 +1158,7 @@ "item.modern_industrialization.steel_ring": "강철 고리", "item.modern_industrialization.steel_rod": "강철 막대", "item.modern_industrialization.steel_rod_magnetic": "자성 강철 막대", + "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_rotor": "[UNUSED, PLEASE REMOVE] 강철 로터", "item.modern_industrialization.steel_tiny_dust": "작은 강철 가루", "item.modern_industrialization.steel_upgrade": "강철 업그레이드", @@ -1213,6 +1217,7 @@ "item.modern_industrialization.titanium_plate": "티타늄 판", "item.modern_industrialization.titanium_ring": "티타늄 고리", "item.modern_industrialization.titanium_rod": "티타늄 막대", + "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "티타늄 로터", "item.modern_industrialization.titanium_tiny_dust": "작은 티타늄 가루", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", 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 a11c60431..bd7edc8e5 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 @@ -474,6 +474,7 @@ "item.modern_industrialization.aluminum_plate": "Chapa de Alumínio", "item.modern_industrialization.aluminum_ring": "Anel de Alumínio", "item.modern_industrialization.aluminum_rod": "Vara de Alumínio", + "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Rotor de Alumínio", "item.modern_industrialization.aluminum_tiny_dust": "Pó Pequeno de Alumínio", "item.modern_industrialization.aluminum_wire": "Fio de Alumínio", @@ -623,6 +624,12 @@ "item.modern_industrialization.diamond_tiny_dust": "Pó Pequeno de Diamante", "item.modern_industrialization.diesel_bucket": "Balde de Diesel", "item.modern_industrialization.diesel_jetpack": "Jetpack à Diesel", + "item.modern_industrialization.diethyl_ether_bucket": "Balde de Éter Etílico", + "item.modern_industrialization.digital_circuit": "Circuito Digital", + "item.modern_industrialization.digital_circuit_board": "Placa de Circuito Digital", + "item.modern_industrialization.diode": "Diodo", + "item.modern_industrialization.electronic_circuit": "Circuito Eletrônico", + "item.modern_industrialization.electronic_circuit_board": "Placa de Circuito Eletrônico", "item.modern_industrialization.electrum_cable": "Cabo de Electro", "item.modern_industrialization.electrum_double_ingot": "Barra Dupla de Electro", "item.modern_industrialization.electrum_dust": "Pó de Electro", @@ -941,6 +948,7 @@ "item.modern_industrialization.stainless_steel_ring": "Anel de Aço Inoxidável", "item.modern_industrialization.stainless_steel_rod": "Vara de Aço Inoxidável", "item.modern_industrialization.stainless_steel_rod_magnetic": "Vara de Aço Inoxidável Magnetizado", + "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Rotor de Aço Inoxidável", "item.modern_industrialization.stainless_steel_tiny_dust": "Pó Pequeno de Aço Inoxidável", "item.modern_industrialization.steam_bucket": "Balde de Vapor", @@ -963,6 +971,7 @@ "item.modern_industrialization.steel_ring": "Anel de Aço", "item.modern_industrialization.steel_rod": "Vara de Aço", "item.modern_industrialization.steel_rod_magnetic": "Vara de Aço Magnetizado", + "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Pó Pequeno de Aço", "item.modern_industrialization.steel_upgrade": "Melhoria de Aço", "item.modern_industrialization.styrene_bucket": "Balde de Estireno", @@ -1018,6 +1027,7 @@ "item.modern_industrialization.titanium_plate": "Chapa de Titânio", "item.modern_industrialization.titanium_ring": "Anel de Titânio", "item.modern_industrialization.titanium_rod": "Vara de Titânio", + "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Rotor de Titânio", "item.modern_industrialization.titanium_tiny_dust": "Pó Pequeno de Titânio", "item.modern_industrialization.toluene_bucket": "Balde de Tolueno", 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 41d8cc1c0..099af1cb8 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 @@ -474,6 +474,7 @@ "item.modern_industrialization.aluminum_plate": "Алюминиевая пластина", "item.modern_industrialization.aluminum_ring": "Алюминиевое кольцо", "item.modern_industrialization.aluminum_rod": "Алюминиевый болт", + "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Алюминиевое ротор", "item.modern_industrialization.aluminum_tiny_dust": "Алюминиевый мельчайший порошок", "item.modern_industrialization.aluminum_wire": "Алюминиевый провод", @@ -947,6 +948,7 @@ "item.modern_industrialization.stainless_steel_ring": "Кольцо из нержавеющей стали", "item.modern_industrialization.stainless_steel_rod": "болт нержавеющей стали", "item.modern_industrialization.stainless_steel_rod_magnetic": "Магнитный болт из нержавеющей стали", + "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Ротор из нержавеющей стали", "item.modern_industrialization.stainless_steel_tiny_dust": "Мельчайший порошок нержавеющей стали", "item.modern_industrialization.steam_bucket": "Ведро пара", @@ -969,6 +971,7 @@ "item.modern_industrialization.steel_ring": "Стальное кольцо", "item.modern_industrialization.steel_rod": "Стальной болт", "item.modern_industrialization.steel_rod_magnetic": "болт из магнитной стали", + "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Мельчайший стальной порошок", "item.modern_industrialization.steel_upgrade": "Стальная модернизация", "item.modern_industrialization.styrene_bucket": "Ведро стирола", @@ -1024,6 +1027,7 @@ "item.modern_industrialization.titanium_plate": "Титановая пластина", "item.modern_industrialization.titanium_ring": "Титановое кольцо", "item.modern_industrialization.titanium_rod": "Титановый болт", + "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Титановый ротор", "item.modern_industrialization.titanium_tiny_dust": "Мельчайший титановый порошок", "item.modern_industrialization.toluene_bucket": "Ведро таулола", 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 87c190aa5..299fb9391 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 @@ -472,6 +472,7 @@ "item.modern_industrialization.aluminum_plate": "铝板", "item.modern_industrialization.aluminum_ring": "铝环", "item.modern_industrialization.aluminum_rod": "铝杆", + "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "铝转子", "item.modern_industrialization.aluminum_tiny_dust": "小堆铝粉", "item.modern_industrialization.aluminum_wire": "铝线", @@ -621,6 +622,12 @@ "item.modern_industrialization.diamond_tiny_dust": "小堆钻石粉", "item.modern_industrialization.diesel_bucket": "[UNTRANSLATED] Diesel Bucket", "item.modern_industrialization.diesel_jetpack": "柴油喷气背包", + "item.modern_industrialization.diethyl_ether_bucket": "[UNTRANSLATED] Diethyl Ether Bucket", + "item.modern_industrialization.digital_circuit": "数字电路", + "item.modern_industrialization.digital_circuit_board": "数字电路板", + "item.modern_industrialization.diode": "二极管", + "item.modern_industrialization.electronic_circuit": "电子电路", + "item.modern_industrialization.electronic_circuit_board": "电子电路板", "item.modern_industrialization.electrum_cable": "琥珀金电缆", "item.modern_industrialization.electrum_double_ingot": "琥珀金双层锭", "item.modern_industrialization.electrum_dust": "琥珀金粉", @@ -939,6 +946,7 @@ "item.modern_industrialization.stainless_steel_ring": "不锈钢环", "item.modern_industrialization.stainless_steel_rod": "不锈钢杆", "item.modern_industrialization.stainless_steel_rod_magnetic": "磁化不锈钢棒", + "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "不锈钢转子", "item.modern_industrialization.stainless_steel_tiny_dust": "小堆不锈钢粉", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", @@ -961,6 +969,7 @@ "item.modern_industrialization.steel_ring": "钢环", "item.modern_industrialization.steel_rod": "钢杆", "item.modern_industrialization.steel_rod_magnetic": "磁化钢杆", + "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "小堆钢粉", "item.modern_industrialization.steel_upgrade": "钢材升级", "item.modern_industrialization.styrene_bucket": "[UNTRANSLATED] Styrene Bucket", @@ -1016,6 +1025,7 @@ "item.modern_industrialization.titanium_plate": "钛板", "item.modern_industrialization.titanium_ring": "钛环", "item.modern_industrialization.titanium_rod": "钛杆", + "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "钛转子", "item.modern_industrialization.titanium_tiny_dust": "小堆钛粉", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", 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 891df4ce5..3dafe57bb 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 @@ -535,6 +535,7 @@ "item.modern_industrialization.aluminum_plate": "鋁板", "item.modern_industrialization.aluminum_ring": "鋁環", "item.modern_industrialization.aluminum_rod": "鋁杆", + "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "鋁轉子", "item.modern_industrialization.aluminum_tiny_dust": "小鋁粉", "item.modern_industrialization.aluminum_wire": "鋁線", @@ -1116,6 +1117,7 @@ "item.modern_industrialization.stainless_steel_ring": "不鏽鋼環", "item.modern_industrialization.stainless_steel_rod": "不鏽鋼杆", "item.modern_industrialization.stainless_steel_rod_magnetic": "[UNTRANSLATED] Magnetic Stainless Steel Rod", + "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "不鏽鋼轉子", "item.modern_industrialization.stainless_steel_tiny_dust": "小不鏽鋼粉", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", @@ -1139,6 +1141,7 @@ "item.modern_industrialization.steel_ring": "鋼環", "item.modern_industrialization.steel_rod": "鋼杆", "item.modern_industrialization.steel_rod_magnetic": "磁化鋼杆", + "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_rotor": "[UNUSED, PLEASE REMOVE] 鋼轉子", "item.modern_industrialization.steel_tiny_dust": "小鋼粉", "item.modern_industrialization.steel_upgrade": "[UNTRANSLATED] Steel Upgrade", @@ -1196,6 +1199,7 @@ "item.modern_industrialization.titanium_plate": "鈦板", "item.modern_industrialization.titanium_ring": "鈦環", "item.modern_industrialization.titanium_rod": "鈦杆", + "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "鈦轉子", "item.modern_industrialization.titanium_tiny_dust": "小鈦粉", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", diff --git a/src/generated/resources/assets/modern_industrialization/models/item/aluminum_rotary_blade.json b/src/generated/resources/assets/modern_industrialization/models/item/aluminum_rotary_blade.json new file mode 100644 index 000000000..1227e7993 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/aluminum_rotary_blade.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/aluminum_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_rotary_blade.json b/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_rotary_blade.json new file mode 100644 index 000000000..10cd235e2 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_rotary_blade.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/stainless_steel_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/steel_rotary_blade.json b/src/generated/resources/assets/modern_industrialization/models/item/steel_rotary_blade.json new file mode 100644 index 000000000..680aade0f --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/steel_rotary_blade.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/steel_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/titanium_rotary_blade.json b/src/generated/resources/assets/modern_industrialization/models/item/titanium_rotary_blade.json new file mode 100644 index 000000000..3a9b08e55 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/titanium_rotary_blade.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/titanium_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/textures/item/aluminum_rotary_blade.png b/src/generated/resources/assets/modern_industrialization/textures/item/aluminum_rotary_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..b0f7598b93fcb91a0113527d7db462db2d8a419f GIT binary patch literal 861 zcmV-j1ETziP)< zKm!rqKmK3A$qyFSxqj}yyrd+D|G&QsveGhO zn?VNOTYHe<|KGn1j9Q`$kDUC#df_hkb>juYZ%GM;v@aikngto&o)c%_WoBf!c;O$z zkN=DedhUN2auQq_{s3L$#m>)=_~^?2^Kv?jEHFR+`~8Q(ikY2Z{=csb?3bk&lBGEq ze*XQ>@ax}yhKJw(GQ9o&lVRPv&tL=GCHaA2@|Qv9{)PXHpsH%M5=`KVo=QR|56|(_f%J_y7F{^yfc@ zGn;-foZI{dtoiV}UkumULm8e-N@Upn_9p`m&^xRgTnx`{t1&R@i!%sUxBLeMHq))A zkARvX(F79EM2|KE`qz#yrt$e`)+jX}ckGlph{Z|}gG?ZtT+{+@Wq@L1D^ z5tO)?KxrEkb(?>EVDRSWV3;8x1y1)2uWm6gyuHJ~@Z~iFNVAac2S|Qk_|E`JGoS!_ zspG&1_k!HMP5=L#eZ=tZ&mRUxU0^h6Yl3b33rrVpPMu}=bNoKTy8cpzzd!?m=FVgI znqH2PFW~tKl){evdH+A>)6M_spRWJs%Pj}Txzx2o|HZEy_>Y_cF-!qz28A-nW)S`M n< zKm!rqKmK3A$qyFSxqj}yyrd+D|G&QsveGhO zn?VNOTYHe<|KGn1j9Q`$kDUC#df_hkb>juYZ%GM;v@aikngtnBc1>eoVPR(Y^XD(a z-@pGDHpSL5;kt@L!;Yzd&_5_b>cs4E_54{}fJcu+4vf0rd}PL&T!T&HpeC7KSC?elR%A ztptauii!lovuE!aRxiKKz`@1C;OZ{UAS%ko@c8i?hPQ9OFf6hOX83dJA;a6&8b+pD zPagpT2@*{p-TeGqaLs!U9%Oj>K7D7ncmE#P_TRt%0-gSkfgNbGfvzUQh0E6&zI=So02BZE^#{7<4YM>S((8B28zC4zy81j^LT9+11R+0o;c0GYibBKfXVsI!~YJi z?*HGB7{DN@tjMr7s*+(zNC^YF=8qr0f;HQV^D_KB@sQ!MrVS$~aWR3?HYn;g|N6k- z&CkIwLqZCi?(g4!#qj9S8;1Aqzc7F_9|}u?-D_8603I&oX?7%?7IjX$CnP a*#H2}N34v|QSgEQ0000< zKm!rqKmK3A$qyFSxqj}yyrd+D|G&QsveGhO zn?VNOTYHe<|KGn1j9Q`$kDUC#df_hkb>juYZ%GM;v@aikngtnr7oK2XW?^Oc`{y*n zKcJ=)Wj+i!39bx(fUfak=VwTKbmjkfIUPn8n4kas{=;C!%+4_X-&cl^m6sXR^z9h_ z{Qk}G_wOHu4Ka7KgVac~24B9QL z!C|VYWy$d1!DWWS2Np1JaPctc>UuFqNGdWsdT@>5^T!Vin*!At{+xQq@V2#vk>%FY zM+|?J6d7Ql&&MwU*Sz=OK?Va|O@<#o*E1OCc{2P1y72R-4-7&&S`1E3W(>=;h5s}C z|ND<&+NbXf_wL^V+y49a51`ZkGOz<}25G)<`8vawkM9}&{P_bm;O9@EJkXn5plcbxiRv#yIF}eO zdjB!N(}BXArT>{UL>YqDT?0qo^Cu60HvR?1#2=uZe_-1$^dy2q|Luv>47{d>U;~(( z-#q;9@aq2m9f<)9lFEtgRr(H*v7xW0DE)lEW@AU_ZimpmooeX8W1#h9>dr4a*TWd&sU%n zcI?ml|2dy-{!jmO{XbuB`G1h4)U`wZ#jhOrkDLK9OaW>B3(Q0yn?dy3lV=$|#Abul ffi#1hjcfn_jft$1`p!}p00000NkvXXu0mjf0eq{3 literal 0 HcmV?d00001 diff --git a/src/generated/resources/assets/modern_industrialization/textures/item/steel_rotary_blade.png b/src/generated/resources/assets/modern_industrialization/textures/item/steel_rotary_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..67e706dff4ab966b3d1926395f9526417733416c GIT binary patch literal 809 zcmV+^1J?YBP)< zKm!rqKmK3A$qyFSxqj}yyrd+D|G&QsveGhO zn?VNOTYHe<|KGn1j9Q`$kDUC#df_hkb>juYZ%GM;v@aikngtn{Ba#>x85tR#1D*dL zhz0j{G?xOe{^I7a^g zy#aDMI~NaF^M%XT8NPgc57rD)0FwI)^d=}U`Hl1$n67G@FuvG%oZ;W!KVU^5zk(Fq zxN)69SX7$9+}N1m)!TPq!+-qv0agR@b~u+9*xT@QpfG3Yez?O%1^YFgd?@_}}5x{r@`>0~jQg6&ZMTtzlr_u@WT)V6g$xY%k8s z@b|<+hR2#VjG%C10;O$G)NTItfx(-fgJFh*6gWUZf%O-d>R@5=v8^1E9~k~KfYJ=e zRWEfM7{Mv=khn7AgMFL+|2g}JVG=Nu8FhitbYKJ6xu5`hbLuR^pX2u#=7fbX`~@1Y z#zc~VVKxJ907_xU{=EO6^XcaQ^iS9S^W~O<<6P?6q5tAn4*W;fiIKZNnn8XA*$fV_ nlV=$|#Abulfi#1hjcfn_*qfB8VlPnq00000NkvXXu0mjfn>>k0 literal 0 HcmV?d00001 diff --git a/src/generated/resources/assets/modern_industrialization/textures/item/titanium_rotary_blade.png b/src/generated/resources/assets/modern_industrialization/textures/item/titanium_rotary_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..cff7aa080d8680f646f11247b01db60d4b44b25e GIT binary patch literal 854 zcmV-c1F8IpP)< zKm!rqKmK3A$qyFSxqj}yyrd+D|G&QsveGhO zn?VNOTYHe<|KGn1j9Q`$kDUC#df_hkb>juYZ%GM;v@aikngto=)^Rd0vNAIK|NQ}| z=|4mHOiqTJ1XqSXK-YM&^D`tqy7K?LoDL%s$k`w#|NH%i!HSuk;SbQ(1syyLg4(5GXn_!1#0*URHt+Q!hgolukZg);p7I}{0A6N|A02MReWLK z5Mcw`{O|971_mJd_3018+dJWec7SGW8Jxt!_N(?>wfkZ1x4 zunDj*fHYS;%3#=g@F2s}C-)d?-W4!>dGH+=sQ(#0eEh&5q@%?UQ4z`@xNQ1=rvHEc zF--gPo#Ed7dkm1U_zzad&c(xEpsUGn;qrBcFCX7C{QdKf;UCc7AAY|FyA~9f{6_i= zOjor{7+>r>&hYQ=ABKN_{xkf1_Z#eY@B3j4!lKd)=ElYhejj5Q{sY72!P5r}e?bsv zP&k(u*dTa1P?)pyKa++i!;)@EaP&QY_?!V0K7alI4F(48pZ|XtS~tjo#onGc&A@AF z2sVJp`OU-s4zKS2-;o%=AgQd#P&AE|A$I~3hUQnlUVz2y#d#V2o_NUcSks0Pl(?8c zX&V%En}2;^@aE@Wm?0qrPWRV7Tw%EW`3l4HpHCS;n%f(gAo&3pr=TPKmF77|9rXS;5e7McIdzOl>`5gGa!a3AkCn_1KA9s-<~|n@F6xE gtPZ3Z07*qoM6N<$f(eSQmjD0& literal 0 HcmV?d00001 diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/rotary_blade.json new file mode 100644 index 000000000..d2055ebd9 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/rotary_blade.json @@ -0,0 +1,21 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "tag": "c:aluminum_gears" + }, + { + "amount": 4, + "item": "modern_industrialization:diamond_dust" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:aluminum_rotary_blade" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/rotary_blade.json new file mode 100644 index 000000000..26a79b19d --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/rotary_blade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "tag": "c:aluminum_gears" + }, + "d": { + "item": "modern_industrialization:diamond_dust" + } + }, + "pattern": [ + " d ", + "d#d", + " d " + ], + "result": { + "count": 1, + "item": "modern_industrialization:aluminum_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/assembler_generated/electric_age/component/craft/invar_rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/assembler/rotary_blade.json similarity index 82% rename from src/generated/resources/data/modern_industrialization/recipes/assembler_generated/electric_age/component/craft/invar_rotary_blade.json rename to src/generated/resources/data/modern_industrialization/recipes/materials/invar/assembler/rotary_blade.json index 4684098d5..0aca4173f 100644 --- a/src/generated/resources/data/modern_industrialization/recipes/assembler_generated/electric_age/component/craft/invar_rotary_blade.json +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/assembler/rotary_blade.json @@ -1,15 +1,15 @@ { "type": "modern_industrialization:assembler", "duration": 200, - "eu": 8, + "eu": 2, "item_inputs": [ - { - "amount": 4, - "tag": "c:diamond_dusts" - }, { "amount": 1, "tag": "c:invar_gears" + }, + { + "amount": 4, + "item": "modern_industrialization:diamond_dust" } ], "item_outputs": [ diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/invar/craft/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/craft/rotary_blade.json new file mode 100644 index 000000000..07701e460 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/craft/rotary_blade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "tag": "c:invar_gears" + }, + "d": { + "item": "modern_industrialization:diamond_dust" + } + }, + "pattern": [ + " d ", + "d#d", + " d " + ], + "result": { + "count": 1, + "item": "modern_industrialization:invar_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/rotary_blade.json new file mode 100644 index 000000000..019662976 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/rotary_blade.json @@ -0,0 +1,21 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "tag": "c:stainless_steel_gears" + }, + { + "amount": 4, + "item": "modern_industrialization:diamond_dust" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:stainless_steel_rotary_blade" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/rotary_blade.json new file mode 100644 index 000000000..12a67936a --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/rotary_blade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "tag": "c:stainless_steel_gears" + }, + "d": { + "item": "modern_industrialization:diamond_dust" + } + }, + "pattern": [ + " d ", + "d#d", + " d " + ], + "result": { + "count": 1, + "item": "modern_industrialization:stainless_steel_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/rotary_blade.json new file mode 100644 index 000000000..b662ef6b3 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/rotary_blade.json @@ -0,0 +1,21 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "tag": "c:steel_gears" + }, + { + "amount": 4, + "item": "modern_industrialization:diamond_dust" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:steel_rotary_blade" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/rotary_blade.json new file mode 100644 index 000000000..11028c8dd --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/rotary_blade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "tag": "c:steel_gears" + }, + "d": { + "item": "modern_industrialization:diamond_dust" + } + }, + "pattern": [ + " d ", + "d#d", + " d " + ], + "result": { + "count": 1, + "item": "modern_industrialization:steel_rotary_blade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/rotary_blade.json new file mode 100644 index 000000000..685d1360f --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/rotary_blade.json @@ -0,0 +1,21 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "tag": "c:titanium_gears" + }, + { + "amount": 4, + "item": "modern_industrialization:diamond_dust" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:titanium_rotary_blade" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/rotary_blade.json new file mode 100644 index 000000000..0f0a4bc2a --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/rotary_blade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "#": { + "tag": "c:titanium_gears" + }, + "d": { + "item": "modern_industrialization:diamond_dust" + } + }, + "pattern": [ + " d ", + "d#d", + " d " + ], + "result": { + "count": 1, + "item": "modern_industrialization:titanium_rotary_blade" + } +} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index 0ff5d8592..85fbee7d5 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -101,7 +101,6 @@ public final class MIItem { public static final ItemDefinition CAPACITOR = item("Capacitor", "capacitor", ITEMS_OTHER); public static final ItemDefinition INDUCTOR = item("Inductor", "inductor", ITEMS_OTHER); public static final ItemDefinition WOOD_PULP = item("Wood Pulp", "wood_pulp", ITEMS_OTHER); - public static final ItemDefinition INVAR_ROTARY_BLADE = item("Invar Rotary Blade", "invar_rotary_blade", ITEMS_OTHER); // MV circuits public static final ItemDefinition DIODE = item("Diode", "diode", ITEMS_OTHER); diff --git a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java index 5dbb40e21..ca7ec3790 100644 --- a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java +++ b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java @@ -330,6 +330,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(ROD_MAGNETIC).addParts(BLOCK.of(MaterialBlockSet.IRON)).addParts(DRILL_HEAD, DRILL) .addParts(MACHINE_CASING.of(), MACHINE_CASING_PIPE.of()).addParts(TANK.of(8)).addParts(BARREL.of(128)) .addMaterialItemParts(MaterialItemPart.external(HAMMER, MIItem.STEEL_HAMMER.getId().toString())) + .addParts(ROTARY_BLADE) .addRecipes(ForgeHammerRecipes::apply, SmeltingRecipes::apply, StandardRecipes::apply)); LIGNITE_COAL = MaterialRegistry.addMaterial(new MaterialBuilder("Lignite Coal", "lignite_coal") @@ -351,6 +352,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(WIRE).addParts(BLOCK.of(MaterialBlockSet.GOLD)).addParts(MACHINE_CASING.of("Advanced Machine Casing", "advanced_machine_casing")) .addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING_SPECIAL.of("Frostproof Machine Casing", "frostproof_machine_casing")).addParts(TANK.of(16)) .addParts(BARREL.of(512)).addParts(CABLE.of(CableTier.HV)).addRecipes(StandardRecipes::apply) + .addParts(ROTARY_BLADE) .addRecipes(SmeltingRecipes::applyBlastFurnace)); BAUXITE = MaterialRegistry.addMaterial(new MaterialBuilder("Bauxite", "bauxite") @@ -391,7 +393,9 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, INeutronBehaviour.of(NuclearConstant.ScatteringType.MEDIUM, NuclearConstant.INVAR, 2), NuclearConstant.DESINTEGRATION_BY_ROD * 2))) - .addParts(BLOCK.of(MaterialBlockSet.IRON)).addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); + .addParts(BLOCK.of(MaterialBlockSet.IRON)) + .addParts(ROTARY_BLADE) + .addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); CUPRONICKEL = MaterialRegistry.addMaterial(new MaterialBuilder("Cupronickel", "cupronickel") .set(MaterialProperty.SET, METALLIC) @@ -452,7 +456,9 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, "Highly Advanced Machine Casing", "highly_advanced_machine_casing")).addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING_PIPE.of()) .addParts(MACHINE_CASING_SPECIAL.of("Solid Titanium Machine Casing", "solid_titanium_machine_casing")).addParts(ORE.of(MaterialOreSet.IRON)) - .addParts(TANK.of(64)).addParts(BARREL.of(8192)).addRecipes(StandardRecipes::apply) + .addParts(TANK.of(64)).addParts(BARREL.of(8192)) + .addParts(ROTARY_BLADE) + .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 128, 400)).cancelRecipes("macerator/raw_metal")); ELECTRUM = MaterialRegistry.addMaterial( @@ -484,7 +490,9 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(MACHINE_CASING_PIPE.of()).addParts(MACHINE_CASING_SPECIAL.of( "Clean Stainless Steel Machine Casing", "clean_stainless_steel_machine_casing")) - .addParts(ROD_MAGNETIC).addParts(TANK.of(32)).addParts(BARREL.of(4096)).addRecipes(StandardRecipes::apply) + .addParts(ROD_MAGNETIC).addParts(TANK.of(32)).addParts(BARREL.of(4096)) + .addParts(ROTARY_BLADE) + .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 32, 400)).cancelRecipes("polarizer/rod_magnetic")); RUBY = MaterialRegistry 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 3eaf2fa89..616c7ca70 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java @@ -47,16 +47,18 @@ public class MIParts { .withTexture(new TextureGenParams.DoubleIngot()); public static final PartTemplate DRILL_HEAD = new PartTemplate("Drill Head", "drill_head"); + public static final PartTemplate ROTARY_BLADE = new PartTemplate("Rotary Blade", "rotary_blade"); public static final PartTemplate DRILL = new PartTemplate("Drill", "drill"); public static final PartTemplate DUST = new PartTemplate("Dust", "dust"); public static final PartTemplate FINE_WIRE = new PartTemplate("Fine Wire", "fine_wire"); public static final PartTemplate GEAR = new PartTemplate("Gear", "gear"); - public static final PartTemplate GEM = new PartTemplate("%s", "gem").withRegister((partContext, part, itemPath, itemId, itemTag, englishName) -> { - var item = PartTemplate.createSimpleItem(englishName, itemPath, partContext, part); - TagsToGenerate.generateTag("c:" + itemPath, item.asItem(), englishName + "s"); - }) + public static final PartTemplate GEM = new PartTemplate("%s", "gem") + .withRegister((partContext, part, itemPath, itemId, itemTag, englishName) -> { + var item = PartTemplate.createSimpleItem(englishName, itemPath, partContext, part); + TagsToGenerate.generateTag("c:" + itemPath, item.asItem(), englishName + "s"); + }) .withTexture(new TextureGenParams.Gem()) .withCustomPath("%s", "%s"); @@ -67,8 +69,10 @@ public class MIParts { public static final PartTemplate INGOT = new PartTemplate("Ingot", "ingot"); public static final PartTemplate LARGE_PLATE = new PartTemplate("Large Plate", "large_plate"); public static final CasingPart MACHINE_CASING = new CasingPart("Machine Casing", "machine_casing"); - public static final CasingPart MACHINE_CASING_PIPE = new CasingPart("Pipe Machine Casing", "machine_casing_pipe"); - public static final CasingPart MACHINE_CASING_SPECIAL = new CasingPart("Special Casing", "machine_casing_special"); + public static final CasingPart MACHINE_CASING_PIPE = new CasingPart("Pipe Machine Casing", + "machine_casing_pipe"); + public static final CasingPart MACHINE_CASING_SPECIAL = new CasingPart("Special Casing", + "machine_casing_special"); public static final PartTemplate NUGGET = new PartTemplate("Nugget", "nugget"); public static final OrePart ORE = new OrePart(false); public static final OrePart ORE_DEEPSLATE = new OrePart(true); @@ -77,25 +81,30 @@ public class MIParts { public static final RawMetalPart RAW_METAL_BLOCK = new RawMetalPart(true); public static final PartTemplate RING = new PartTemplate("Ring", "ring"); public static final PartTemplate ROD = new PartTemplate("Rod", "rod"); - public static final PartTemplate ROD_MAGNETIC = new PartTemplate("Magnetic %s Rod", "rod_magnetic").withOverlay(ROD, "magnetic"); + public static final PartTemplate ROD_MAGNETIC = new PartTemplate("Magnetic %s Rod", "rod_magnetic") + .withOverlay(ROD, "magnetic"); public static final PartTemplate ROTOR = new PartTemplate("Rotor", "rotor"); public static final TankPart TANK = new TankPart(); public static final PartTemplate TINY_DUST = new PartTemplate("Tiny Dust", "tiny_dust"); public static final PartTemplate WIRE = new PartTemplate("Wire", "wire"); - public static final PartTemplate WIRE_MAGNETIC = new PartTemplate("Magnetic %s Wire", "wire_magnetic").withOverlay(WIRE, "magnetic"); + public static final PartTemplate WIRE_MAGNETIC = new PartTemplate("Magnetic %s Wire", "wire_magnetic") + .withOverlay(WIRE, "magnetic"); public static final NuclearFuelPart FUEL_ROD = new NuclearFuelPart(SIMPLE); public static final NuclearFuelPart FUEL_ROD_DEPLETED = new NuclearFuelPart(DEPLETED); public static final NuclearFuelPart FUEL_ROD_DOUBLE = new NuclearFuelPart(DOUBLE); public static final NuclearFuelPart FUEL_ROD_QUAD = new NuclearFuelPart(QUAD); - public static final PartTemplate N_DOPED_PLATE = new PartTemplate("N-Doped %s Plate", "n_doped_plate").withOverlay(PLATE, "n_doped"); - public static final PartTemplate P_DOPED_PLATE = new PartTemplate("P-Doped %s Plate", "p_doped_plate").withOverlay(PLATE, "p_doped"); + public static final PartTemplate N_DOPED_PLATE = new PartTemplate("N-Doped %s Plate", "n_doped_plate") + .withOverlay(PLATE, "n_doped"); + public static final PartTemplate P_DOPED_PLATE = new PartTemplate("P-Doped %s Plate", "p_doped_plate") + .withOverlay(PLATE, "p_doped"); public static final PartTemplate[] ITEM_PURE_NON_METAL = new PartTemplate[] { TINY_DUST, DUST, CRUSHED_DUST }; public static final PartTemplate[] ITEM_PURE_METAL = new PartTemplate[] { INGOT, NUGGET, TINY_DUST, DUST }; - public static final List TAGGED_PARTS_LIST = PartKeyProvider.of(BLOCK, DUST, GEAR, INGOT, NUGGET, ORE, PLATE, TINY_DUST, RAW_METAL, + public static final List TAGGED_PARTS_LIST = PartKeyProvider.of(BLOCK, DUST, GEAR, INGOT, NUGGET, ORE, + PLATE, TINY_DUST, RAW_METAL, RAW_METAL_BLOCK); public static final Set TAGGED_PARTS = new HashSet<>(TAGGED_PARTS_LIST); @@ -111,7 +120,8 @@ public class MIParts { public record CategoryTag(String tag, String englishName) { } - public static final List BLOCKS = PartKeyProvider.of(ORE, BARREL, BLOCK, COIL, MACHINE_CASING, MACHINE_CASING_SPECIAL, + 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/recipe/StandardRecipes.java b/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java index e5b38d7af..3e056a13d 100644 --- a/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java +++ b/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java @@ -30,6 +30,7 @@ import aztech.modern_industrialization.MIFluids; import aztech.modern_industrialization.MIItem; import aztech.modern_industrialization.machines.init.MIMachineRecipeTypes; +import aztech.modern_industrialization.materials.MIMaterials; import aztech.modern_industrialization.materials.MaterialBuilder; import aztech.modern_industrialization.materials.part.PartKeyProvider; import aztech.modern_industrialization.materials.recipe.builder.MIRecipeBuilder; @@ -48,41 +49,54 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { // CRAFTING add3By3Crafting(ctx, TINY_DUST, DUST, true); add3By3Crafting(ctx, NUGGET, INGOT, true); - add3By3Crafting(ctx, ctx.get(MAIN_PART), BLOCK, false); // Not in packer due to conflicts with double ingots. + add3By3Crafting(ctx, ctx.get(MAIN_PART), BLOCK, false); // Not in packer due to conflicts with double + // ingots. add3By3Crafting(ctx, RAW_METAL, RAW_METAL_BLOCK, true); - new ShapedRecipeBuilder(ctx, BLADE, 4, "blade", "P", "P", "I").addTaggedPart('P', CURVED_PLATE).addTaggedPart('I', ROD) + new ShapedRecipeBuilder(ctx, BLADE, 4, "blade", "P", "P", "I").addTaggedPart('P', CURVED_PLATE) + .addTaggedPart('I', ROD) .exportToMachine(MIMachineRecipeTypes.PACKER); - new ShapedRecipeBuilder(ctx, ORE, 1, "deepslate_to_ore", " ", " x ", " ").addPart('x', ORE_DEEPSLATE); + new ShapedRecipeBuilder(ctx, ORE, 1, "deepslate_to_ore", " ", " x ", " ").addPart('x', + ORE_DEEPSLATE); - new ShapedRecipeBuilder(ctx, COIL, 1, "coil", "xxx", "x x", "xxx").addTaggedPart('x', CABLE).exportToAssembler(); + new ShapedRecipeBuilder(ctx, COIL, 1, "coil", "xxx", "x x", "xxx").addTaggedPart('x', CABLE) + .exportToAssembler(); new ShapedRecipeBuilder(ctx, LARGE_PLATE, 1, "large_plate", "xx", "xx").addTaggedPart('x', PLATE) .exportToMachine(MIMachineRecipeTypes.PACKER); - new ShapedRecipeBuilder(ctx, ROTOR, 1, "rotor", "bBb", "BRB", "bBb").addTaggedPart('b', BOLT).addTaggedPart('B', BLADE).addTaggedPart('R', - RING); + new ShapedRecipeBuilder(ctx, ROTOR, 1, "rotor", "bBb", "BRB", "bBb").addTaggedPart('b', BOLT) + .addTaggedPart('B', BLADE).addTaggedPart('R', + RING); - new ShapedRecipeBuilder(ctx, GEAR, 1, "gear", "PbP", "bRb", "PbP").addTaggedPart('b', BOLT).addTaggedPart('P', PLATE).addTaggedPart('R', - RING); + new ShapedRecipeBuilder(ctx, GEAR, 1, "gear", "PbP", "bRb", "PbP").addTaggedPart('b', BOLT) + .addTaggedPart('P', PLATE).addTaggedPart('R', + RING); - new ShapedRecipeBuilder(ctx, HAMMER, 1, "hammer", "ppp", "psp", " s ").addTaggedPart('p', LARGE_PLATE).addInput('s', Items.STICK); + new ShapedRecipeBuilder(ctx, HAMMER, 1, "hammer", "ppp", "psp", " s ").addTaggedPart('p', LARGE_PLATE) + .addInput('s', Items.STICK); - new ShapedRecipeBuilder(ctx, RING, 2, "ring", "bRb", "R R", "bRb").addTaggedPart('b', BOLT).addTaggedPart('R', ROD); + new ShapedRecipeBuilder(ctx, RING, 2, "ring", "bRb", "R R", "bRb").addTaggedPart('b', BOLT) + .addTaggedPart('R', ROD); new ShapedRecipeBuilder(ctx, CABLE, 3, "cable", "rrr", "www", "rrr").addInput('r', MIItem.RUBBER_SHEET) .addTaggedPart('w', WIRE).exportToMachine(MIMachineRecipeTypes.PACKER); - new ShapedRecipeBuilder(ctx, TANK, 1, "tank", "###", "#G#", "###").addTaggedPart('#', PLATE).addInput('G', ConventionalItemTags.GLASS_BLOCKS) + new ShapedRecipeBuilder(ctx, TANK, 1, "tank", "###", "#G#", "###").addTaggedPart('#', PLATE) + .addInput('G', ConventionalItemTags.GLASS_BLOCKS) .exportToAssembler(); new ShapedRecipeBuilder(ctx, BARREL, 1, "barrel", "###", "#b#", "###") .addTaggedPart('#', PLATE) .addInput('b', "#c:wooden_barrels") .exportToAssembler(); - new ShapedRecipeBuilder(ctx, DRILL_HEAD, 1, "drill_head", "bcp", "GRc", "bGb").addTaggedPart('G', GEAR).addPart('b', BOLT) + new ShapedRecipeBuilder(ctx, DRILL_HEAD, 1, "drill_head", "bcp", "GRc", "bGb").addTaggedPart('G', GEAR) + .addPart('b', BOLT) .addPart('c', CURVED_PLATE).addPart('R', ROD).addTaggedPart('p', PLATE); + new ShapedRecipeBuilder(ctx, ROTARY_BLADE, 1, "rotary_blade", " d ", "d#d", " d ") + .addTaggedPart('#', GEAR).addInput('d', MIMaterials.DIAMOND.getPart(DUST)); + // MACERATOR addMaceratorRecycling(ctx, DOUBLE_INGOT, 18); addMaceratorRecycling(ctx, PLATE, 9); @@ -99,22 +113,31 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { } addMaceratorRecycling(ctx, BLADE, 5); addMaceratorRecycling(ctx, DRILL_HEAD, 7 * 9 + 4); + addMaceratorRecycling(ctx, ROTARY_BLADE, 18); addMaceratorRecycling(ctx, WIRE, 4); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "ore_to_crushed").addTaggedPartInput(ORE, 1).addPartOutput(CRUSHED_DUST, 3); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "ore_to_raw").addTaggedPartInput(ORE, 1).addPartOutput(RAW_METAL, 3); - - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "crushed_dust", 2, (int) (100 * ctx.get(HARDNESS).timeFactor)) - .addTaggedPartInput(CRUSHED_DUST, 1) - .addPartOutput(DUST, 1).addPartOutput(DUST, 1, 0.5); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "raw_metal", 2, (int) (100 * ctx.get(HARDNESS).timeFactor)) - .addTaggedPartInput(RAW_METAL, 1) - .addPartOutput(DUST, 1).addPartOutput(DUST, 1, 0.5); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "ore_to_crushed").addTaggedPartInput(ORE, 1) + .addPartOutput(CRUSHED_DUST, 3); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "ore_to_raw").addTaggedPartInput(ORE, 1) + .addPartOutput(RAW_METAL, 3); + + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "crushed_dust", 2, + (int) (100 * ctx.get(HARDNESS).timeFactor)) + .addTaggedPartInput(CRUSHED_DUST, 1) + .addPartOutput(DUST, 1).addPartOutput(DUST, 1, 0.5); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "raw_metal", 2, + (int) (100 * ctx.get(HARDNESS).timeFactor)) + .addTaggedPartInput(RAW_METAL, 1) + .addPartOutput(DUST, 1).addPartOutput(DUST, 1, 0.5); // COMPRESSOR - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "main").addTaggedPartInput(ctx.get(MAIN_PART), 1).addPartOutput(PLATE, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "plate").addTaggedPartInput(PLATE, 1).addPartOutput(CURVED_PLATE, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "double_ingot").addTaggedPartInput(DOUBLE_INGOT, 1).addPartOutput(PLATE, 2); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "ring").addTaggedPartInput(ROD, 1).addPartOutput(RING, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "main") + .addTaggedPartInput(ctx.get(MAIN_PART), 1).addPartOutput(PLATE, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "plate").addTaggedPartInput(PLATE, 1) + .addPartOutput(CURVED_PLATE, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "double_ingot") + .addTaggedPartInput(DOUBLE_INGOT, 1).addPartOutput(PLATE, 2); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.COMPRESSOR, "ring").addTaggedPartInput(ROD, 1) + .addPartOutput(RING, 1); // CUTTING MACHINE addCuttingMachine(ctx, "main", ctx.get(MAIN_PART), ROD, 2); addCuttingMachine(ctx, "double_ingot", DOUBLE_INGOT, ROD, 4); @@ -123,27 +146,37 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "block").addTaggedPartInput(ctx.get(MAIN_PART), 9) .addItemInput(MIItem.PACKER_BLOCK_TEMPLATE, 1, 0.0).addPartOutput(BLOCK, 1); new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "double_ingot").addTaggedPartInput(INGOT, 2) - .addItemInput(MIItem.PACKER_DOUBLE_INGOT_TEMPLATE, 1, 0.0).addPartOutput(DOUBLE_INGOT, 1); + .addItemInput(MIItem.PACKER_DOUBLE_INGOT_TEMPLATE, 1, 0.0) + .addPartOutput(DOUBLE_INGOT, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "fuel_rod_double").addPartInput(FUEL_ROD, 2).addItemInput("#c:nuclear_alloy_plates", 1) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "fuel_rod_double").addPartInput(FUEL_ROD, 2) + .addItemInput("#c:nuclear_alloy_plates", 1) .addPartOutput(FUEL_ROD_DOUBLE, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "fuel_rod_quad").addItemInput("#c:nuclear_alloy_plates", 2) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, "fuel_rod_quad") + .addItemInput("#c:nuclear_alloy_plates", 2) .addPartInput(FUEL_ROD_DOUBLE, 2) .addPartOutput(FUEL_ROD_QUAD, 1); // UNPACKER - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.UNPACKER, "coil").addTaggedPartInput(COIL, 1).addPartOutput(CABLE, 8); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.UNPACKER, "coil").addTaggedPartInput(COIL, 1) + .addPartOutput(CABLE, 8); // WIREMILL - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.WIREMILL, "wire").addTaggedPartInput(PLATE, 1).addPartOutput(WIRE, 2); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.WIREMILL, "fine_wire").addTaggedPartInput(WIRE, 1).addPartOutput(FINE_WIRE, 4); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.WIREMILL, "wire").addTaggedPartInput(PLATE, 1) + .addPartOutput(WIRE, 2); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.WIREMILL, "fine_wire").addTaggedPartInput(WIRE, 1) + .addPartOutput(FINE_WIRE, 4); // EXTRA ASSEMBLER - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "rotor").addTaggedPartInput(BLADE, 4).addTaggedPartInput(RING, 1) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "rotor").addTaggedPartInput(BLADE, 4) + .addTaggedPartInput(RING, 1) .addFluidInput(MIFluids.SOLDERING_ALLOY, 100).addPartOutput(ROTOR, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "gear").addTaggedPartInput(PLATE, 4).addTaggedPartInput(RING, 1) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "gear").addTaggedPartInput(PLATE, 4) + .addTaggedPartInput(RING, 1) .addFluidInput(MIFluids.SOLDERING_ALLOY, 100).addPartOutput(GEAR, 2); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "drill_head").addTaggedPartInput(PLATE, 1).addTaggedPartInput(CURVED_PLATE, 2) - .addTaggedPartInput(ROD, 1).addTaggedPartInput(GEAR, 2).addFluidInput(MIFluids.SOLDERING_ALLOY, 75) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "drill_head").addTaggedPartInput(PLATE, 1) + .addTaggedPartInput(CURVED_PLATE, 2) + .addTaggedPartInput(ROD, 1).addTaggedPartInput(GEAR, 2) + .addFluidInput(MIFluids.SOLDERING_ALLOY, 75) .addPartOutput(DRILL_HEAD, 1); new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "cable_synthetic_rubber") @@ -158,28 +191,40 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "fuel_rod", 16, 200) .addItemInput("modern_industrialization:blastproof_alloy_curved_plate", 2) - .addItemInput(MIItem.LARGE_MOTOR, 1).addItemInput(MIItem.ROBOT_ARM, 2).addTaggedPartInput(ROD, 18) + .addItemInput(MIItem.LARGE_MOTOR, 1).addItemInput(MIItem.ROBOT_ARM, 2) + .addTaggedPartInput(ROD, 18) .addFluidInput(MIFluids.SOLDERING_ALLOY, 500).addFluidInput(MIFluids.HELIUM, 100) .addPartOutput(FUEL_ROD, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "rotary_blade") + .addTaggedPartInput(GEAR, 1) + .addItemInput(MIMaterials.DIAMOND.getPart(DUST), 4) + .addPartOutput(ROTARY_BLADE, 1); + // HEAT EXCHANGER - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.HEAT_EXCHANGER, "hot_ingot", 8, 10).addPartInput(HOT_INGOT, 1) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.HEAT_EXCHANGER, "hot_ingot", 8, 10) + .addPartInput(HOT_INGOT, 1) .addFluidInput(MIFluids.CRYOFLUID, 100) - .addPartOutput(INGOT, 1).addFluidOutput(MIFluids.ARGON, 65).addFluidOutput(MIFluids.HELIUM, 25); + .addPartOutput(INGOT, 1).addFluidOutput(MIFluids.ARGON, 65) + .addFluidOutput(MIFluids.HELIUM, 25); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.POLARIZER, "rod_magnetic", 8, 200).addTaggedPartInput(ROD, 1).addPartOutput(ROD_MAGNETIC, 1); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.POLARIZER, "wire_magnetic", 8, 200).addTaggedPartInput(WIRE, 1).addPartOutput(WIRE_MAGNETIC, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.POLARIZER, "rod_magnetic", 8, 200) + .addTaggedPartInput(ROD, 1).addPartOutput(ROD_MAGNETIC, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.POLARIZER, "wire_magnetic", 8, 200) + .addTaggedPartInput(WIRE, 1).addPartOutput(WIRE_MAGNETIC, 1); new SmeltingRecipeBuilder(ctx, ROD_MAGNETIC, ROD, 0.0, false); new SmeltingRecipeBuilder(ctx, WIRE_MAGNETIC, WIRE, 0.0, false); - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.VACUUM_FREEZER, "hot_ingot", 32, 250).addTaggedPartInput(HOT_INGOT, 1).addPartOutput(INGOT, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.VACUUM_FREEZER, "hot_ingot", 32, 250) + .addTaggedPartInput(HOT_INGOT, 1).addPartOutput(INGOT, 1); } /** * Add a recycling recipe in the macerator. */ - private static void addMaceratorRecycling(MaterialBuilder.RecipeContext ctx, PartKeyProvider partInput, int tinyDustOutput) { + private static void addMaceratorRecycling(MaterialBuilder.RecipeContext ctx, PartKeyProvider partInput, + int tinyDustOutput) { MIRecipeBuilder builder = new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, partInput); builder.addTaggedPartInput(partInput, 1); if (tinyDustOutput % 9 == 0) { @@ -196,26 +241,32 @@ private static void addMaceratorRecycling(MaterialBuilder.RecipeContext ctx, Par /** * Add 3x3 -> 1 and 1 -> 9 crafting recipes. */ - private static void add3By3Crafting(MaterialBuilder.RecipeContext ctx, PartKeyProvider smallPart, PartKeyProvider bigPart, boolean packer) { + private static void add3By3Crafting(MaterialBuilder.RecipeContext ctx, PartKeyProvider smallPart, + PartKeyProvider bigPart, boolean packer) { if (ctx.hasInternalPart(smallPart) || ctx.hasInternalPart(bigPart)) { // Don't add recipe if it's all external (vanilla already has it) - new ShapedRecipeBuilder(ctx, bigPart, 1, bigPart.key() + "_from_" + smallPart.key(), "yxx", "xxx", "xxx") - .addPart('y', smallPart) - .addTaggedPart('x', smallPart); + new ShapedRecipeBuilder(ctx, bigPart, 1, bigPart.key() + "_from_" + smallPart.key(), "yxx", + "xxx", "xxx") + .addPart('y', smallPart) + .addTaggedPart('x', smallPart); new ShapedRecipeBuilder(ctx, smallPart, 9, smallPart.key() + "_from_" + bigPart.key(), "x") .addPart('x', bigPart); } if (packer) { - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, bigPart).addTaggedPartInput(smallPart, 9).addPartOutput(bigPart, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.PACKER, bigPart).addTaggedPartInput(smallPart, 9) + .addPartOutput(bigPart, 1); } - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.UNPACKER, smallPart).addTaggedPartInput(bigPart, 1).addPartOutput(smallPart, 9); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.UNPACKER, smallPart).addTaggedPartInput(bigPart, 1) + .addPartOutput(smallPart, 9); } - private static void addCuttingMachine(MaterialBuilder.RecipeContext ctx, String name, PartKeyProvider inputPart, PartKeyProvider outputPart, + private static void addCuttingMachine(MaterialBuilder.RecipeContext ctx, String name, PartKeyProvider inputPart, + PartKeyProvider outputPart, int amount) { - new MIRecipeBuilder(ctx, MIMachineRecipeTypes.CUTTING_MACHINE, name).addTaggedPartInput(inputPart, 1).addPartOutput(outputPart, amount) + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.CUTTING_MACHINE, name).addTaggedPartInput(inputPart, 1) + .addPartOutput(outputPart, amount) .addFluidInput("modern_industrialization:lubricant", 1); } diff --git a/src/main/resources/assets/modern_industrialization/textures/item/invar_rotary_blade.png b/src/main/resources/assets/modern_industrialization/textures/item/invar_rotary_blade.png deleted file mode 100644 index ce6ac1a2d20875a659f776053ea023adc6ee1b68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3166 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 Eg5$0O82|tP diff --git a/src/main/resources/assets/modern_industrialization/textures/materialsets/common/rotary_blade.png b/src/main/resources/assets/modern_industrialization/textures/materialsets/common/rotary_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..a79061c9eb8d621cd571d56f4bbe8dbd55c112bc GIT binary patch literal 2650 zcmV-g3Z?alP)j20++-R0e#?Y;ebrrF;Q+jDZ!HaktP00009a7bBm000XU000XU0RWnu z7ytkVWO`IsbW&k=AaHVTW@&6?Aar?fWgumEX=VTbScR=uTe2f34E<*nSprDBv>cvQ z*+G_{1BkY-?@VT`T0%3}A=ku6~$`{Os*9&(KSHI4itSgjN(bY`n#%t#_?(arop3c1Usz}Be zM9Jyh)T)Y_3T{*M>mReuZ9SVW6A51G0UI&VV8?d<`eOmFFLA*=;Fnk+=Qv}`9L-*c zstgYKa=gcZZ&rOc|BlS3_n*;+^Qq`OfA})0k1+V*f(sw>{A@$-8}nlkeO-X#t}DMe zdCs2a9Orb!M|ku&#T{q6s|JDimN$s1XQMR-gQ^p zbYtI}YcSE%poBY7Bi?hF6A3k5IQezCNr{C!P$ONkIXrjlSdhXK8aAtrhh96ZIXPSA+EDvgm z>bL6;P;-hJZKRf5dQiixN$IL^i%!DA42Y3;Ks+r35YV(Rv)Or13%P}v6+%)3f{|fi zW4c?20YX0by4;S7GZ;b$IaX;Plxmq)H-^Cs9@uj>KGz-N0tS{;C^&cGAQPg|_E z3d5`24+d1c2fx1aXsVzGo-9s$a2{2V2iJWxs4h^Qcw|w@%){nUkGXa-Tvv|i+-6Bv zhnMR1Xk~wmsp*23-p<0R>A!bRJ?xiFNCjXa!V>SLgp5MC$QrwlWi&TPmkO{CQs&te zEPfqmdo#xYF8AYRn`7UbSvOMMZv;0=ZYn2LjmNTsqt1RKIx|uG!+G`d?j~aS2sS~q zAi}~iOhUm|w4g~{1nGtL z<79QoYh%}*+#SvM7iHM;Mj5uxBbGBljpcw^E9j@NyLS3z=gw-g(z=u*waWUjy;#Q4 zk8}jj_hTYBq(_~0wsJgMLxq^8wgRD}ZFxwMkv3azLtm{7`e<3rCa}QdQPkz#ENWq{ z?R5@#LZ7OiQu&gk@bAYrSo3Lnd-b)AWW(qdHcbX;Zf*V z)S%K-(ob_2t+@QC!PdFW>@w*6MtkY`Re zl7(S=KL$5JMTeWsfskxstx%0_q~#mN*7MECJ7Y(`mZoK?GnbjcK}Qklu{{{!p@8Qv z8Rf2}gww+qXnT}8LAAY0vv15CpK5i{N9%CY1luDSNljJ?&6qLQ8+>f8@QaITwBPP6 z>OQfHglttrHYKsWG-;5)NYtqBBCOk@9C_t#Yq9v%%bNnZQ3t{1e;L4S|P# zK{LOj$#8j+ChACNh(IFRR@j?D_VT}Z2z~u2nS$tw1zhsQoQdO}eIeABj&}5@b{~2IUqo zERnet3v7Q32xtjP%Gzf%N`3yU%Xq(=ukA-rFAV%$29J&WYCn3Fri}p1LI1ANCMXl9 ziWD$-cifa;5gQXkKQ3|i6;1uEVT|!DE%~OU`TbV(gx1lFCi`mE8fV@T5?%WVs5ZSt z#n+8j^ZusqQeZ!Ee+@Jr7Jf4XJ-?WL0e>#1uF5{SH~;_v1W80eR5*>*QZcH7KoEWV zQ3T0?jW_TH0gquF8%xh(>lF-aYoCim5EQnJ2*Gk^c2h<8QPby@GjAUA-VE^b5JwHA zl=D0fLxZQ59u50&IKq=*v zQZ9~TXsvNRpGBIcVjM>VK>#Tws;Y8_0ss(25wzCGvTXI7=eZb$0nCiYj20++-R0e#?Y;ebrrF;Q+jDZ!HaktP00009a7bBm000XU000XU0RWnu z7ytkVWO`IsbW&k=AaHVTW@&6?Aar?fWgumEX=VTbScR=uTe2f34E<*nSprDBv>cvQ z*+G_{1BkY-?@VT`T0%3}A=ku6~$`{Os*9&(KSHI4itSgjN(bY`n#%t#_?(arop3c1Usz}Be zM9Jyh)T)Y_3T{*M>mReuZ9SVW6A51G0UI&VV8?d<`eOmFFLA*=;Fnk+=Qv}`9L-*c zstgYKa=gcZZ&rOc|BlS3_n*;+^Qq`OfA})0k1+V*f(sw>{A@$-8}nlkeO-X#t}DMe zdCs2a9Orb!M|ku&#T{q6s|JDimN$s1XQMR-gQ^p zbYtI}YcSE%poBY7Bi?hF6A3k5IQezCNr{C!P$ONkIXrjlSdhXK8aAtrhh96ZIXPSA+EDvgm z>bL6;P;-hJZKRf5dQiixN$IL^i%!DA42Y3;Ks+r35YV(Rv)Or13%P}v6+%)3f{|fi zW4c?20YX0by4;S7GZ;b$IaX;Plxmq)H-^Cs9@uj>KGz-N0tS{;C^&cGAQPg|_E z3d5`24+d1c2fx1aXsVzGo-9s$a2{2V2iJWxs4h^Qcw|w@%){nUkGXa-Tvv|i+-6Bv zhnMR1Xk~wmsp*23-p<0R>A!bRJ?xiFNCjXa!V>SLgp5MC$QrwlWi&TPmkO{CQs&te zEPfqmdo#xYF8AYRn`7UbSvOMMZv;0=ZYn2LjmNTsqt1RKIx|uG!+G`d?j~aS2sS~q zAi}~iOhUm|w4g~{1nGtL z<79QoYh%}*+#SvM7iHM;Mj5uxBbGBljpcw^E9j@NyLS3z=gw-g(z=u*waWUjy;#Q4 zk8}jj_hTYBq(_~0wsJgMLxq^8wgRD}ZFxwMkv3azLtm{7`e<3rCa}QdQPkz#ENWq{ z?R5@#LZ7OiQu&gk@bAYrSo3Lnd-b)AWW(qdHcbX;Zf*V z)S%K-(ob_2t+@QC!PdFW>@w*6MtkY`Re zl7(S=KL$5JMTeWsfskxstx%0_q~#mN*7MECJ7Y(`mZoK?GnbjcK}Qklu{{{!p@8Qv z8Rf2}gww+qXnT}8LAAY0vv15CpK5i{N9%CY1luDSNljJ?&6qLQ8+>f8@QaITwBPP6 z>OQfHglttrHYKsWG-;5)NYtqBBCOk@9C_t#Yq9v%%bNnZQ3t{1e;L4S|P# zK{LOj$#8j+ChACNh(IFRR@j?D_VT}Z2z~u2nS$tw1zhsQoQdO}eIeABj&}5@b{~2IUqo zERnet3v7Q32xtjP%Gzf%N`3yU%Xq(=ukA-rFAV%$29J&WYCn3Fri}p1LI1ANCMXl9 ziWD$-cifa;5gQXkKQ3|i6;1uEVT|!DE%~OU`TbV(gx1lFCi`mE8fV@T5?%WVs5ZSt z#n+8j^ZusqQeZ!Ee+@Jr7Jf4XJ-?WL0e>#1uF5{SH~;_wWl2OqR5*=wQcXxyVH7>@ zWm!We{!TL%7DlK&DSs*nV@xBEiHyi{)1p<2YF*GGh-eY5T9lBxNF+=!DKoHi7Wv1- zK%BqRz~lYQTB--WFE+=G9%^@0@$@Ip z(iHt>*}k!yeb1%v&VzN#xx|umrebnB9um6KR?axFlEkK~|lqG>b zwSQ(@hzZLhZbzFCGYA4st;t=`>Xi%t@YqX~ukT)p;SJ%TVL+*{ zLks$Zm_Wi<8uP*!4x;_Sc@P9$H4fm(|AYe2f Date: Thu, 26 Oct 2023 20:17:55 -0700 Subject: [PATCH 04/18] Add upgrade module items --- .../modern_industrialization/lang/en_us.json | 11 ++++++++++ .../lang/untranslated/ko_kr.json | 11 ++++++++++ .../lang/untranslated/pt_br.json | 11 ++++++++++ .../lang/untranslated/ru_ru.json | 11 ++++++++++ .../lang/untranslated/zh_cn.json | 11 ++++++++++ .../lang/untranslated/zh_tw.json | 11 ++++++++++ .../modern_industrialization/MIItem.java | 13 ++++++++++++ .../models/item/area_module.json | 6 ++++++ .../item/bane_of_arthropods_module.json | 6 ++++++ .../models/item/efficiency_module.json | 6 ++++++ .../models/item/fire_aspect_module.json | 6 ++++++ .../models/item/fortune_module.json | 6 ++++++ .../models/item/knockback_module.json | 6 ++++++ .../models/item/looting_module.json | 6 ++++++ .../models/item/sharpness_module.json | 6 ++++++ .../models/item/silk_touch_module.json | 6 ++++++ .../models/item/smite_module.json | 6 ++++++ .../models/item/sweeping_edge_module.json | 6 ++++++ .../textures/item/upgrade_module.png | Bin 0 -> 2122 bytes .../recipes/tools/area_module.json | 19 ++++++++++++++++++ .../tools/bane_of_arthropods_module.json | 19 ++++++++++++++++++ .../recipes/tools/efficiency_module.json | 19 ++++++++++++++++++ .../recipes/tools/fire_aspect_module.json | 19 ++++++++++++++++++ .../recipes/tools/fortune_module.json | 19 ++++++++++++++++++ .../recipes/tools/knockback_module.json | 19 ++++++++++++++++++ .../recipes/tools/looting_module.json | 19 ++++++++++++++++++ .../recipes/tools/sharpness_module.json | 19 ++++++++++++++++++ .../recipes/tools/silk_touch_module.json | 19 ++++++++++++++++++ .../recipes/tools/smite_module.json | 19 ++++++++++++++++++ .../recipes/tools/sweeping_edge_module.json | 19 ++++++++++++++++++ 30 files changed, 354 insertions(+) create mode 100644 src/main/resources/assets/modern_industrialization/models/item/area_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/bane_of_arthropods_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/efficiency_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/fire_aspect_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/fortune_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/knockback_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/looting_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/sharpness_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/silk_touch_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/smite_module.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/upgrade_module.png create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/area_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/bane_of_arthropods_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/efficiency_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/fire_aspect_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/fortune_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/knockback_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/looting_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/sharpness_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/silk_touch_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/smite_module.json create mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/sweeping_edge_module.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 64616648e..388625fea 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -488,8 +488,10 @@ "item.modern_industrialization.antimony_ingot": "Antimony Ingot", "item.modern_industrialization.antimony_nugget": "Antimony Nugget", "item.modern_industrialization.antimony_tiny_dust": "Antimony Tiny Dust", + "item.modern_industrialization.area_module": "Area Module", "item.modern_industrialization.argon_bucket": "Argon Bucket", "item.modern_industrialization.arithmetic_logic_unit": "Arithmetic Logic Unit", + "item.modern_industrialization.bane_of_arthropods_module": "Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "Basic Upgrade", "item.modern_industrialization.battery_alloy_curved_plate": "Battery Alloy Curved Plate", "item.modern_industrialization.battery_alloy_double_ingot": "Battery Alloy Double Ingot", @@ -622,6 +624,7 @@ "item.modern_industrialization.digital_circuit": "Digital Circuit", "item.modern_industrialization.digital_circuit_board": "Digital Circuit Board", "item.modern_industrialization.diode": "Diode", + "item.modern_industrialization.efficiency_module": "Efficiency Module", "item.modern_industrialization.electronic_circuit": "Electronic Circuit", "item.modern_industrialization.electronic_circuit_board": "Electronic Circuit Board", "item.modern_industrialization.electrum_cable": "Electrum Cable", @@ -641,9 +644,11 @@ "item.modern_industrialization.ethanol_bucket": "Ethanol Bucket", "item.modern_industrialization.ethylbenzene_bucket": "Ethylbenzene Bucket", "item.modern_industrialization.ethylene_bucket": "Ethylene Bucket", + "item.modern_industrialization.fire_aspect_module": "Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "Fire Clay Brick", "item.modern_industrialization.fire_clay_dust": "Fire Clay Dust", "item.modern_industrialization.fluid_pipe": "Fluid Pipe", + "item.modern_industrialization.fortune_module": "Fortune Module", "item.modern_industrialization.gold_bolt": "Gold Bolt", "item.modern_industrialization.gold_curved_plate": "Gold Curved Plate", "item.modern_industrialization.gold_double_ingot": "Gold Double Ingot", @@ -734,6 +739,7 @@ "item.modern_industrialization.kanthal_plate": "Kanthal Plate", "item.modern_industrialization.kanthal_tiny_dust": "Kanthal Tiny Dust", "item.modern_industrialization.kanthal_wire": "Kanthal Wire", + "item.modern_industrialization.knockback_module": "Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "Lapis Lazuli Crushed Dust", "item.modern_industrialization.lapis_dust": "Lapis Lazuli Dust", "item.modern_industrialization.lapis_plate": "Lapis Lazuli Plate", @@ -782,6 +788,7 @@ "item.modern_industrialization.lime_item_pipe": "Lime Item Pipe", "item.modern_industrialization.lime_me_wire": "Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "Liquid Air Bucket", + "item.modern_industrialization.looting_module": "Looting Module", "item.modern_industrialization.lubricant_bucket": "Lubricant Bucket", "item.modern_industrialization.magenta_fluid_pipe": "Magenta Fluid Pipe", "item.modern_industrialization.magenta_item_pipe": "Magenta Item Pipe", @@ -899,6 +906,7 @@ "item.modern_industrialization.salt_dust": "Salt Dust", "item.modern_industrialization.salt_tiny_dust": "Salt Tiny Dust", "item.modern_industrialization.shale_oil_bucket": "Shale Oil Bucket", + "item.modern_industrialization.sharpness_module": "Sharpness Module", "item.modern_industrialization.silicon_battery": "Silicon Battery", "item.modern_industrialization.silicon_double_ingot": "Silicon Double Ingot", "item.modern_industrialization.silicon_dust": "Silicon Dust", @@ -909,6 +917,7 @@ "item.modern_industrialization.silicon_plate": "Silicon Plate", "item.modern_industrialization.silicon_tiny_dust": "Silicon Tiny Dust", "item.modern_industrialization.silicon_wafer": "Silicon Wafer", + "item.modern_industrialization.silk_touch_module": "Silk Touch Module", "item.modern_industrialization.silver_cable": "Silver Cable", "item.modern_industrialization.silver_double_ingot": "Silver Double Ingot", "item.modern_industrialization.silver_dust": "Silver Dust", @@ -919,6 +928,7 @@ "item.modern_industrialization.silver_wire": "Silver Wire", "item.modern_industrialization.singularity": "Singularity", "item.modern_industrialization.small_heat_exchanger": "Small Heat Exchanger", + "item.modern_industrialization.smite_module": "Smite Module", "item.modern_industrialization.sodium_battery": "Sodium Battery", "item.modern_industrialization.sodium_dust": "Sodium Dust", "item.modern_industrialization.sodium_hydroxide_bucket": "Sodium Hydroxide Bucket", @@ -988,6 +998,7 @@ "item.modern_industrialization.superconductor_plate": "Superconductor Plate", "item.modern_industrialization.superconductor_tiny_dust": "Superconductor Tiny Dust", "item.modern_industrialization.superconductor_wire": "Superconductor Wire", + "item.modern_industrialization.sweeping_edge_module": "Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "Tin Blade", 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 b4a69e42f..8afcf4dce 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 @@ -558,8 +558,10 @@ "item.modern_industrialization.antimony_ingot": "안티모니 주괴", "item.modern_industrialization.antimony_nugget": "안티모니 조각", "item.modern_industrialization.antimony_tiny_dust": "작은 안티모니 가루", + "item.modern_industrialization.area_module": "[UNTRANSLATED] Area Module", "item.modern_industrialization.argon_bucket": "[UNTRANSLATED] Argon Bucket", "item.modern_industrialization.arithmetic_logic_unit": "산술 논리 유닛", + "item.modern_industrialization.bane_of_arthropods_module": "[UNTRANSLATED] Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "기본 업그레이드", "item.modern_industrialization.battery_alloy_curved_plate": "배터리 합금 곡선 판", "item.modern_industrialization.battery_alloy_double_ingot": "배터리 합금 이중 주괴", @@ -780,6 +782,7 @@ "item.modern_industrialization.digital_circuit": "디지털 회로", "item.modern_industrialization.digital_circuit_board": "디지털 회로 판", "item.modern_industrialization.diode": "다이오드", + "item.modern_industrialization.efficiency_module": "[UNTRANSLATED] Efficiency Module", "item.modern_industrialization.electronic_circuit": "전자 회로", "item.modern_industrialization.electronic_circuit_board": "전자 회로 판", "item.modern_industrialization.electrum_cable": "일렉트럼 케이블", @@ -802,10 +805,12 @@ "item.modern_industrialization.ethanol_bucket": "[UNTRANSLATED] Ethanol Bucket", "item.modern_industrialization.ethylbenzene_bucket": "[UNTRANSLATED] Ethylbenzene Bucket", "item.modern_industrialization.ethylene_bucket": "[UNTRANSLATED] Ethylene Bucket", + "item.modern_industrialization.fire_aspect_module": "[UNTRANSLATED] Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "내화 점토 벽돌", "item.modern_industrialization.fire_clay_dust": "내화 점토 가루", "item.modern_industrialization.fluid_pipe": "액체 파이프", "item.modern_industrialization.fluid_slot": "[UNUSED, PLEASE REMOVE] 액체 슬롯", + "item.modern_industrialization.fortune_module": "[UNTRANSLATED] Fortune Module", "item.modern_industrialization.gold_blade": "[UNUSED, PLEASE REMOVE] 금 칼날", "item.modern_industrialization.gold_bolt": "금 볼트", "item.modern_industrialization.gold_crushed_dust": "[UNUSED, PLEASE REMOVE] 분쇄된 금 가루", @@ -905,6 +910,7 @@ "item.modern_industrialization.kanthal_plate": "칸탈 판", "item.modern_industrialization.kanthal_tiny_dust": "작은 칸탈 가루", "item.modern_industrialization.kanthal_wire": "칸탈 선", + "item.modern_industrialization.knockback_module": "[UNTRANSLATED] Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "분쇄된 청금석 가루", "item.modern_industrialization.lapis_dust": "청금석 가루", "item.modern_industrialization.lapis_plate": "청금석 판", @@ -957,6 +963,7 @@ "item.modern_industrialization.lime_item_pipe": "연두색 아이템 파이프", "item.modern_industrialization.lime_me_wire": "[UNTRANSLATED] Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "[UNTRANSLATED] Liquid Air Bucket", + "item.modern_industrialization.looting_module": "[UNTRANSLATED] Looting Module", "item.modern_industrialization.lubricant_bucket": "[UNTRANSLATED] Lubricant Bucket", "item.modern_industrialization.magenta_fluid_pipe": "자홍색 액체 파이프", "item.modern_industrialization.magenta_item_pipe": "자홍색 아이템 파이프", @@ -1084,6 +1091,7 @@ "item.modern_industrialization.salt_tiny_dust": "작은 소금 가루", "item.modern_industrialization.screwdriver": "[UNUSED, PLEASE REMOVE] 스크류드라이버", "item.modern_industrialization.shale_oil_bucket": "[UNTRANSLATED] Shale Oil Bucket", + "item.modern_industrialization.sharpness_module": "[UNTRANSLATED] Sharpness Module", "item.modern_industrialization.silicon_battery": "실리콘 배터리", "item.modern_industrialization.silicon_double_ingot": "실리콘 이중 주괴", "item.modern_industrialization.silicon_dust": "실리콘 가루", @@ -1094,6 +1102,7 @@ "item.modern_industrialization.silicon_plate": "실리콘 판", "item.modern_industrialization.silicon_tiny_dust": "작은 실리콘 가루", "item.modern_industrialization.silicon_wafer": "실리콘 웨이퍼", + "item.modern_industrialization.silk_touch_module": "[UNTRANSLATED] Silk Touch Module", "item.modern_industrialization.silver_cable": "은 케이블", "item.modern_industrialization.silver_crushed_dust": "[UNUSED, PLEASE REMOVE] 분쇄된 은 가루", "item.modern_industrialization.silver_curved_plate": "[UNUSED, PLEASE REMOVE] 은 곡선 판", @@ -1109,6 +1118,7 @@ "item.modern_industrialization.simple_fluid_coolant": "[UNUSED, PLEASE REMOVE] 단순한 액체 냉매", "item.modern_industrialization.singularity": "특이점", "item.modern_industrialization.small_heat_exchanger": "소형 열교환기", + "item.modern_industrialization.smite_module": "[UNTRANSLATED] Smite Module", "item.modern_industrialization.sodium_battery": "나트륨 배터리", "item.modern_industrialization.sodium_dust": "나트륨 가루", "item.modern_industrialization.sodium_hydroxide_bucket": "[UNTRANSLATED] Sodium Hydroxide Bucket", @@ -1182,6 +1192,7 @@ "item.modern_industrialization.superconductor_plate": "초전도 판", "item.modern_industrialization.superconductor_tiny_dust": "작은 초전도 가루", "item.modern_industrialization.superconductor_wire": "초전도 선", + "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "주석 칼날", 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 bd7edc8e5..f7e50ef79 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 @@ -494,8 +494,10 @@ "item.modern_industrialization.antimony_ingot": "Barra de Antimônio", "item.modern_industrialization.antimony_nugget": "Pepita de Antimônio", "item.modern_industrialization.antimony_tiny_dust": "Pó Pequeno de Antimônio", + "item.modern_industrialization.area_module": "[UNTRANSLATED] Area Module", "item.modern_industrialization.argon_bucket": "Balde de Árgon", "item.modern_industrialization.arithmetic_logic_unit": "Unidade de Lógica Aritmética", + "item.modern_industrialization.bane_of_arthropods_module": "[UNTRANSLATED] Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "Melhoria Básica", "item.modern_industrialization.battery_alloy_curved_plate": "Chapa Curvada de Liga de Bateria", "item.modern_industrialization.battery_alloy_double_ingot": "Barra Dupla de Liga de Bateria", @@ -628,6 +630,7 @@ "item.modern_industrialization.digital_circuit": "Circuito Digital", "item.modern_industrialization.digital_circuit_board": "Placa de Circuito Digital", "item.modern_industrialization.diode": "Diodo", + "item.modern_industrialization.efficiency_module": "[UNTRANSLATED] Efficiency Module", "item.modern_industrialization.electronic_circuit": "Circuito Eletrônico", "item.modern_industrialization.electronic_circuit_board": "Placa de Circuito Eletrônico", "item.modern_industrialization.electrum_cable": "Cabo de Electro", @@ -647,9 +650,11 @@ "item.modern_industrialization.ethanol_bucket": "Balde de Etanol", "item.modern_industrialization.ethylbenzene_bucket": "Balde de Etilbenzeno", "item.modern_industrialization.ethylene_bucket": "Balde de Etileno", + "item.modern_industrialization.fire_aspect_module": "[UNTRANSLATED] Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "Tijolo de Argila Refratária", "item.modern_industrialization.fire_clay_dust": "Pó de Argila Refratária", "item.modern_industrialization.fluid_pipe": "Tubo de Fluidos", + "item.modern_industrialization.fortune_module": "[UNTRANSLATED] Fortune Module", "item.modern_industrialization.gold_bolt": "Parafuso de Ouro", "item.modern_industrialization.gold_curved_plate": "Chapa Curvada de Ouro", "item.modern_industrialization.gold_double_ingot": "Barra Dupla de Ouro", @@ -740,6 +745,7 @@ "item.modern_industrialization.kanthal_plate": "Chapa de Kanthal", "item.modern_industrialization.kanthal_tiny_dust": "Pó Pequeno de Kanthal", "item.modern_industrialization.kanthal_wire": "Fio de Kanthal", + "item.modern_industrialization.knockback_module": "[UNTRANSLATED] Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "Pó Bruto de Lápis-lazuli", "item.modern_industrialization.lapis_dust": "Pó de Lápis-lazuli", "item.modern_industrialization.lapis_plate": "Chapa de Lápis-lazuli", @@ -788,6 +794,7 @@ "item.modern_industrialization.lime_item_pipe": "Tubo de Itens Verde-Limão", "item.modern_industrialization.lime_me_wire": "[UNTRANSLATED] Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "Balde de Ar Líquido", + "item.modern_industrialization.looting_module": "[UNTRANSLATED] Looting Module", "item.modern_industrialization.lubricant_bucket": "Balde de Lubrificante", "item.modern_industrialization.magenta_fluid_pipe": "Tubo de Fluidos Magenta", "item.modern_industrialization.magenta_item_pipe": "Tubo de Itens Magenta", @@ -905,6 +912,7 @@ "item.modern_industrialization.salt_dust": "Pó de Sal", "item.modern_industrialization.salt_tiny_dust": "Pó Pequeno de Sal", "item.modern_industrialization.shale_oil_bucket": "Balde de Petróleo de Xisto", + "item.modern_industrialization.sharpness_module": "[UNTRANSLATED] Sharpness Module", "item.modern_industrialization.silicon_battery": "Bateria de Silício", "item.modern_industrialization.silicon_double_ingot": "Barra Dupla de Silício", "item.modern_industrialization.silicon_dust": "Pó de Silício", @@ -915,6 +923,7 @@ "item.modern_industrialization.silicon_plate": "Chapa de Silício", "item.modern_industrialization.silicon_tiny_dust": "Pó Pequeno de Silício", "item.modern_industrialization.silicon_wafer": "Wafer de Silício", + "item.modern_industrialization.silk_touch_module": "[UNTRANSLATED] Silk Touch Module", "item.modern_industrialization.silver_cable": "Cabo de Prata", "item.modern_industrialization.silver_double_ingot": "Barra Dupla de Prata", "item.modern_industrialization.silver_dust": "Pó de Prata", @@ -925,6 +934,7 @@ "item.modern_industrialization.silver_wire": "Fio de Prata", "item.modern_industrialization.singularity": "Singularidade", "item.modern_industrialization.small_heat_exchanger": "Trocador de Calor Pequeno", + "item.modern_industrialization.smite_module": "[UNTRANSLATED] Smite Module", "item.modern_industrialization.sodium_battery": "Bateria de Sódio", "item.modern_industrialization.sodium_dust": "Pó de Sódio", "item.modern_industrialization.sodium_hydroxide_bucket": "Balde Hidróxido de Sódio", @@ -994,6 +1004,7 @@ "item.modern_industrialization.superconductor_plate": "Chapa de Supercondutor", "item.modern_industrialization.superconductor_tiny_dust": "Pó Pequeno de Supercondutor", "item.modern_industrialization.superconductor_wire": "Fio Supercondutor", + "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Balde de Óleo Sintético", "item.modern_industrialization.synthetic_rubber_bucket": "Balde de Borracha Sintética", "item.modern_industrialization.tin_blade": "Lâmina de Estanho", 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 099af1cb8..44f19aca2 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 @@ -494,8 +494,10 @@ "item.modern_industrialization.antimony_ingot": "Слиток сурьмы", "item.modern_industrialization.antimony_nugget": "Кусочек сурьмы", "item.modern_industrialization.antimony_tiny_dust": "Мельчайший порошок из сурьмы", + "item.modern_industrialization.area_module": "[UNTRANSLATED] Area Module", "item.modern_industrialization.argon_bucket": "Ведро аргона", "item.modern_industrialization.arithmetic_logic_unit": "Арифметическо-логическое устройство", + "item.modern_industrialization.bane_of_arthropods_module": "[UNTRANSLATED] Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "Простая модернизация", "item.modern_industrialization.battery_alloy_curved_plate": "Изогнутая пластина из батарейного сплава", "item.modern_industrialization.battery_alloy_double_ingot": "Двойной слиток батарейного сплава", @@ -628,6 +630,7 @@ "item.modern_industrialization.digital_circuit": "Цифровая микросхема", "item.modern_industrialization.digital_circuit_board": "Цифровая электроплата", "item.modern_industrialization.diode": "Диод", + "item.modern_industrialization.efficiency_module": "[UNTRANSLATED] Efficiency Module", "item.modern_industrialization.electronic_circuit": "Электронная микросхема", "item.modern_industrialization.electronic_circuit_board": "Электронная монтажная схема", "item.modern_industrialization.electrum_cable": "Кабель из электрума", @@ -647,9 +650,11 @@ "item.modern_industrialization.ethanol_bucket": "Ведро этанола", "item.modern_industrialization.ethylbenzene_bucket": "Ведро этиленбензола", "item.modern_industrialization.ethylene_bucket": "Ведро этилена", + "item.modern_industrialization.fire_aspect_module": "[UNTRANSLATED] Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "Глинозёмистый кирпич", "item.modern_industrialization.fire_clay_dust": "Глинозёмистый порошок", "item.modern_industrialization.fluid_pipe": "Жидкостная труба", + "item.modern_industrialization.fortune_module": "[UNTRANSLATED] Fortune Module", "item.modern_industrialization.gold_bolt": "Золотой болт", "item.modern_industrialization.gold_curved_plate": "Золотая изогнутая пластина", "item.modern_industrialization.gold_double_ingot": "Двойной слиток золота", @@ -740,6 +745,7 @@ "item.modern_industrialization.kanthal_plate": "Фехралевая пластина", "item.modern_industrialization.kanthal_tiny_dust": "Фехралевый мельчайший порошок", "item.modern_industrialization.kanthal_wire": "Фехралевый провод", + "item.modern_industrialization.knockback_module": "[UNTRANSLATED] Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "Лазуритовый измельчённый порошок", "item.modern_industrialization.lapis_dust": "Лазуритовый порошок", "item.modern_industrialization.lapis_plate": "Лазуритовая пластина", @@ -788,6 +794,7 @@ "item.modern_industrialization.lime_item_pipe": "Лаймовая предметная труба", "item.modern_industrialization.lime_me_wire": "[UNTRANSLATED] Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "Ведро сжиженного воздуха", + "item.modern_industrialization.looting_module": "[UNTRANSLATED] Looting Module", "item.modern_industrialization.lubricant_bucket": "Ведро смазочного материала", "item.modern_industrialization.magenta_fluid_pipe": "Пурпурная жидкостная труба", "item.modern_industrialization.magenta_item_pipe": "Пурпурная предметная труба", @@ -905,6 +912,7 @@ "item.modern_industrialization.salt_dust": "Соляной порошок", "item.modern_industrialization.salt_tiny_dust": "Соляной мельчайший порошок", "item.modern_industrialization.shale_oil_bucket": "Ведро нефтеносного сланца", + "item.modern_industrialization.sharpness_module": "[UNTRANSLATED] Sharpness Module", "item.modern_industrialization.silicon_battery": "Кремниевая батарея", "item.modern_industrialization.silicon_double_ingot": "Двойной слиток кремния", "item.modern_industrialization.silicon_dust": "Кремниевый порошок", @@ -915,6 +923,7 @@ "item.modern_industrialization.silicon_plate": "Кремниевая пластина", "item.modern_industrialization.silicon_tiny_dust": "Мельчайший кремниевый порошок", "item.modern_industrialization.silicon_wafer": "Кремниевая пластина", + "item.modern_industrialization.silk_touch_module": "[UNTRANSLATED] Silk Touch Module", "item.modern_industrialization.silver_cable": "Серебряный кабель", "item.modern_industrialization.silver_double_ingot": "Двойной слиток серебра", "item.modern_industrialization.silver_dust": "Серебряный порошок", @@ -925,6 +934,7 @@ "item.modern_industrialization.silver_wire": "Серебряный провод", "item.modern_industrialization.singularity": "Сингулярность", "item.modern_industrialization.small_heat_exchanger": "Малый теплообменник", + "item.modern_industrialization.smite_module": "[UNTRANSLATED] Smite Module", "item.modern_industrialization.sodium_battery": "Натриевая батарея", "item.modern_industrialization.sodium_dust": "Натриевый порошок", "item.modern_industrialization.sodium_hydroxide_bucket": "Ведро гидроокись натрия", @@ -994,6 +1004,7 @@ "item.modern_industrialization.superconductor_plate": "Пластина сверхпроводника", "item.modern_industrialization.superconductor_tiny_dust": "Мельчайший порошок из сверхпроводника", "item.modern_industrialization.superconductor_wire": "Провод из сверхпроводника", + "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Ведро синтетического масла", "item.modern_industrialization.synthetic_rubber_bucket": "Ведро искусственного каучука", "item.modern_industrialization.tin_blade": "Оловянная лопасть", 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 299fb9391..235f9d0e3 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 @@ -492,8 +492,10 @@ "item.modern_industrialization.antimony_ingot": "锑锭", "item.modern_industrialization.antimony_nugget": "锑粒", "item.modern_industrialization.antimony_tiny_dust": "小堆锑粉", + "item.modern_industrialization.area_module": "[UNTRANSLATED] Area Module", "item.modern_industrialization.argon_bucket": "[UNTRANSLATED] Argon Bucket", "item.modern_industrialization.arithmetic_logic_unit": "算术逻辑单元", + "item.modern_industrialization.bane_of_arthropods_module": "[UNTRANSLATED] Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "基本升级", "item.modern_industrialization.battery_alloy_curved_plate": "弯曲电池合金板", "item.modern_industrialization.battery_alloy_double_ingot": "电池合金双层锭", @@ -626,6 +628,7 @@ "item.modern_industrialization.digital_circuit": "数字电路", "item.modern_industrialization.digital_circuit_board": "数字电路板", "item.modern_industrialization.diode": "二极管", + "item.modern_industrialization.efficiency_module": "[UNTRANSLATED] Efficiency Module", "item.modern_industrialization.electronic_circuit": "电子电路", "item.modern_industrialization.electronic_circuit_board": "电子电路板", "item.modern_industrialization.electrum_cable": "琥珀金电缆", @@ -645,9 +648,11 @@ "item.modern_industrialization.ethanol_bucket": "[UNTRANSLATED] Ethanol Bucket", "item.modern_industrialization.ethylbenzene_bucket": "[UNTRANSLATED] Ethylbenzene Bucket", "item.modern_industrialization.ethylene_bucket": "[UNTRANSLATED] Ethylene Bucket", + "item.modern_industrialization.fire_aspect_module": "[UNTRANSLATED] Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "耐火黏土砖", "item.modern_industrialization.fire_clay_dust": "耐火粘土粉", "item.modern_industrialization.fluid_pipe": "流体管道", + "item.modern_industrialization.fortune_module": "[UNTRANSLATED] Fortune Module", "item.modern_industrialization.gold_bolt": "金螺栓", "item.modern_industrialization.gold_curved_plate": "弯曲金板", "item.modern_industrialization.gold_double_ingot": "金双层锭", @@ -738,6 +743,7 @@ "item.modern_industrialization.kanthal_plate": "铁铬铝合金板", "item.modern_industrialization.kanthal_tiny_dust": "小堆铁铬铝合金粉", "item.modern_industrialization.kanthal_wire": "铁铬铝合金线", + "item.modern_industrialization.knockback_module": "[UNTRANSLATED] Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "青金石碎粉", "item.modern_industrialization.lapis_dust": "青金石粉", "item.modern_industrialization.lapis_plate": "青金石板", @@ -786,6 +792,7 @@ "item.modern_industrialization.lime_item_pipe": "黄绿色物品管道", "item.modern_industrialization.lime_me_wire": "[UNTRANSLATED] Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "[UNTRANSLATED] Liquid Air Bucket", + "item.modern_industrialization.looting_module": "[UNTRANSLATED] Looting Module", "item.modern_industrialization.lubricant_bucket": "[UNTRANSLATED] Lubricant Bucket", "item.modern_industrialization.magenta_fluid_pipe": "品红色流体管道", "item.modern_industrialization.magenta_item_pipe": "品红色物品管道", @@ -903,6 +910,7 @@ "item.modern_industrialization.salt_dust": "盐粉", "item.modern_industrialization.salt_tiny_dust": "小堆盐粉", "item.modern_industrialization.shale_oil_bucket": "[UNTRANSLATED] Shale Oil Bucket", + "item.modern_industrialization.sharpness_module": "[UNTRANSLATED] Sharpness Module", "item.modern_industrialization.silicon_battery": "硅电池", "item.modern_industrialization.silicon_double_ingot": "硅双层锭", "item.modern_industrialization.silicon_dust": "硅粉", @@ -913,6 +921,7 @@ "item.modern_industrialization.silicon_plate": "硅板", "item.modern_industrialization.silicon_tiny_dust": "小堆硅粉", "item.modern_industrialization.silicon_wafer": "硅晶圆", + "item.modern_industrialization.silk_touch_module": "[UNTRANSLATED] Silk Touch Module", "item.modern_industrialization.silver_cable": "银电缆", "item.modern_industrialization.silver_double_ingot": "银双层锭", "item.modern_industrialization.silver_dust": "银粉", @@ -923,6 +932,7 @@ "item.modern_industrialization.silver_wire": "银线", "item.modern_industrialization.singularity": "奇点", "item.modern_industrialization.small_heat_exchanger": "小型热交换器", + "item.modern_industrialization.smite_module": "[UNTRANSLATED] Smite Module", "item.modern_industrialization.sodium_battery": "钠电池", "item.modern_industrialization.sodium_dust": "钠粉", "item.modern_industrialization.sodium_hydroxide_bucket": "[UNTRANSLATED] Sodium Hydroxide Bucket", @@ -992,6 +1002,7 @@ "item.modern_industrialization.superconductor_plate": "超导体板", "item.modern_industrialization.superconductor_tiny_dust": "小堆超导体粉", "item.modern_industrialization.superconductor_wire": "超导体线", + "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "锡叶片", 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 3dafe57bb..7a8f0169e 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 @@ -556,8 +556,10 @@ "item.modern_industrialization.antimony_ingot": "銻錠", "item.modern_industrialization.antimony_nugget": "銻粒", "item.modern_industrialization.antimony_tiny_dust": "小銻粉", + "item.modern_industrialization.area_module": "[UNTRANSLATED] Area Module", "item.modern_industrialization.argon_bucket": "[UNTRANSLATED] Argon Bucket", "item.modern_industrialization.arithmetic_logic_unit": "[UNTRANSLATED] Arithmetic Logic Unit", + "item.modern_industrialization.bane_of_arthropods_module": "[UNTRANSLATED] Bane of Arthropods Module", "item.modern_industrialization.basic_upgrade": "[UNTRANSLATED] Basic Upgrade", "item.modern_industrialization.battery_alloy_curved_plate": "彎曲電池合金板", "item.modern_industrialization.battery_alloy_double_ingot": "電池合金雙層錠", @@ -726,6 +728,7 @@ "item.modern_industrialization.digital_circuit": "數字電路", "item.modern_industrialization.digital_circuit_board": "數字電路板", "item.modern_industrialization.diode": "二極體", + "item.modern_industrialization.efficiency_module": "[UNTRANSLATED] Efficiency Module", "item.modern_industrialization.electronic_circuit": "電子電路", "item.modern_industrialization.electronic_circuit_board": "電子電路板", "item.modern_industrialization.electrum_cable": "[UNTRANSLATED] Electrum Cable", @@ -748,10 +751,12 @@ "item.modern_industrialization.ethanol_bucket": "[UNTRANSLATED] Ethanol Bucket", "item.modern_industrialization.ethylbenzene_bucket": "[UNTRANSLATED] Ethylbenzene Bucket", "item.modern_industrialization.ethylene_bucket": "[UNTRANSLATED] Ethylene Bucket", + "item.modern_industrialization.fire_aspect_module": "[UNTRANSLATED] Fire Aspect Module", "item.modern_industrialization.fire_clay_brick": "耐火黏土磚", "item.modern_industrialization.fire_clay_dust": "耐火黏土粉", "item.modern_industrialization.fluid_pipe": "[UNTRANSLATED] Fluid Pipe", "item.modern_industrialization.fluid_slot": "[UNUSED, PLEASE REMOVE] 流體欄", + "item.modern_industrialization.fortune_module": "[UNTRANSLATED] Fortune Module", "item.modern_industrialization.gold_bolt": "[UNTRANSLATED] Gold Bolt", "item.modern_industrialization.gold_crushed_dust": "[UNUSED, PLEASE REMOVE] 金碎粉", "item.modern_industrialization.gold_curved_plate": "彎曲金板", @@ -848,6 +853,7 @@ "item.modern_industrialization.kanthal_plate": "[UNTRANSLATED] Kanthal Plate", "item.modern_industrialization.kanthal_tiny_dust": "[UNTRANSLATED] Kanthal Tiny Dust", "item.modern_industrialization.kanthal_wire": "[UNTRANSLATED] Kanthal Wire", + "item.modern_industrialization.knockback_module": "[UNTRANSLATED] Knockback Module", "item.modern_industrialization.lapis_crushed_dust": "[UNTRANSLATED] Lapis Lazuli Crushed Dust", "item.modern_industrialization.lapis_dust": "[UNTRANSLATED] Lapis Lazuli Dust", "item.modern_industrialization.lapis_plate": "[UNTRANSLATED] Lapis Lazuli Plate", @@ -900,6 +906,7 @@ "item.modern_industrialization.lime_item_pipe": "[UNTRANSLATED] Lime Item Pipe", "item.modern_industrialization.lime_me_wire": "[UNTRANSLATED] Lime ME Wire", "item.modern_industrialization.liquid_air_bucket": "[UNTRANSLATED] Liquid Air Bucket", + "item.modern_industrialization.looting_module": "[UNTRANSLATED] Looting Module", "item.modern_industrialization.lubricant_bucket": "[UNTRANSLATED] Lubricant Bucket", "item.modern_industrialization.lv_battery": "[UNUSED, PLEASE REMOVE] 紅石電池", "item.modern_industrialization.lv_circuit": "[UNUSED, PLEASE REMOVE] 模擬電路", @@ -1067,6 +1074,7 @@ "item.modern_industrialization.salt_dust": "鹽粉", "item.modern_industrialization.salt_tiny_dust": "小鹽粉", "item.modern_industrialization.shale_oil_bucket": "[UNTRANSLATED] Shale Oil Bucket", + "item.modern_industrialization.sharpness_module": "[UNTRANSLATED] Sharpness Module", "item.modern_industrialization.silicon_battery": "矽電池", "item.modern_industrialization.silicon_double_ingot": "矽雙層錠", "item.modern_industrialization.silicon_dust": "矽粉", @@ -1077,6 +1085,7 @@ "item.modern_industrialization.silicon_plate": "矽板", "item.modern_industrialization.silicon_tiny_dust": "小矽粉", "item.modern_industrialization.silicon_wafer": "[UNTRANSLATED] Silicon Wafer", + "item.modern_industrialization.silk_touch_module": "[UNTRANSLATED] Silk Touch Module", "item.modern_industrialization.silver_cable": "[UNTRANSLATED] Silver Cable", "item.modern_industrialization.silver_crushed_dust": "[UNUSED, PLEASE REMOVE] 銀碎粉", "item.modern_industrialization.silver_curved_plate": "[UNUSED, PLEASE REMOVE] 彎曲銀板", @@ -1092,6 +1101,7 @@ "item.modern_industrialization.simple_fluid_coolant": "[UNUSED, PLEASE REMOVE] 簡易流體冷卻劑", "item.modern_industrialization.singularity": "[UNTRANSLATED] Singularity", "item.modern_industrialization.small_heat_exchanger": "[UNTRANSLATED] Small Heat Exchanger", + "item.modern_industrialization.smite_module": "[UNTRANSLATED] Smite Module", "item.modern_industrialization.sodium_battery": "鈉電池", "item.modern_industrialization.sodium_dust": "鈉粉", "item.modern_industrialization.sodium_hydroxide_bucket": "[UNTRANSLATED] Sodium Hydroxide Bucket", @@ -1165,6 +1175,7 @@ "item.modern_industrialization.superconductor_plate": "[UNTRANSLATED] Superconductor Plate", "item.modern_industrialization.superconductor_tiny_dust": "[UNTRANSLATED] Superconductor Tiny Dust", "item.modern_industrialization.superconductor_wire": "[UNTRANSLATED] Superconductor Wire", + "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "錫葉片", diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index 85fbee7d5..c0c6b46ba 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -152,6 +152,19 @@ public final class MIItem { public static final ItemDefinition RUBBER_BOOTS = item("Rubber Boots", "rubber_boots", s -> new ArmorItem(RubberArmorMaterial.INSTANCE, ArmorItem.Type.BOOTS, s.maxCount(1)), ITEMS_OTHER); public static final ItemDefinition DIESEL_JETPACK = item("Diesel Jetpack", "diesel_jetpack", JetpackItem::new, ITEMS_OTHER).withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(JetpackItem.CAPACITY, ctx), item)); + // Modular Equipment Upgrades + public static final ItemDefinition AREA_MODULE = itemNoModel("Area Module", "area_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); + public static final ItemDefinition FIRE_ASPECT_MODULE = itemNoModel("Fire Aspect Module", "fire_aspect_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); + public static final ItemDefinition LOOTING_MODULE = itemNoModel("Looting Module", "looting_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); + public static final ItemDefinition KNOCKBACK_MODULE = itemNoModel("Knockback Module", "knockback_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); + public static final ItemDefinition SWEEPING_EDGE_MODULE = itemNoModel("Sweeping Edge Module", "sweeping_edge_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); + public static final ItemDefinition SHARPNESS_MODULE = itemNoModel("Sharpness Module", "sharpness_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); + public static final ItemDefinition SMITE_MODULE = itemNoModel("Smite Module", "smite_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); + public static final ItemDefinition BANE_OF_ARTHROPODS_MODULE = itemNoModel("Bane of Arthropods Module", "bane_of_arthropods_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); + public static final ItemDefinition EFFICIENCY_MODULE = itemNoModel("Efficiency Module", "efficiency_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); + public static final ItemDefinition FORTUNE_MODULE = itemNoModel("Fortune Module", "fortune_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); + public static final ItemDefinition SILK_TOUCH_MODULE = itemNoModel("Silk Touch Module", "silk_touch_module", p -> new Item(p.maxCount(1)), ITEMS_OTHER); + public static final ItemDefinition GRAVICHESTPLATE = item("Gravichestplate", "gravichestplate", GraviChestPlateItem::new, ITEMS_OTHER); public static final ItemDefinition QUANTUM_SWORD = itemHandheld("Quantum Sword", "quantum_sword", QuantumSword::new); diff --git a/src/main/resources/assets/modern_industrialization/models/item/area_module.json b/src/main/resources/assets/modern_industrialization/models/item/area_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/area_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/bane_of_arthropods_module.json b/src/main/resources/assets/modern_industrialization/models/item/bane_of_arthropods_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/bane_of_arthropods_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/efficiency_module.json b/src/main/resources/assets/modern_industrialization/models/item/efficiency_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/efficiency_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/fire_aspect_module.json b/src/main/resources/assets/modern_industrialization/models/item/fire_aspect_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/fire_aspect_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/fortune_module.json b/src/main/resources/assets/modern_industrialization/models/item/fortune_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/fortune_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/knockback_module.json b/src/main/resources/assets/modern_industrialization/models/item/knockback_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/knockback_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/looting_module.json b/src/main/resources/assets/modern_industrialization/models/item/looting_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/looting_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/sharpness_module.json b/src/main/resources/assets/modern_industrialization/models/item/sharpness_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/sharpness_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/silk_touch_module.json b/src/main/resources/assets/modern_industrialization/models/item/silk_touch_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/silk_touch_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/smite_module.json b/src/main/resources/assets/modern_industrialization/models/item/smite_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/smite_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json b/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json new file mode 100644 index 000000000..143ab2f2a --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modern_industrialization:item/upgrade_module" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/textures/item/upgrade_module.png b/src/main/resources/assets/modern_industrialization/textures/item/upgrade_module.png new file mode 100644 index 0000000000000000000000000000000000000000..4a6d3bcb47fb8cc19e5820f56c0df47947a50a01 GIT binary patch literal 2122 zcmV-Q2(|Z#P)1q~8j=(jN5Qq=;KyRs!Nplu2UkH5`~Y!ua#D1W691PJTEuv8+>dwn9(V5mZ>z=> z!#@cqs;Os^2_aut6@sq_UzBli%%z2BmQfsizJ^2emMRg_1b(*6{VhJgvAwWU{Rn%Z2MypDSfeh^@T>K-p zKTR%)Tvae~ET9erqU{I&gWug6rTCPS6iNVr7t8t>1A@CiyJ=b9$ClMT0esKEmD=^! zTfpom>CLVdJpu-|fs5;|ChY;2JHYUhChDRs`Dl7eCE)#xzNr9&Z-M?br?<{NP9K0A zb+vp092^4UWy)T6d3RrLZ~va@^!EdfaB{L7R2r)Q000SaNLh0L01FcU01FcV0GgZ_ z000EudQ@0+Qek%>aB^>EX>4U6ba`-PAZ2)IW&i+Kh3!{cvg9TV{bvV$#dci#~hfBj;+}Y7~ z20)(Dy8-+V)eHES`C39#`~fqOj)Cf zCRNQ^)H3IoC8w-8=aQ|2!q@|)q@pF4Qp|!gOl0t7us3LqaPSciIntp=KFVPgu%CMWY&FZK26Rgo@ zEu2hEJH1(h)~Q}DXl^GmIRj%M5*XLX017%x&U~gA!(?u9<_mT}6^A>P7Q%(+S3Kf#;>b)R|r25W7ebM<6wt-^_^XRJOv@7Y|)HV-xX z-Tr?^|GA?>qfo?0ixfL`IOO~How;9*;+~Ao-dzID>L#a%-6G~TMM14mpW8~`WApe7 zD&^V7*}GT8H+wmDhW@4JWII4NY-c|zR)cx&+D@xuM8crHNd+H=bLFpGq>($5@jIz^ zJ*5lkJ}$>2>7EehcF!)aH8(?Q9)tE8{ndxowpX>)<5g)d!3IOIRX+6`)?Su6D-RkTHY-@p+pLmty=AgoN*R(Bd zTq&g`X^Gk#-O2a5z{3e3rSmevW*?}_PT5Rr&#$QUNs7BX67|$Rm>0XsP4W#@xTGwv zCGOtfn3l!CY!!=b4I&p0*4H4TWMbF#20kKu-}TiEC)X1Z4<6pG{B+leYjTMjO{@U~ zaEIJ>l(qJQt1beX?~xm=C!Ha(!&x`SmT@Ha6^-RiY_!>rz29D+EUIl0@DRdDW zif%f(IOrxgsvwA~lid^?L|0b{s0EcMwso-7K}!X}roo>$Xkt@;CN~c}cyRgdJ@;Jr z9}4*Wb~qfizpMFvgPbRX;3V6@cTJ>b$oUH)*k4u{ng6H-0s!O-1uB(_%lSTG#qLj~ zxY%eX8jYeTUO1?#1XY#m;{gJG#T_Iq%|&d0g|#X|MCjEt&JDu@Zmr2^!v=NBVmk8* z!0cjK0`Qe@Zb>F&ca7ttBf8^p4t8S%Rh6q^k)FXrrbbPsGq21{roADqW}hTIX8}+* zYhb^?vq@KnOpL|2%$Lw} zmg`v0S>7`~)=a5-f6tJX|1vSVSpXoJkkNA%+j}JdT4>T^&6EJU5lkjz7cAf05)o~z zW}hS|dsk@G(p Date: Thu, 26 Oct 2023 22:41:48 -0700 Subject: [PATCH 05/18] Add tool casing as external parts --- .../modern_industrialization/lang/en_us.json | 4 +++ .../lang/untranslated/ko_kr.json | 4 +++ .../lang/untranslated/pt_br.json | 4 +++ .../lang/untranslated/ru_ru.json | 4 +++ .../lang/untranslated/zh_cn.json | 4 +++ .../lang/untranslated/zh_tw.json | 4 +++ .../models/item/aluminum_tool_casing.json | 6 ++++ .../item/stainless_steel_tool_casing.json | 6 ++++ .../models/item/steel_tool_casing.json | 6 ++++ .../models/item/titanium_tool_casing.json | 6 ++++ .../aluminum/assembler/tool_casing.json | 27 ++++++++++++++++++ .../materials/aluminum/craft/tool_casing.json | 23 +++++++++++++++ .../aluminum/macerator/rotary_blade.json | 17 +++++++++++ .../aluminum/macerator/tool_casing.json | 17 +++++++++++ .../invar/macerator/rotary_blade.json | 17 +++++++++++ .../assembler/tool_casing.json | 27 ++++++++++++++++++ .../stainless_steel/craft/tool_casing.json | 23 +++++++++++++++ .../macerator/rotary_blade.json | 17 +++++++++++ .../macerator/tool_casing.json | 17 +++++++++++ .../steel/assembler/tool_casing.json | 27 ++++++++++++++++++ .../materials/steel/craft/tool_casing.json | 23 +++++++++++++++ .../steel/macerator/rotary_blade.json | 17 +++++++++++ .../steel/macerator/tool_casing.json | 17 +++++++++++ .../titanium/assembler/tool_casing.json | 27 ++++++++++++++++++ .../materials/titanium/craft/tool_casing.json | 23 +++++++++++++++ .../titanium/macerator/rotary_blade.json | 17 +++++++++++ .../titanium/macerator/tool_casing.json | 17 +++++++++++ .../modern_industrialization/MIItem.java | 6 ++++ .../materials/MIMaterials.java | 4 +++ .../materials/part/MIParts.java | 1 + .../materials/recipe/StandardRecipes.java | 9 +++++- .../textures/item/aluminum_tool_casing.png | Bin 0 -> 354 bytes .../item/stainless_steel_tool_casing.png | Bin 0 -> 372 bytes .../item/steam_mining_drill_handler.png | Bin 6509 -> 0 bytes .../textures/item/steel_tool_casing.png | Bin 0 -> 326 bytes .../textures/item/titanium_tool_casing.png | Bin 0 -> 369 bytes .../materialsets/common/tool_casing.png | Bin 0 -> 2283 bytes 37 files changed, 420 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json create mode 100644 src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/invar/macerator/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/tool_casing.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/rotary_blade.json create mode 100644 src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/aluminum_tool_casing.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/stainless_steel_tool_casing.png delete mode 100644 src/main/resources/assets/modern_industrialization/textures/item/steam_mining_drill_handler.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/steel_tool_casing.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/titanium_tool_casing.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/materialsets/common/tool_casing.png 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 388625fea..8e53c790e 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -471,6 +471,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Aluminum Rotor", "item.modern_industrialization.aluminum_tiny_dust": "Aluminum Tiny Dust", + "item.modern_industrialization.aluminum_tool_casing": "Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "Aluminum Wire", "item.modern_industrialization.analog_circuit": "Analog Circuit", "item.modern_industrialization.analog_circuit_board": "Analog Circuit Board", @@ -955,6 +956,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Stainless Steel Rotor", "item.modern_industrialization.stainless_steel_tiny_dust": "Stainless Steel Tiny Dust", + "item.modern_industrialization.stainless_steel_tool_casing": "Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "Steam Bucket", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "Steam-Cracked Heavy Fuel Bucket", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "Steam-Cracked Light Fuel Bucket", @@ -977,6 +979,7 @@ "item.modern_industrialization.steel_rod_magnetic": "Magnetic Steel Rod", "item.modern_industrialization.steel_rotary_blade": "Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Steel Tiny Dust", + "item.modern_industrialization.steel_tool_casing": "Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "Steel Upgrade", "item.modern_industrialization.styrene_bucket": "Styrene Bucket", "item.modern_industrialization.styrene_butadiene_bucket": "Styrene-Butadiene Bucket", @@ -1035,6 +1038,7 @@ "item.modern_industrialization.titanium_rotary_blade": "Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Titanium Rotor", "item.modern_industrialization.titanium_tiny_dust": "Titanium Tiny Dust", + "item.modern_industrialization.titanium_tool_casing": "Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "Toluene Bucket", "item.modern_industrialization.transistor": "Transistor", "item.modern_industrialization.tritium_bucket": "Tritium Bucket", 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 8afcf4dce..4e2370c48 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 @@ -539,6 +539,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "알루미늄 로터", "item.modern_industrialization.aluminum_tiny_dust": "작은 알루미늄 가루", + "item.modern_industrialization.aluminum_tool_casing": "[UNTRANSLATED] Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "알루미늄 선", "item.modern_industrialization.analog_circuit": "아날로그 회로", "item.modern_industrialization.analog_circuit_board": "아날로그 회로 판", @@ -1147,6 +1148,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "스테인리스강 로터", "item.modern_industrialization.stainless_steel_tiny_dust": "작은 스테인리스강 가루", + "item.modern_industrialization.stainless_steel_tool_casing": "[UNTRANSLATED] Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Heavy Fuel Bucket", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Light Fuel Bucket", @@ -1171,6 +1173,7 @@ "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_rotor": "[UNUSED, PLEASE REMOVE] 강철 로터", "item.modern_industrialization.steel_tiny_dust": "작은 강철 가루", + "item.modern_industrialization.steel_tool_casing": "[UNTRANSLATED] Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "강철 업그레이드", "item.modern_industrialization.styrene_bucket": "[UNTRANSLATED] Styrene Bucket", "item.modern_industrialization.styrene_butadiene_bucket": "[UNTRANSLATED] Styrene-Butadiene Bucket", @@ -1231,6 +1234,7 @@ "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "티타늄 로터", "item.modern_industrialization.titanium_tiny_dust": "작은 티타늄 가루", + "item.modern_industrialization.titanium_tool_casing": "[UNTRANSLATED] Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", "item.modern_industrialization.transistor": "트랜지스터", "item.modern_industrialization.tritium_bucket": "[UNTRANSLATED] Tritium Bucket", 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 f7e50ef79..a547a167b 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 @@ -477,6 +477,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Rotor de Alumínio", "item.modern_industrialization.aluminum_tiny_dust": "Pó Pequeno de Alumínio", + "item.modern_industrialization.aluminum_tool_casing": "[UNTRANSLATED] Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "Fio de Alumínio", "item.modern_industrialization.analog_circuit": "Circuito Analógico", "item.modern_industrialization.analog_circuit_board": "Placa de Circuito Analógico", @@ -961,6 +962,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Rotor de Aço Inoxidável", "item.modern_industrialization.stainless_steel_tiny_dust": "Pó Pequeno de Aço Inoxidável", + "item.modern_industrialization.stainless_steel_tool_casing": "[UNTRANSLATED] Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "Balde de Vapor", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "Balde de Combustível Pesado Craqueado", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "Balde de Combustível Leve Craqueado", @@ -983,6 +985,7 @@ "item.modern_industrialization.steel_rod_magnetic": "Vara de Aço Magnetizado", "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Pó Pequeno de Aço", + "item.modern_industrialization.steel_tool_casing": "[UNTRANSLATED] Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "Melhoria de Aço", "item.modern_industrialization.styrene_bucket": "Balde de Estireno", "item.modern_industrialization.styrene_butadiene_bucket": "Styrene-Butadiene Bucket", @@ -1041,6 +1044,7 @@ "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Rotor de Titânio", "item.modern_industrialization.titanium_tiny_dust": "Pó Pequeno de Titânio", + "item.modern_industrialization.titanium_tool_casing": "[UNTRANSLATED] Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "Balde de Tolueno", "item.modern_industrialization.transistor": "Transistor", "item.modern_industrialization.tritium_bucket": "Balde de Trítio", 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 44f19aca2..a9348a1ee 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 @@ -477,6 +477,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "Алюминиевое ротор", "item.modern_industrialization.aluminum_tiny_dust": "Алюминиевый мельчайший порошок", + "item.modern_industrialization.aluminum_tool_casing": "[UNTRANSLATED] Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "Алюминиевый провод", "item.modern_industrialization.analog_circuit": "Аналоговая микросхема", "item.modern_industrialization.analog_circuit_board": "Аналоговая электроплата", @@ -961,6 +962,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "Ротор из нержавеющей стали", "item.modern_industrialization.stainless_steel_tiny_dust": "Мельчайший порошок нержавеющей стали", + "item.modern_industrialization.stainless_steel_tool_casing": "[UNTRANSLATED] Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "Ведро пара", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "Ведро тяжёлого топлива парофазного крекинга", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "Ведро лёгкого топлива парофазного крекинга", @@ -983,6 +985,7 @@ "item.modern_industrialization.steel_rod_magnetic": "болт из магнитной стали", "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "Мельчайший стальной порошок", + "item.modern_industrialization.steel_tool_casing": "[UNTRANSLATED] Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "Стальная модернизация", "item.modern_industrialization.styrene_bucket": "Ведро стирола", "item.modern_industrialization.styrene_butadiene_bucket": "Ведро сополимера бутадиена и стирола", @@ -1041,6 +1044,7 @@ "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "Титановый ротор", "item.modern_industrialization.titanium_tiny_dust": "Мельчайший титановый порошок", + "item.modern_industrialization.titanium_tool_casing": "[UNTRANSLATED] Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "Ведро таулола", "item.modern_industrialization.transistor": "Полупроводниковый триод", "item.modern_industrialization.tritium_bucket": "Ведро трития", 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 235f9d0e3..071e881cf 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 @@ -475,6 +475,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "铝转子", "item.modern_industrialization.aluminum_tiny_dust": "小堆铝粉", + "item.modern_industrialization.aluminum_tool_casing": "[UNTRANSLATED] Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "铝线", "item.modern_industrialization.analog_circuit": "模拟电路", "item.modern_industrialization.analog_circuit_board": "模拟电路板", @@ -959,6 +960,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "不锈钢转子", "item.modern_industrialization.stainless_steel_tiny_dust": "小堆不锈钢粉", + "item.modern_industrialization.stainless_steel_tool_casing": "[UNTRANSLATED] Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Heavy Fuel Bucket", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Light Fuel Bucket", @@ -981,6 +983,7 @@ "item.modern_industrialization.steel_rod_magnetic": "磁化钢杆", "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_tiny_dust": "小堆钢粉", + "item.modern_industrialization.steel_tool_casing": "[UNTRANSLATED] Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "钢材升级", "item.modern_industrialization.styrene_bucket": "[UNTRANSLATED] Styrene Bucket", "item.modern_industrialization.styrene_butadiene_bucket": "[UNTRANSLATED] Styrene-Butadiene Bucket", @@ -1039,6 +1042,7 @@ "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "钛转子", "item.modern_industrialization.titanium_tiny_dust": "小堆钛粉", + "item.modern_industrialization.titanium_tool_casing": "[UNTRANSLATED] Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", "item.modern_industrialization.transistor": "晶体管", "item.modern_industrialization.tritium_bucket": "[UNTRANSLATED] Tritium Bucket", 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 7a8f0169e..31c38f3e6 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 @@ -538,6 +538,7 @@ "item.modern_industrialization.aluminum_rotary_blade": "[UNTRANSLATED] Aluminum Rotary Blade", "item.modern_industrialization.aluminum_rotor": "鋁轉子", "item.modern_industrialization.aluminum_tiny_dust": "小鋁粉", + "item.modern_industrialization.aluminum_tool_casing": "[UNTRANSLATED] Aluminum Tool Casing", "item.modern_industrialization.aluminum_wire": "鋁線", "item.modern_industrialization.analog_circuit": "[UNTRANSLATED] Analog Circuit", "item.modern_industrialization.analog_circuit_board": "[UNTRANSLATED] Analog Circuit Board", @@ -1130,6 +1131,7 @@ "item.modern_industrialization.stainless_steel_rotary_blade": "[UNTRANSLATED] Stainless Steel Rotary Blade", "item.modern_industrialization.stainless_steel_rotor": "不鏽鋼轉子", "item.modern_industrialization.stainless_steel_tiny_dust": "小不鏽鋼粉", + "item.modern_industrialization.stainless_steel_tool_casing": "[UNTRANSLATED] Stainless Steel Tool Casing", "item.modern_industrialization.steam_bucket": "[UNTRANSLATED] Steam Bucket", "item.modern_industrialization.steam_cracked_heavy_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Heavy Fuel Bucket", "item.modern_industrialization.steam_cracked_light_fuel_bucket": "[UNTRANSLATED] Steam-Cracked Light Fuel Bucket", @@ -1154,6 +1156,7 @@ "item.modern_industrialization.steel_rotary_blade": "[UNTRANSLATED] Steel Rotary Blade", "item.modern_industrialization.steel_rotor": "[UNUSED, PLEASE REMOVE] 鋼轉子", "item.modern_industrialization.steel_tiny_dust": "小鋼粉", + "item.modern_industrialization.steel_tool_casing": "[UNTRANSLATED] Steel Tool Casing", "item.modern_industrialization.steel_upgrade": "[UNTRANSLATED] Steel Upgrade", "item.modern_industrialization.styrene_bucket": "[UNTRANSLATED] Styrene Bucket", "item.modern_industrialization.styrene_butadiene_bucket": "[UNTRANSLATED] Styrene-Butadiene Bucket", @@ -1213,6 +1216,7 @@ "item.modern_industrialization.titanium_rotary_blade": "[UNTRANSLATED] Titanium Rotary Blade", "item.modern_industrialization.titanium_rotor": "鈦轉子", "item.modern_industrialization.titanium_tiny_dust": "小鈦粉", + "item.modern_industrialization.titanium_tool_casing": "[UNTRANSLATED] Titanium Tool Casing", "item.modern_industrialization.toluene_bucket": "[UNTRANSLATED] Toluene Bucket", "item.modern_industrialization.transistor": "晶體管", "item.modern_industrialization.tritium_bucket": "[UNTRANSLATED] Tritium Bucket", diff --git a/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json new file mode 100644 index 000000000..88475d1ca --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/aluminum_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json new file mode 100644 index 000000000..3a4a46dc7 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/stainless_steel_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json new file mode 100644 index 000000000..891550183 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/steel_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json new file mode 100644 index 000000000..67e304720 --- /dev/null +++ b/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/titanium_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/tool_casing.json new file mode 100644 index 000000000..7819b4a7a --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/assembler/tool_casing.json @@ -0,0 +1,27 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 200, + "eu": 2, + "fluid_inputs": [ + { + "amount": 100, + "fluid": "modern_industrialization:soldering_alloy" + } + ], + "item_inputs": [ + { + "amount": 2, + "tag": "c:aluminum_plates" + }, + { + "amount": 2, + "item": "modern_industrialization:aluminum_curved_plate" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:aluminum_tool_casing" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/tool_casing.json new file mode 100644 index 000000000..8b3e1ad2e --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/craft/tool_casing.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "b": { + "item": "modern_industrialization:aluminum_bolt" + }, + "c": { + "item": "modern_industrialization:aluminum_curved_plate" + }, + "p": { + "tag": "c:aluminum_plates" + } + }, + "pattern": [ + "bpb", + "c c", + "bpb" + ], + "result": { + "count": 1, + "item": "modern_industrialization:aluminum_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/rotary_blade.json new file mode 100644 index 000000000..09ea90d63 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/rotary_blade.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:aluminum_rotary_blade" + } + ], + "item_outputs": [ + { + "amount": 2, + "item": "modern_industrialization:aluminum_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/tool_casing.json new file mode 100644 index 000000000..3ac5223bd --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/aluminum/macerator/tool_casing.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:aluminum_tool_casing" + } + ], + "item_outputs": [ + { + "amount": 4, + "item": "modern_industrialization:aluminum_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/invar/macerator/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/macerator/rotary_blade.json new file mode 100644 index 000000000..166b30e22 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/invar/macerator/rotary_blade.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:invar_rotary_blade" + } + ], + "item_outputs": [ + { + "amount": 2, + "item": "modern_industrialization:invar_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/tool_casing.json new file mode 100644 index 000000000..c923bd27c --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/assembler/tool_casing.json @@ -0,0 +1,27 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 400, + "eu": 2, + "fluid_inputs": [ + { + "amount": 100, + "fluid": "modern_industrialization:soldering_alloy" + } + ], + "item_inputs": [ + { + "amount": 2, + "tag": "c:stainless_steel_plates" + }, + { + "amount": 2, + "item": "modern_industrialization:stainless_steel_curved_plate" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:stainless_steel_tool_casing" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/tool_casing.json new file mode 100644 index 000000000..dae10497f --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/craft/tool_casing.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "b": { + "item": "modern_industrialization:stainless_steel_bolt" + }, + "c": { + "item": "modern_industrialization:stainless_steel_curved_plate" + }, + "p": { + "tag": "c:stainless_steel_plates" + } + }, + "pattern": [ + "bpb", + "c c", + "bpb" + ], + "result": { + "count": 1, + "item": "modern_industrialization:stainless_steel_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/rotary_blade.json new file mode 100644 index 000000000..504928fa5 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/rotary_blade.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:stainless_steel_rotary_blade" + } + ], + "item_outputs": [ + { + "amount": 2, + "item": "modern_industrialization:stainless_steel_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/tool_casing.json new file mode 100644 index 000000000..5ce1f425e --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/stainless_steel/macerator/tool_casing.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:stainless_steel_tool_casing" + } + ], + "item_outputs": [ + { + "amount": 4, + "item": "modern_industrialization:stainless_steel_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/tool_casing.json new file mode 100644 index 000000000..e96289092 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/assembler/tool_casing.json @@ -0,0 +1,27 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 200, + "eu": 2, + "fluid_inputs": [ + { + "amount": 100, + "fluid": "modern_industrialization:soldering_alloy" + } + ], + "item_inputs": [ + { + "amount": 2, + "tag": "c:steel_plates" + }, + { + "amount": 2, + "item": "modern_industrialization:steel_curved_plate" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:steel_tool_casing" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/tool_casing.json new file mode 100644 index 000000000..e2473216e --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/craft/tool_casing.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "b": { + "item": "modern_industrialization:steel_bolt" + }, + "c": { + "item": "modern_industrialization:steel_curved_plate" + }, + "p": { + "tag": "c:steel_plates" + } + }, + "pattern": [ + "bpb", + "c c", + "bpb" + ], + "result": { + "count": 1, + "item": "modern_industrialization:steel_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/rotary_blade.json new file mode 100644 index 000000000..9b0e0fa8e --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/rotary_blade.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:steel_rotary_blade" + } + ], + "item_outputs": [ + { + "amount": 2, + "item": "modern_industrialization:steel_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/tool_casing.json new file mode 100644 index 000000000..ef0135f31 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/steel/macerator/tool_casing.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 200, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:steel_tool_casing" + } + ], + "item_outputs": [ + { + "amount": 4, + "item": "modern_industrialization:steel_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/tool_casing.json new file mode 100644 index 000000000..4d8ff0206 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/assembler/tool_casing.json @@ -0,0 +1,27 @@ +{ + "type": "modern_industrialization:assembler", + "duration": 400, + "eu": 2, + "fluid_inputs": [ + { + "amount": 100, + "fluid": "modern_industrialization:soldering_alloy" + } + ], + "item_inputs": [ + { + "amount": 2, + "tag": "c:titanium_plates" + }, + { + "amount": 2, + "item": "modern_industrialization:titanium_curved_plate" + } + ], + "item_outputs": [ + { + "amount": 1, + "item": "modern_industrialization:titanium_tool_casing" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/tool_casing.json new file mode 100644 index 000000000..2edddc489 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/craft/tool_casing.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "key": { + "b": { + "item": "modern_industrialization:titanium_bolt" + }, + "c": { + "item": "modern_industrialization:titanium_curved_plate" + }, + "p": { + "tag": "c:titanium_plates" + } + }, + "pattern": [ + "bpb", + "c c", + "bpb" + ], + "result": { + "count": 1, + "item": "modern_industrialization:titanium_tool_casing" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/rotary_blade.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/rotary_blade.json new file mode 100644 index 000000000..166235bbc --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/rotary_blade.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:titanium_rotary_blade" + } + ], + "item_outputs": [ + { + "amount": 2, + "item": "modern_industrialization:titanium_dust" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/tool_casing.json b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/tool_casing.json new file mode 100644 index 000000000..8205383e8 --- /dev/null +++ b/src/generated/resources/data/modern_industrialization/recipes/materials/titanium/macerator/tool_casing.json @@ -0,0 +1,17 @@ +{ + "type": "modern_industrialization:macerator", + "duration": 400, + "eu": 2, + "item_inputs": [ + { + "amount": 1, + "item": "modern_industrialization:titanium_tool_casing" + } + ], + "item_outputs": [ + { + "amount": 4, + "item": "modern_industrialization:titanium_dust" + } + ] +} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index c0c6b46ba..0281c69e8 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -32,6 +32,7 @@ import aztech.modern_industrialization.items.armor.JetpackItem; import aztech.modern_industrialization.items.armor.QuantumArmorItem; import aztech.modern_industrialization.items.armor.RubberArmorMaterial; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem; import aztech.modern_industrialization.items.tools.QuantumSword; import aztech.modern_industrialization.nuclear.INeutronBehaviour; import aztech.modern_industrialization.nuclear.NuclearComponentItem; @@ -139,6 +140,11 @@ public final class MIItem { public static final ItemDefinition STEAM_MINING_DRILL = itemHandheld("Steam Mining Drill", "steam_mining_drill",SteamDrillItem::new); + public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", (p) -> new ModularToolItem(p)); + public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", (p) -> new ModularToolItem(p)); + public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", (p) -> new ModularToolItem(p)); + public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", (p) -> new ModularToolItem(p)); + // public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); // public static final ItemDefinition DIESEL_CHAINSAW = itemHandheld("Diesel Chainsaw", "diesel_chainsaw", p -> new DieselToolItem(p, 12)) diff --git a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java index ca7ec3790..158107d53 100644 --- a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java +++ b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java @@ -331,6 +331,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(MACHINE_CASING.of(), MACHINE_CASING_PIPE.of()).addParts(TANK.of(8)).addParts(BARREL.of(128)) .addMaterialItemParts(MaterialItemPart.external(HAMMER, MIItem.STEEL_HAMMER.getId().toString())) .addParts(ROTARY_BLADE) + .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.STEEL_TOOL_CASING.getId().toString())) .addRecipes(ForgeHammerRecipes::apply, SmeltingRecipes::apply, StandardRecipes::apply)); LIGNITE_COAL = MaterialRegistry.addMaterial(new MaterialBuilder("Lignite Coal", "lignite_coal") @@ -353,6 +354,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING_SPECIAL.of("Frostproof Machine Casing", "frostproof_machine_casing")).addParts(TANK.of(16)) .addParts(BARREL.of(512)).addParts(CABLE.of(CableTier.HV)).addRecipes(StandardRecipes::apply) .addParts(ROTARY_BLADE) + .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.ALUMINUM_TOOL_CASING.getId().toString())) .addRecipes(SmeltingRecipes::applyBlastFurnace)); BAUXITE = MaterialRegistry.addMaterial(new MaterialBuilder("Bauxite", "bauxite") @@ -458,6 +460,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(MACHINE_CASING_SPECIAL.of("Solid Titanium Machine Casing", "solid_titanium_machine_casing")).addParts(ORE.of(MaterialOreSet.IRON)) .addParts(TANK.of(64)).addParts(BARREL.of(8192)) .addParts(ROTARY_BLADE) + .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.TITANIUM_TOOL_CASING.getId().toString())) .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 128, 400)).cancelRecipes("macerator/raw_metal")); @@ -492,6 +495,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, "clean_stainless_steel_machine_casing")) .addParts(ROD_MAGNETIC).addParts(TANK.of(32)).addParts(BARREL.of(4096)) .addParts(ROTARY_BLADE) + .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.STAINLESS_STEEL_TOOL_CASING.getId().toString())) .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 32, 400)).cancelRecipes("polarizer/rod_magnetic")); 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 616c7ca70..ab9076880 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java @@ -48,6 +48,7 @@ public class MIParts { public static final PartTemplate DRILL_HEAD = new PartTemplate("Drill Head", "drill_head"); public static final PartTemplate ROTARY_BLADE = new PartTemplate("Rotary Blade", "rotary_blade"); + public static final PartTemplate TOOL_CASING = new PartTemplate("Tool Casing", "tool_casing"); public static final PartTemplate DRILL = new PartTemplate("Drill", "drill"); diff --git a/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java b/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java index 3e056a13d..d6c9586eb 100644 --- a/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java +++ b/src/main/java/aztech/modern_industrialization/materials/recipe/StandardRecipes.java @@ -93,9 +93,10 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { new ShapedRecipeBuilder(ctx, DRILL_HEAD, 1, "drill_head", "bcp", "GRc", "bGb").addTaggedPart('G', GEAR) .addPart('b', BOLT) .addPart('c', CURVED_PLATE).addPart('R', ROD).addTaggedPart('p', PLATE); - new ShapedRecipeBuilder(ctx, ROTARY_BLADE, 1, "rotary_blade", " d ", "d#d", " d ") .addTaggedPart('#', GEAR).addInput('d', MIMaterials.DIAMOND.getPart(DUST)); + new ShapedRecipeBuilder(ctx, TOOL_CASING, 1, "tool_casing", "bpb", "c c", "bpb") + .addTaggedPart('b', BOLT).addTaggedPart('p', PLATE).addTaggedPart('c', CURVED_PLATE); // MACERATOR addMaceratorRecycling(ctx, DOUBLE_INGOT, 18); @@ -114,6 +115,7 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { addMaceratorRecycling(ctx, BLADE, 5); addMaceratorRecycling(ctx, DRILL_HEAD, 7 * 9 + 4); addMaceratorRecycling(ctx, ROTARY_BLADE, 18); + addMaceratorRecycling(ctx, TOOL_CASING, 36); addMaceratorRecycling(ctx, WIRE, 4); new MIRecipeBuilder(ctx, MIMachineRecipeTypes.MACERATOR, "ore_to_crushed").addTaggedPartInput(ORE, 1) @@ -200,6 +202,11 @@ public static void apply(MaterialBuilder.RecipeContext ctx) { .addTaggedPartInput(GEAR, 1) .addItemInput(MIMaterials.DIAMOND.getPart(DUST), 4) .addPartOutput(ROTARY_BLADE, 1); + new MIRecipeBuilder(ctx, MIMachineRecipeTypes.ASSEMBLER, "tool_casing") + .addTaggedPartInput(PLATE, 2) + .addTaggedPartInput(CURVED_PLATE, 2) + .addFluidInput(MIFluids.SOLDERING_ALLOY, 100) + .addPartOutput(TOOL_CASING, 1); // HEAT EXCHANGER new MIRecipeBuilder(ctx, MIMachineRecipeTypes.HEAT_EXCHANGER, "hot_ingot", 8, 10) diff --git a/src/main/resources/assets/modern_industrialization/textures/item/aluminum_tool_casing.png b/src/main/resources/assets/modern_industrialization/textures/item/aluminum_tool_casing.png new file mode 100644 index 0000000000000000000000000000000000000000..3930f12dd7faf167c1965ab0cb92bb02c7dfd0d3 GIT binary patch literal 354 zcmV-o0iFJdP)p#Pg!`=tq7?wTz#&GB9V+MwIK#gqN3=CgCF)*l^;0zb0{`K=2?!5WMaPrv?hQ~kt zLNtSvg95WZosr?^cc5#8aT>tLkk;~_L0E-BMaP=q&b{jl4D37%3~%l*Fr3>4v6)Al zfuSoFXS#q$gcts2_zU#6k}1Td-#}YIwi6Md0PxUdu5N_O`Tzg`07*qoM6N<$g1{7- Ab^rhX literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/modern_industrialization/textures/item/stainless_steel_tool_casing.png b/src/main/resources/assets/modern_industrialization/textures/item/stainless_steel_tool_casing.png new file mode 100644 index 0000000000000000000000000000000000000000..61aee8cf632a132b33fefd349e8a764f5ac7743f GIT binary patch literal 372 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 P00000NkvXXu0mjfLASHH literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/modern_industrialization/textures/materialsets/common/tool_casing.png b/src/main/resources/assets/modern_industrialization/textures/materialsets/common/tool_casing.png new file mode 100644 index 0000000000000000000000000000000000000000..6ac5183c4e26ac1ef3d348d2acf2e6411138b599 GIT binary patch literal 2283 zcmV>$!1Lv^wsD&igO8j3^Xc6PVaX;SOd)&PPgl3JY zW?&ppHOt5(6JoxwA_ia4ivYs#BPuadPh}T!@El+F@bUF7&a=GF{W-!)(PV&6B%Wou zVG*wrPj6Z}=Y8S`t4Ip*Iq{f57bJe!6%3MGJ^7u)_A0fM_gt6|&U$F|)%0sPOvmDcfZ zG=Z5<(iT2l*I5-4G%apz5@$SCv-u^w)?(YW{9&&=tG59k8000SaNLh0L01FcU01FcV0GgZ_ z000HhdQ@0+Qek%>aB^>EX>4U6ba`-PAZ2)IW&i+Kg{@avmLn+){O1&NghT=)j>G!i z++dDB!IpMa*@>^HhcNVlP5c^l-hGoezSokTyae(ScO*j6P( zm1kEot+MQi)0O>YnWk?eqivo$oB*ZjF^h>BTfXM6TORQE5+{^l{yNOF>`^BUW)|m2 z0OZ5*ZUCRW`UL)|na}9owNKzv+Wq_q%djy*<>i3&ufd-XKW)snNAz((^Ce%7v%kGp z?Y*tjB^Q8bxR#>3n^(t4!Q*5*ZR=TmyR-0_M zZI;Crxag>npd>29vrkzlQsKdq8;|WI9J#WBtU}E&qnmDD?A$lb{fbrWTrH-Og)uwn zfAg4M4gSt!dM^Vad+Ci8{Gy>;xG|U;znBF=Y~Q^33GjI~{g2NemcgK(Fe?t2uDncS zZy(y?$unb~N4cWH8mZd=Ai~}r&R7NmSAhC$u$K^twZKt9P=e=#*vMeOdQTNjl4A~J zgp|hKSR;1MB~O7yH*yn*@Q5q{H<1&_a?V3P;uIQ6p1t$l2QOZYk3IzsF8C0FgpuTu zusHD&L_{S@QdXy4gNmv~O_3ra2l^PIM2#_~L?&UQ1X~I76M8ab&Mx~LvSiIMrvmvD zS9}RYik4VXrOFj)qJ}C}YpkhR(~v2eYrcghO%NCBU3={5W^J?j<@pWP z>}HK7Q)8aotfAM4920h=6F)cuW8^Ftm%#u8O@p&bt#dS(8=PGcX^cI=Nk6zT)ego$ zp=*|Ww>NhW=6=MR@%kg)=sV`jpzcpFXF%Oo-d?a)$30gjV=D>=rWYgnFy1s7(ljo$ z^nc5r8G>V@Lb*DIv)63s#bwXvR7|gb#33>-9q?g0KtQjw6y`wUlDPuM(P$Uf#7$() z%*GYhDXvzj-12|)%e?T%$-}N{Ya0iMt=q~uuTfmjLp8G=af>ATUTx_( z#X3uek`ByYOY?4E^HS|H)7gPIed8hF@XlKwtux{?s(6#+SXDw@jYJZi;8LBfSR_FLYZ3X_@?KNP z_J|9BS~YV}ZB2+_KO4!WRYS`9rnD`^y_a!1*IWcgq4=XWl5jjCTr3;aqNa7)SUaQiR^vJ^PKFw< zxxv{M`T{Y;Qp8+-LwW(yw=vamfgT(;MgX_+T_uwbx(^=0j_nwrMVpoiLqOE)UKn8Q zIO&9jFXOMMvqgieJM<%nmz#JcyLWn5N}4v!a@-yPL^&SP@v!tWn2tD*p|(0a)ZutX ze{fnS_EEPm^crz9W;(on{0K(#B+=uHMWA`fsNA;Q4P21-?%@Bo*&%eZ#V3iSe5bRV zK853p^4Bj~t+ZVWhwXZA6wlr>Cz>B``Aum)rI21D{to;Ll;$l{q)>P00003hNklQ<+!;jcXv*6f+xO0c^mQRoFveOe~}!CL|hS zAO-`zscdF~I@L7uRj0T==iVIn=kF1B;kvHMvWz^>*>1PuQPU3`$5D4}+qQaC`<-`y z!{Gpc=Xt8Cs$VS!KuW1R&r@L-s{MYif*^R=#hdT@YBU-#o6WE+i`(sn5CS2@M;ynW zPfsYz631~EkH=iESBj#bC<^-hK9*&vYnWo8nK4-mNqiGtu z-Htep(RH2SaL8)4>db`zm`oI literal 0 HcmV?d00001 From 9608d2c192d707e5caee3b4212c413cb3dd82269 Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sat, 28 Oct 2023 00:11:05 -0700 Subject: [PATCH 06/18] Add nonfunctional tool station gui --- .../ModernIndustrializationClient.java | 8 +- .../blocks/toolstation/ToolStationScreen.java | 67 +++++ .../toolstation/ToolStationScreenHandler.java | 123 ++++++++- .../items/modular_tools/ModularToolItem.java | 253 ++++++++++++++++++ .../textures/gui/container/tool_station.png | Bin 0 -> 9683 bytes 5 files changed, 442 insertions(+), 9 deletions(-) create mode 100644 src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java create mode 100644 src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java create mode 100644 src/main/resources/assets/modern_industrialization/textures/gui/container/tool_station.png diff --git a/src/client/java/aztech/modern_industrialization/ModernIndustrializationClient.java b/src/client/java/aztech/modern_industrialization/ModernIndustrializationClient.java index fb3cb7d40..57b42659c 100644 --- a/src/client/java/aztech/modern_industrialization/ModernIndustrializationClient.java +++ b/src/client/java/aztech/modern_industrialization/ModernIndustrializationClient.java @@ -28,6 +28,7 @@ import aztech.modern_industrialization.blocks.storage.barrel.client.BarrelTooltipComponent; import aztech.modern_industrialization.blocks.storage.barrel.client.CreativeBarrelClientSetup; import aztech.modern_industrialization.blocks.storage.tank.creativetank.CreativeTankClientSetup; +import aztech.modern_industrialization.blocks.toolstation.ToolStationScreen; import aztech.modern_industrialization.datagen.MIDatagenClient; import aztech.modern_industrialization.datagen.MIDatagenServer; import aztech.modern_industrialization.inventory.ConfigurableInventoryPackets; @@ -119,6 +120,7 @@ private void setupScreens() { (MenuType) (MenuType) ModernIndustrialization.SCREEN_HANDLER_MACHINE, MachineScreen::new); MenuScreens.register(ModernIndustrialization.SCREEN_HANDLER_FORGE_HAMMER, ForgeHammerScreen::new); + MenuScreens.register(ModernIndustrialization.SCREEN_HANDLER_TOOL_STATION, ToolStationScreen::new); } private void setupPackets() { @@ -126,7 +128,8 @@ private void setupPackets() { ConfigurableInventoryS2CPacketHandlers.UPDATE_ITEM_SLOT); ClientPlayNetworking.registerGlobalReceiver(ConfigurableInventoryPackets.UPDATE_FLUID_SLOT, ConfigurableInventoryS2CPacketHandlers.UPDATE_FLUID_SLOT); - ClientPlayNetworking.registerGlobalReceiver(MachinePackets.S2C.COMPONENT_SYNC, ClientMachinePackets.ON_COMPONENT_SYNC); + ClientPlayNetworking.registerGlobalReceiver(MachinePackets.S2C.COMPONENT_SYNC, + ClientMachinePackets.ON_COMPONENT_SYNC); } private void setupTooltips() { @@ -143,7 +146,8 @@ private void setupTooltips() { Integer fuelTime = FuelRegistryImpl.INSTANCE.get(item); if (fuelTime != null && fuelTime > 0) { long totalEu = fuelTime * FuelBurningComponent.EU_PER_BURN_TICK; - lines.add(new MITooltips.Line(MIText.BaseEuTotalStored).arg(totalEu, MITooltips.EU_PARSER).build()); + lines.add(new MITooltips.Line(MIText.BaseEuTotalStored).arg(totalEu, MITooltips.EU_PARSER) + .build()); } } catch (Exception e) { ModernIndustrialization.LOGGER.warn("Could not show MI fuel tooltip.", e); diff --git a/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java b/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java new file mode 100644 index 000000000..de52cfc90 --- /dev/null +++ b/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 Justin Hu + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package aztech.modern_industrialization.blocks.toolstation; + +import aztech.modern_industrialization.ModernIndustrialization; +import aztech.modern_industrialization.client.screen.MIHandledScreen; +import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class ToolStationScreen extends MIHandledScreen { + public static final ResourceLocation TOOL_STATION_GUI = new ResourceLocation(ModernIndustrialization.MOD_ID, + "textures/gui/container/tool_station.png"); + + private static final int X_OFFSET = 61, Y_OFFSET = 14; + + private final ToolStationScreenHandler handler; + + public ToolStationScreen(ToolStationScreenHandler handler, Inventory inventory, Component title) { + super(handler, inventory, title); + this.handler = handler; + } + + @Override + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) { + super.render(guiGraphics, mouseX, mouseY, delta); + this.renderTooltip(guiGraphics, mouseX, mouseY); + } + + @Override + protected void renderBg(GuiGraphics guiGraphics, float delta, int mouseX, int mouseY) { + this.renderBackground(guiGraphics); + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + guiGraphics.blit(TOOL_STATION_GUI, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight); + for (int idx = handler.getNumAddonSlots(); idx < 5; ++idx) { + guiGraphics.blit(TOOL_STATION_GUI, this.leftPos + 43 + idx * 18, this.topPos + 41, 0, 166, 18, 18); + } + if (!handler.isComponentsEnabled()) { + guiGraphics.blit(TOOL_STATION_GUI, this.leftPos + 43, this.topPos + 23, 0, 166, 18 * 3, 18); + } + } +} diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java index 70bd8e27f..05d49735b 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -26,24 +26,30 @@ import aztech.modern_industrialization.ModernIndustrialization; import java.util.ArrayList; import java.util.List; +import net.minecraft.world.Container; +import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerLevelAccess; +import net.minecraft.world.inventory.DataSlot; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; public class ToolStationScreenHandler extends AbstractContainerMenu { public final Slot tool; - public final Slot energyStorage; public final Slot energyConverter; + public final Slot energyStorage; public final Slot head; public final List addons; + private final DataSlot numAddonSlots; + private final DataSlot componentsEnabled; private final ContainerLevelAccess context; private final Level world; private final Player player; + private long lastSoundTime = 0; public ToolStationScreenHandler(int syncId, Inventory playerInventory) { this(syncId, playerInventory, ContainerLevelAccess.NULL); @@ -51,17 +57,84 @@ public ToolStationScreenHandler(int syncId, Inventory playerInventory) { public ToolStationScreenHandler(int syncId, Inventory playerInventory, ContainerLevelAccess context) { super(ModernIndustrialization.SCREEN_HANDLER_TOOL_STATION, syncId); - this.context = context; this.world = playerInventory.player.level(); this.player = playerInventory.player; - // TODO - this.tool = null; - this.energyStorage = null; - this.energyConverter = null; - this.head = null; + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(playerInventory, i * 9 + j + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(playerInventory, j, 8 + j * 18, 58 + 84)); + } + + this.tool = new SingleItemSlot(new SimpleContainer(1) { + public void setChanged() { + super.setChanged(); + ToolStationScreenHandler.this.slotsChanged(this); + } + }, 0, 17, 33); + this.energyConverter = new SingleItemSlot(new SimpleContainer(1) { + public void setChanged() { + super.setChanged(); + ToolStationScreenHandler.this.slotsChanged(this); + } + }, 0, 44, 24); + this.energyStorage = new SingleItemSlot(new SimpleContainer(1) { + public void setChanged() { + super.setChanged(); + ToolStationScreenHandler.this.slotsChanged(this); + } + }, 0, 62, 24); + this.head = new SingleItemSlot(new SimpleContainer(1) { + public void setChanged() { + super.setChanged(); + ToolStationScreenHandler.this.slotsChanged(this); + } + }, 0, 80, 24); this.addons = new ArrayList<>(); + for (int idx = 0; idx < 5; ++idx) { + this.addons.add(new ToggleableSlot(new SimpleContainer(1) { + public void setChanged() { + super.setChanged(); + ToolStationScreenHandler.this.slotsChanged(this); + } + }, 0, 44 + idx * 18, 42)); + } + this.numAddonSlots = DataSlot.standalone(); + this.numAddonSlots.set(0); + this.componentsEnabled = DataSlot.standalone(); + this.componentsEnabled.set(0); + + this.addSlot(tool); + this.addSlot(energyConverter); + this.addSlot(energyStorage); + this.addSlot(head); + for (Slot slot : this.addons) { + this.addSlot(slot); + } + this.addDataSlot(numAddonSlots); + this.addDataSlot(componentsEnabled); + } + + public void slotsChanged(Container inventory) { + if (inventory == tool) { + // TODO: populate slots accordingly + } else if (tool.hasItem()) { + // TODO: update tool item + } + super.slotsChanged(inventory); + } + + public int getNumAddonSlots() { + return numAddonSlots.get(); + } + + public boolean isComponentsEnabled() { + return componentsEnabled.get() != 0; } @Override @@ -73,4 +146,40 @@ public boolean stillValid(Player player) { public ItemStack quickMoveStack(Player player, int index) { return ItemStack.EMPTY; } + + public void removed(Player player) { + super.removed(player); + this.context.execute((world, blockPos) -> { + this.clearContainer(player, this.tool.container); + }); + } + + private static class SingleItemSlot extends Slot { + public SingleItemSlot(Container container, int slot, int x, int y) { + super(container, slot, x, y); + } + + public int getMaxStackSize() { + return 1; + } + } + + private static class ToggleableSlot extends Slot { + private boolean active; + + public ToggleableSlot(Container container, int slot, int x, int y) { + super(container, slot, x, y); + + this.active = false; + } + + @Override + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + } } diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java new file mode 100644 index 000000000..f635e3fa0 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java @@ -0,0 +1,253 @@ +/* + * MIT License + * + * Copyright (c) 2023 Justin Hu + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package aztech.modern_industrialization.items.modular_tools; + +import aztech.modern_industrialization.api.FluidFuelRegistry; +import aztech.modern_industrialization.items.DynamicEnchantmentItem; +import aztech.modern_industrialization.items.DynamicToolItem; +import aztech.modern_industrialization.items.FluidFuelItemHelper; +import aztech.modern_industrialization.items.ItemHelper; +import com.google.common.collect.ImmutableMultimap; +import com.google.common.collect.Multimap; +import it.unimi.dsi.fastutil.objects.Reference2IntMap; +import java.util.List; +import java.util.Map; +import net.fabricmc.fabric.api.mininglevel.v1.MiningLevelManager; +import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.Attribute; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Rarity; +import net.minecraft.world.item.ShovelItem; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.Vanishable; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; +import team.reborn.energy.api.base.SimpleEnergyItem; + +public class ModularToolItem extends Item implements Vanishable, DynamicEnchantmentItem, DynamicToolItem { + public ModularToolItem(Properties settings) { + super(settings.stacksTo(1).rarity(Rarity.UNCOMMON)); + } + + @Override + public boolean isEnchantable(ItemStack stack) { + return false; + } + + @Override + public boolean mineBlock(ItemStack stack, Level world, BlockState state, BlockPos pos, LivingEntity miner) { + if (state.getDestroySpeed(world, pos) != 0.0f) { + consumeEnergy(stack); + } + return true; + } + + @Override + public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) { + consumeEnergy(stack); + return true; + } + + @Override + public boolean isSuitableFor(ItemStack stack, BlockState state) { + int requiredLevel = MiningLevelManager.getRequiredMiningLevel(state); + return requiredLevel <= toolLevel(stack) && hasEnoughEnergy(stack) && isSupportedBlock(stack, state); + } + + @Override + public float getDestroySpeed(ItemStack stack, BlockState state) { + if (isSupportedBlock(stack, state)) { + return getMiningSpeedMultiplier(stack); + } + return 1; + } + + @Override + public Multimap getAttributeModifiers(ItemStack stack, EquipmentSlot slot) { + if (slot == EquipmentSlot.MAINHAND && hasEnoughEnergy(stack)) { + return ItemHelper.createToolModifiers(getAttackDamage(stack)); + } + return ImmutableMultimap.of(); + } + + @Override + public void appendHoverText(ItemStack stack, Level world, List tooltip, TooltipFlag context) { + // TODO: if fluid fuelled, add fluid tooltip; else add EU tooltip + } + + @Override + public boolean isBarVisible(ItemStack stack) { + return true; + } + + @Override + public int getBarWidth(ItemStack stack) { + return (int) Math.round(getDurabilityBarProgress(stack) * 13); + } + + @Override + public InteractionResult useOn(UseOnContext context) { + // TOOD: add handling for stripping, pathing, and tilling, depending on head + return InteractionResult.PASS; + } + + @Override + public Reference2IntMap getEnchantments(ItemStack stack) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getEnchantments'"); + } + + @Override + public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity interactionTarget, + InteractionHand usedHand) { + // TODO: add handling for shearing, depending on head + return InteractionResult.PASS; + } + + /** + * get energy capacity, in EU or in mB, depending on energy storage module + */ + private static long getCapacity(ItemStack stack) { + return 0; // TODO + } + + /** + * report consumed energy for one operation, in EU + */ + private static long getConsumedEnergy(ItemStack stack) { + // TODO + return 0; + } + + /** + * consume one op's worth of energy; if using fluid fuels, rounds up to + * nearest mB + */ + private static void consumeEnergy(ItemStack stack) { + // TODO + } + + private static boolean hasEnoughEnergy(ItemStack stack) { + switch (getEnergyType(stack)) { + case FLUID: { + FluidVariant fluid = FluidFuelItemHelper.getFluid(stack); + if (fluid.getFluid() == Fluids.EMPTY) { + return false; + } + + long euPerMb = FluidFuelRegistry.getEu(fluid.getFluid()); + long mbRequired = (getConsumedEnergy(stack) + euPerMb - 1) / euPerMb; // do ceiling division + return FluidFuelItemHelper.getAmount(stack) > mbRequired; + } + case ELECTRIC: { + return SimpleEnergyItem.getStoredEnergyUnchecked(stack) > getConsumedEnergy(stack); + } + default: { + return false; + } + } + } + + private static int toolLevel(ItemStack stack) { + CompoundTag tag = stack.getTag(); + // TODO: get level of tool from head type; steel = 2, aluminium = 3, stainless = + // 4, titanium = 5 + return 0; + } + + private static float getMiningSpeedMultiplier(ItemStack stack) { + // TODO: calculate based on head and modules + return 1.0f; + } + + private static double getAttackDamage(ItemStack stack) { + // TODO: calculate based on head and modules + return 0.0; + } + + private static double getDurabilityBarProgress(ItemStack stack) { + switch (getEnergyType(stack)) { + case FLUID: { + return (double) FluidFuelItemHelper.getAmount(stack) / (double) getCapacity(stack); + } + case ELECTRIC: { + return (double) SimpleEnergyItem.getStoredEnergyUnchecked(stack) / (double) getCapacity(stack); + } + default: { + return 0.0; + } + } + } + + public static EnergyType getEnergyType(ItemStack stack) { + CompoundTag tag = stack.getTag(); + if (tag == null) { + return EnergyType.NONE; + } else { + return EnergyType.values()[tag.getByte("energyType")]; + } + } + + public static enum EnergyType { + NONE, + FLUID, + ELECTRIC + } + + private static class StrippingAccess extends AxeItem { + private StrippingAccess(Tier material, float attackDamage, float attackSpeed, Properties settings) { + super(material, attackDamage, attackSpeed, settings); + } + + public static Map getStrippedBlocks() { + return STRIPPABLES; + } + } + + private static class PathingAccess extends ShovelItem { + private PathingAccess(Tier material, float attackDamage, float attackSpeed, Properties settings) { + super(material, attackDamage, attackSpeed, settings); + } + + public static Map getPathStates() { + return FLATTENABLES; + } + } +} diff --git a/src/main/resources/assets/modern_industrialization/textures/gui/container/tool_station.png b/src/main/resources/assets/modern_industrialization/textures/gui/container/tool_station.png new file mode 100644 index 0000000000000000000000000000000000000000..d1ade9e50f10f0dcb7bf03307918b4d5c0d8d44a GIT binary patch literal 9683 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 literal 0 HcmV?d00001 From f03bd8b49960f7b97f35a4a81775595234727944 Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sat, 28 Oct 2023 15:14:21 -0700 Subject: [PATCH 07/18] Make and populate registries for modular item components --- .../modern_industrialization/MIItem.java | 79 +++++++++++++------ .../item/modular_tools/CasingRegistry.java | 22 ++++++ .../api/item/modular_tools/ComponentTier.java | 8 ++ .../EnergyConverterRegistry.java | 23 ++++++ .../modular_tools/EnergyStorageRegistry.java | 24 ++++++ .../api/item/modular_tools/HeadRegistry.java | 24 ++++++ .../item/modular_tools/ModuleRegistry.java | 29 +++++++ .../items/modular_tools/ModularToolItem.java | 6 ++ .../materials/MIMaterials.java | 33 ++++---- .../materials/part/BatteryPart.java | 20 ++++- .../materials/part/DrillHeadPart.java | 27 +++++++ .../materials/part/MIParts.java | 4 +- .../materials/part/RotaryBladePart.java | 26 ++++++ .../materials/part/TankPart.java | 18 ++++- 14 files changed, 297 insertions(+), 46 deletions(-) create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java create mode 100644 src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java create mode 100644 src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java create mode 100644 src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index 0281c69e8..3f9c233da 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -26,6 +26,14 @@ import static aztech.modern_industrialization.items.SortOrder.*; import aztech.modern_industrialization.api.energy.EnergyApi; +import aztech.modern_industrialization.api.item.modular_tools.CasingRegistry; +import aztech.modern_industrialization.api.item.modular_tools.CasingRegistry.CasingProperties; +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; +import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry.ConverterProperties; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry.CustomModuleEffect; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry.ModuleProperties; import aztech.modern_industrialization.definition.ItemDefinition; import aztech.modern_industrialization.items.*; import aztech.modern_industrialization.items.armor.GraviChestPlateItem; @@ -33,6 +41,7 @@ import aztech.modern_industrialization.items.armor.QuantumArmorItem; import aztech.modern_industrialization.items.armor.RubberArmorMaterial; import aztech.modern_industrialization.items.modular_tools.ModularToolItem; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; import aztech.modern_industrialization.items.tools.QuantumSword; import aztech.modern_industrialization.nuclear.INeutronBehaviour; import aztech.modern_industrialization.nuclear.NuclearComponentItem; @@ -48,6 +57,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.*; +import net.minecraft.world.item.enchantment.Enchantments; import team.reborn.energy.api.base.SimpleEnergyItem; @SuppressWarnings("unused") @@ -71,15 +81,23 @@ public final class MIItem { public static final ItemDefinition PACKER_DOUBLE_INGOT_TEMPLATE = item("Packer Double Ingot Template", "packer_double_ingot_template", p -> new Item(p.rarity(Rarity.RARE).maxCount(1)), STEAM_TIER); // Mechanical components: motors - public static final ItemDefinition MOTOR = item("Motor", "motor", ITEMS_OTHER); - public static final ItemDefinition LARGE_MOTOR = item("Large Motor", "large_motor", ITEMS_OTHER); - public static final ItemDefinition ADVANCED_MOTOR = item("Advanced Motor", "advanced_motor", ITEMS_OTHER); - public static final ItemDefinition LARGE_ADVANCED_MOTOR = item("Large Advanced Motor", "large_advanced_motor", ITEMS_OTHER); + public static final ItemDefinition MOTOR = item("Motor", "motor", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.LV, 1024, EnergyType.ELECTRIC))); + public static final ItemDefinition LARGE_MOTOR = item("Large Motor", "large_motor", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.MV, 1024 * 2, EnergyType.ELECTRIC))); + public static final ItemDefinition ADVANCED_MOTOR = item("Advanced Motor", "advanced_motor", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.HV, 1024 * 2 * 2, EnergyType.ELECTRIC))); + public static final ItemDefinition LARGE_ADVANCED_MOTOR = item("Large Advanced Motor", "large_advanced_motor", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.EV, 1024 * 2 * 2 * 2, EnergyType.ELECTRIC))); // Mechanical components: pumps - public static final ItemDefinition PUMP = item("Pump", "pump", ITEMS_OTHER); - public static final ItemDefinition LARGE_PUMP = item("Large Pump", "large_pump", ITEMS_OTHER); - public static final ItemDefinition ADVANCED_PUMP = item("Advanced Pump", "advanced_pump", ITEMS_OTHER); - public static final ItemDefinition LARGE_ADVANCED_PUMP = item("Large Advanced Pump", "large_advanced_pump", ITEMS_OTHER); + public static final ItemDefinition PUMP = item("Pump", "pump", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.LV, 1024, EnergyType.FLUID))); + public static final ItemDefinition LARGE_PUMP = item("Large Pump", "large_pump", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.MV, 1024 * 2, EnergyType.FLUID))); + public static final ItemDefinition ADVANCED_PUMP = item("Advanced Pump", "advanced_pump", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.HV, 1024 * 2 * 2, EnergyType.FLUID))); + public static final ItemDefinition LARGE_ADVANCED_PUMP = item("Large Advanced Pump", "large_advanced_pump", ITEMS_OTHER) + .withItemRegistrationEvent(item -> EnergyConverterRegistry.register(item, new ConverterProperties(ComponentTier.EV, 1024 * 2 * 2 * 2, EnergyType.FLUID))); // Mechanical components: others public static final ItemDefinition PISTON = item("Piston", "piston", ITEMS_OTHER); public static final ItemDefinition CONVEYOR = item("Conveyor", "conveyor", ITEMS_OTHER); @@ -140,10 +158,14 @@ public final class MIItem { public static final ItemDefinition STEAM_MINING_DRILL = itemHandheld("Steam Mining Drill", "steam_mining_drill",SteamDrillItem::new); - public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", (p) -> new ModularToolItem(p)); - public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", (p) -> new ModularToolItem(p)); - public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", (p) -> new ModularToolItem(p)); - public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", (p) -> new ModularToolItem(p)); + public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", (p) -> new ModularToolItem(p)) + .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.LV, 2))); + public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", (p) -> new ModularToolItem(p)) + .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.MV, 3))); + public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", (p) -> new ModularToolItem(p)) + .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.HV, 4))); + public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", (p) -> new ModularToolItem(p)) + .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.EV, 5))); // public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); @@ -159,17 +181,28 @@ public final class MIItem { public static final ItemDefinition DIESEL_JETPACK = item("Diesel Jetpack", "diesel_jetpack", JetpackItem::new, ITEMS_OTHER).withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(JetpackItem.CAPACITY, ctx), item)); // Modular Equipment Upgrades - public static final ItemDefinition AREA_MODULE = itemNoModel("Area Module", "area_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); - public static final ItemDefinition FIRE_ASPECT_MODULE = itemNoModel("Fire Aspect Module", "fire_aspect_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); - public static final ItemDefinition LOOTING_MODULE = itemNoModel("Looting Module", "looting_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); - public static final ItemDefinition KNOCKBACK_MODULE = itemNoModel("Knockback Module", "knockback_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER); - public static final ItemDefinition SWEEPING_EDGE_MODULE = itemNoModel("Sweeping Edge Module", "sweeping_edge_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); - public static final ItemDefinition SHARPNESS_MODULE = itemNoModel("Sharpness Module", "sharpness_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); - public static final ItemDefinition SMITE_MODULE = itemNoModel("Smite Module", "smite_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); - public static final ItemDefinition BANE_OF_ARTHROPODS_MODULE = itemNoModel("Bane of Arthropods Module", "bane_of_arthropods_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); - public static final ItemDefinition EFFICIENCY_MODULE = itemNoModel("Efficiency Module", "efficiency_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER); - public static final ItemDefinition FORTUNE_MODULE = itemNoModel("Fortune Module", "fortune_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER); - public static final ItemDefinition SILK_TOUCH_MODULE = itemNoModel("Silk Touch Module", "silk_touch_module", p -> new Item(p.maxCount(1)), ITEMS_OTHER); + public static final ItemDefinition AREA_MODULE = itemNoModel("Area Module", "area_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(null, CustomModuleEffect.AREA, 9.0))); + public static final ItemDefinition FIRE_ASPECT_MODULE = itemNoModel("Fire Aspect Module", "fire_aspect_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.FIRE_ASPECT, null, 1.5))); + public static final ItemDefinition LOOTING_MODULE = itemNoModel("Looting Module", "looting_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.MOB_LOOTING, null, 2.0))); + public static final ItemDefinition KNOCKBACK_MODULE = itemNoModel("Knockback Module", "knockback_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.KNOCKBACK, null, 1.25))); + public static final ItemDefinition SWEEPING_EDGE_MODULE = itemNoModel("Sweeping Edge Module", "sweeping_edge_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SWEEPING_EDGE, null, 1.5))); + public static final ItemDefinition SHARPNESS_MODULE = itemNoModel("Sharpness Module", "sharpness_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SHARPNESS, null, 1.25))); + public static final ItemDefinition SMITE_MODULE = itemNoModel("Smite Module", "smite_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SMITE, null, 1.25))); + public static final ItemDefinition BANE_OF_ARTHROPODS_MODULE = itemNoModel("Bane of Arthropods Module", "bane_of_arthropods_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.BANE_OF_ARTHROPODS, null, 1.25))); + public static final ItemDefinition EFFICIENCY_MODULE = itemNoModel("Efficiency Module", "efficiency_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.BLOCK_EFFICIENCY, null, 1.25))); + public static final ItemDefinition FORTUNE_MODULE = itemNoModel("Fortune Module", "fortune_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.BLOCK_FORTUNE, null, 2.0))); + public static final ItemDefinition SILK_TOUCH_MODULE = itemNoModel("Silk Touch Module", "silk_touch_module", p -> new Item(p.maxCount(1)), ITEMS_OTHER) + .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SILK_TOUCH, null, 2.0))); public static final ItemDefinition GRAVICHESTPLATE = item("Gravichestplate", "gravichestplate", GraviChestPlateItem::new, ITEMS_OTHER); diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java new file mode 100644 index 000000000..a9fd18536 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java @@ -0,0 +1,22 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +import java.util.IdentityHashMap; +import java.util.Objects; +import net.minecraft.world.item.Item; + +public class CasingRegistry { + private static final IdentityHashMap casings = new IdentityHashMap<>(); + + public static void register(Item item, CasingProperties properties) { + Objects.requireNonNull(item); + Objects.requireNonNull(properties); + casings.put(item, properties); + } + + public static CasingProperties getProperties(Item item) { + return casings.get(item); + } + + public static record CasingProperties(ComponentTier maxComponentTier, int moduleSlots) { + } +} diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java new file mode 100644 index 000000000..231762b15 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java @@ -0,0 +1,8 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +public enum ComponentTier { + LV, + MV, + HV, + EV +} diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java new file mode 100644 index 000000000..455fb4f01 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java @@ -0,0 +1,23 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import java.util.IdentityHashMap; +import java.util.Objects; +import net.minecraft.world.item.Item; + +public class EnergyConverterRegistry { + private static final IdentityHashMap converters = new IdentityHashMap<>(); + + public static void register(Item item, ConverterProperties properties) { + Objects.requireNonNull(item); + Objects.requireNonNull(properties); + converters.put(item, properties); + } + + public static ConverterProperties getProperties(Item item) { + return converters.get(item); + } + + public static record ConverterProperties(ComponentTier tier, long maxEu, EnergyType energyType) { + } +} diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java new file mode 100644 index 000000000..729332fd9 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java @@ -0,0 +1,24 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import java.util.IdentityHashMap; +import java.util.Objects; +import net.minecraft.world.item.Item; +import org.jetbrains.annotations.Nullable; + +public class EnergyStorageRegistry { + private static final IdentityHashMap storages = new IdentityHashMap<>(); + + public static void register(Item item, StorageProperties properties) { + Objects.requireNonNull(item); + Objects.requireNonNull(properties); + storages.put(item, properties); + } + + public static StorageProperties getProperties(Item item) { + return storages.get(item); + } + + public static record StorageProperties(@Nullable ComponentTier tier, long capacity, EnergyType energyType) { + } +} diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java new file mode 100644 index 000000000..664513dc6 --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java @@ -0,0 +1,24 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; +import java.util.IdentityHashMap; +import java.util.Objects; +import net.minecraft.world.item.Item; + +public class HeadRegistry { + private static final IdentityHashMap heads = new IdentityHashMap<>(); + + public static void register(Item item, HeadProperties properties) { + Objects.requireNonNull(item); + Objects.requireNonNull(properties); + heads.put(item, properties); + } + + public static HeadProperties getProperties(Item item) { + return heads.get(item); + } + + public static record HeadProperties(ComponentTier tier, ToolType toolType, int miningLevel, float miningSpeed, + double attackDamage) { + } +} diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java new file mode 100644 index 000000000..1add8114f --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java @@ -0,0 +1,29 @@ +package aztech.modern_industrialization.api.item.modular_tools; + +import java.util.IdentityHashMap; +import java.util.Objects; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.enchantment.Enchantment; +import org.jetbrains.annotations.Nullable; + +public class ModuleRegistry { + private static final IdentityHashMap modules = new IdentityHashMap<>(); + + public static void register(Item item, ModuleProperties properties) { + Objects.requireNonNull(item); + Objects.requireNonNull(properties); + modules.put(item, properties); + } + + public static ModuleProperties getProperties(Item item) { + return modules.get(item); + } + + public static record ModuleProperties(@Nullable Enchantment enchantment, @Nullable CustomModuleEffect customEffect, + double multiplier) { + } + + public static enum CustomModuleEffect { + AREA + } +} diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java index f635e3fa0..2d9fbb151 100644 --- a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java @@ -231,6 +231,12 @@ public static enum EnergyType { ELECTRIC } + public static enum ToolType { + NONE, + DRILL, + CHAINSAW + } + private static class StrippingAccess extends AxeItem { private StrippingAccess(Tier material, float attackDamage, float attackSpeed, Properties settings) { super(material, attackDamage, attackSpeed, settings); diff --git a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java index 158107d53..5c228a0aa 100644 --- a/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java +++ b/src/main/java/aztech/modern_industrialization/materials/MIMaterials.java @@ -29,6 +29,7 @@ import aztech.modern_industrialization.MIItem; import aztech.modern_industrialization.api.energy.CableTier; +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; import aztech.modern_industrialization.compat.kubejs.KubeJSProxy; import aztech.modern_industrialization.machines.init.MIMachineRecipeTypes; import aztech.modern_industrialization.materials.part.*; @@ -178,7 +179,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.MEAN_RGB, 0xFFE650) .set(MaterialProperty.HARDNESS, SOFT) .addParts(BOLT, RING, GEAR, ROD, CURVED_PLATE, DOUBLE_INGOT, DUST, LARGE_PLATE, PLATE, TINY_DUST) - .addParts(DRILL_HEAD, DRILL)) + .addParts(DRILL_HEAD.simple(), DRILL)) ); IRON = MaterialRegistry.addMaterial( @@ -199,7 +200,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(WIRE) .addParts(FINE_WIRE) .addParts(CABLE.of(CableTier.LV)) - .addParts(DRILL_HEAD, DRILL)) + .addParts(DRILL_HEAD.simple(), DRILL)) .cancelRecipes("macerator/ore_to_raw", "forge_hammer/ore_to_raw_metal", "forge_hammer/ore_to_raw_metal_with_tool", "forge_hammer/ore_to_dust_with_tool")); @@ -246,7 +247,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.SET, STONE) .set(MaterialProperty.MEAN_RGB, 0xd20000) .set(MaterialProperty.HARDNESS, SOFT) - .addParts(TINY_DUST, CRUSHED_DUST, BATTERY.of(CableTier.LV)).addMaterialItemParts(MaterialItemPart.external(DUST, "minecraft:redstone", "minecraft:redstone")) + .addParts(TINY_DUST, CRUSHED_DUST, BATTERY.of(CableTier.LV, ComponentTier.LV)).addMaterialItemParts(MaterialItemPart.external(DUST, "minecraft:redstone", "minecraft:redstone")) .addMaterialItemParts(MaterialItemPart.external(BLOCK, "#c:redstone_blocks", "minecraft:redstone_block")) .addMaterialItemParts(MaterialItemPart.external(ORE, "#c:redstone_ores", "minecraft:redstone_ore")) .addMaterialItemParts(MaterialItemPart.external(ORE_DEEPSLATE, "#c:redstone_ores", "minecraft:deepslate_redstone_ore")) @@ -306,7 +307,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.MEAN_RGB, 0xffcc00) .set(MaterialProperty.HARDNESS, SOFT) .addParts(BOLT, BLADE, RING, ROTOR, GEAR, ROD, CURVED_PLATE, DOUBLE_INGOT, DUST, INGOT, LARGE_PLATE, NUGGET, PLATE, TINY_DUST) - .addParts(BLOCK.of(MaterialBlockSet.COPPER)).addParts(TANK.of(4)).addParts(DRILL_HEAD, DRILL) + .addParts(BLOCK.of(MaterialBlockSet.COPPER)).addParts(TANK.of(4)).addParts(DRILL_HEAD.simple(), DRILL) .addParts(BARREL.of(32)).addParts(MACHINE_CASING.of(), MACHINE_CASING_PIPE.of()) .addParts(MACHINE_CASING_SPECIAL.of("Bronze Plated Bricks", "bronze_plated_bricks")) .addRecipes(ForgeHammerRecipes::apply, SmeltingRecipes::apply, StandardRecipes::apply)); @@ -327,10 +328,10 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.SET, METALLIC) .set(MaterialProperty.MEAN_RGB, 0x3f3f3f) .addParts(BOLT, RING, ROD, GEAR, CURVED_PLATE, DOUBLE_INGOT, DUST, INGOT, LARGE_PLATE, NUGGET, PLATE, TINY_DUST) - .addParts(ROD_MAGNETIC).addParts(BLOCK.of(MaterialBlockSet.IRON)).addParts(DRILL_HEAD, DRILL) + .addParts(ROD_MAGNETIC).addParts(BLOCK.of(MaterialBlockSet.IRON)).addParts(DRILL_HEAD.withModularComponent(ComponentTier.LV, 2, 6.0f, 6.0), DRILL) .addParts(MACHINE_CASING.of(), MACHINE_CASING_PIPE.of()).addParts(TANK.of(8)).addParts(BARREL.of(128)) .addMaterialItemParts(MaterialItemPart.external(HAMMER, MIItem.STEEL_HAMMER.getId().toString())) - .addParts(ROTARY_BLADE) + .addParts(ROTARY_BLADE.withModularComponent(ComponentTier.LV, 6.0f, 9.0)) .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.STEEL_TOOL_CASING.getId().toString())) .addRecipes(ForgeHammerRecipes::apply, SmeltingRecipes::apply, StandardRecipes::apply)); @@ -351,9 +352,9 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.MEAN_RGB, 0x3fcaff) .addParts(BOLT, BLADE, RING, ROTOR, GEAR, ROD, CURVED_PLATE, DOUBLE_INGOT, DUST, INGOT, LARGE_PLATE, NUGGET, PLATE, TINY_DUST) .addParts(WIRE).addParts(BLOCK.of(MaterialBlockSet.GOLD)).addParts(MACHINE_CASING.of("Advanced Machine Casing", "advanced_machine_casing")) - .addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING_SPECIAL.of("Frostproof Machine Casing", "frostproof_machine_casing")).addParts(TANK.of(16)) + .addParts(DRILL_HEAD.withModularComponent(ComponentTier.MV, 3, 8.0f, 7.0), DRILL).addParts(MACHINE_CASING_SPECIAL.of("Frostproof Machine Casing", "frostproof_machine_casing")).addParts(TANK.of(16)) .addParts(BARREL.of(512)).addParts(CABLE.of(CableTier.HV)).addRecipes(StandardRecipes::apply) - .addParts(ROTARY_BLADE) + .addParts(ROTARY_BLADE.withModularComponent(ComponentTier.MV, 8.0f, 10.0)) .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.ALUMINUM_TOOL_CASING.getId().toString())) .addRecipes(SmeltingRecipes::applyBlastFurnace)); @@ -396,7 +397,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, 2), NuclearConstant.DESINTEGRATION_BY_ROD * 2))) .addParts(BLOCK.of(MaterialBlockSet.IRON)) - .addParts(ROTARY_BLADE) + .addParts(ROTARY_BLADE.simple()) .addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); CUPRONICKEL = MaterialRegistry.addMaterial(new MaterialBuilder("Cupronickel", "cupronickel") @@ -437,7 +438,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.SET, STONE) .set(MaterialProperty.MEAN_RGB, 0x071CB8) .set(MaterialProperty.HARDNESS, SOFT).addParts(TINY_DUST, DUST).addParts(BLOCK.of(MaterialBlockSet.LAPIS)) - .addParts(BATTERY.of(CableTier.HV)).addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); + .addParts(BATTERY.of(CableTier.HV, ComponentTier.HV)).addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); SALT = MaterialRegistry.addMaterial(new MaterialBuilder("Salt", "salt") .set(MaterialProperty.MAIN_PART, DUST) @@ -456,10 +457,10 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .addParts(BLOCK.of(MaterialBlockSet.NETHERITE)).addParts(RAW_METAL.ofAll(MaterialRawSet.COPPER)).addParts(HOT_INGOT) .addParts(MACHINE_CASING.of( "Highly Advanced Machine Casing", - "highly_advanced_machine_casing")).addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING_PIPE.of()) + "highly_advanced_machine_casing")).addParts(DRILL_HEAD.withModularComponent(ComponentTier.EV, 5, 12.0f, 9.0), DRILL).addParts(MACHINE_CASING_PIPE.of()) .addParts(MACHINE_CASING_SPECIAL.of("Solid Titanium Machine Casing", "solid_titanium_machine_casing")).addParts(ORE.of(MaterialOreSet.IRON)) .addParts(TANK.of(64)).addParts(BARREL.of(8192)) - .addParts(ROTARY_BLADE) + .addParts(ROTARY_BLADE.withModularComponent(ComponentTier.EV, 12.0f, 12.0)) .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.TITANIUM_TOOL_CASING.getId().toString())) .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 128, 400)).cancelRecipes("macerator/raw_metal")); @@ -478,7 +479,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.MEAN_RGB, 0x3C3C50) .set(MaterialProperty.HARDNESS, SOFT) .addParts(ITEM_PURE_METAL) - .addParts(BLOCK.of(MaterialBlockSet.IRON)).addParts(N_DOPED_PLATE, P_DOPED_PLATE).addParts(PLATE, DOUBLE_INGOT, BATTERY.of(CableTier.MV)) + .addParts(BLOCK.of(MaterialBlockSet.IRON)).addParts(N_DOPED_PLATE, P_DOPED_PLATE).addParts(PLATE, DOUBLE_INGOT, BATTERY.of(CableTier.MV, ComponentTier.MV)) .addRecipes(StandardRecipes::apply, SmeltingRecipes::apply)); STAINLESS_STEEL = MaterialRegistry.addMaterial(new MaterialBuilder("Stainless Steel", "stainless_steel") @@ -487,14 +488,14 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.HARDNESS, HARD) .addParts(BLOCK.of(MaterialBlockSet.IRON)) .addParts(BOLT, BLADE, RING, ROTOR, GEAR, ROD, CURVED_PLATE, DOUBLE_INGOT, DUST, INGOT, LARGE_PLATE, NUGGET, PLATE, TINY_DUST) - .addParts(HOT_INGOT).addParts(DRILL_HEAD, DRILL).addParts(MACHINE_CASING.of( + .addParts(HOT_INGOT).addParts(DRILL_HEAD.withModularComponent(ComponentTier.HV, 4, 10.0f, 8.0), DRILL).addParts(MACHINE_CASING.of( "Turbo Machine Casing", "turbo_machine_casing")) .addParts(MACHINE_CASING_PIPE.of()).addParts(MACHINE_CASING_SPECIAL.of( "Clean Stainless Steel Machine Casing", "clean_stainless_steel_machine_casing")) .addParts(ROD_MAGNETIC).addParts(TANK.of(32)).addParts(BARREL.of(4096)) - .addParts(ROTARY_BLADE) + .addParts(ROTARY_BLADE.withModularComponent(ComponentTier.HV, 10.0f, 11.0)) .addMaterialItemParts(MaterialItemPart.external(TOOL_CASING, MIItem.STAINLESS_STEEL_TOOL_CASING.getId().toString())) .addRecipes(StandardRecipes::apply) .addRecipes((ctx) -> SmeltingRecipes.applyBlastFurnace(ctx, true, 32, 400)).cancelRecipes("polarizer/rod_magnetic")); @@ -670,7 +671,7 @@ public static MaterialBuilder addVanillaGem(boolean compressor, String gemPath, .set(MaterialProperty.SET, DULL) .set(MaterialProperty.MEAN_RGB, 0x967224) .set(MaterialProperty.HARDNESS, SOFT) - .addParts(DUST, TINY_DUST, INGOT, PLATE, ROD, DOUBLE_INGOT, BATTERY.of(CableTier.EV)) + .addParts(DUST, TINY_DUST, INGOT, PLATE, ROD, DOUBLE_INGOT, BATTERY.of(CableTier.EV, ComponentTier.EV)) .addParts( new PartTemplate("Control Rod", FUEL_ROD.key) .withRegister((partContext, part, itemPath1, itemId, itemTag, englishName) -> NuclearAbsorbable diff --git a/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java b/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java index 64c6682a5..a4e9fb170 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java @@ -24,7 +24,11 @@ package aztech.modern_industrialization.materials.part; import aztech.modern_industrialization.api.energy.CableTier; +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry.StorageProperties; import aztech.modern_industrialization.items.PortableStorageUnit; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; public class BatteryPart implements PartKeyProvider { @@ -41,7 +45,21 @@ public PartTemplate of(long batteryCapacity) { }); } + public PartTemplate of(long batteryCapacity, ComponentTier componentTier) { + return new PartTemplate("Battery", "battery").withRegister( + (partContext, part, itemPath, itemId, itemTag, englishName) -> { + var item = PartTemplate.createSimpleItem(englishName, itemPath, partContext, part); + PortableStorageUnit.CAPACITY_PER_BATTERY.put(item, batteryCapacity); + EnergyStorageRegistry.register(item, + new StorageProperties(componentTier, batteryCapacity, EnergyType.ELECTRIC)); + }); + } + public PartTemplate of(CableTier tier) { - return of(60 * 20 * tier.getMaxTransfer()); + return of(128 * tier.getMaxTransfer()); + } + + public PartTemplate of(CableTier tier, ComponentTier componentTier) { + return of(128 * tier.getMaxTransfer(), componentTier); } } diff --git a/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java new file mode 100644 index 000000000..e4744adec --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java @@ -0,0 +1,27 @@ +package aztech.modern_industrialization.materials.part; + +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry.HeadProperties; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; + +public class DrillHeadPart implements PartKeyProvider { + @Override + public PartKey key() { + return new PartKey("drill_head"); + } + + public PartTemplate simple() { + return new PartTemplate("Drill Head", "drill_head"); + } + + public PartTemplate withModularComponent(ComponentTier tier, int miningLevel, float miningSpeed, + double attackDamage) { + return new PartTemplate("Drill Head", "drill_head").withRegister( + (partContext, part, itemPath, itemId, itemTag, englishName) -> { + var item = PartTemplate.createSimpleItem(englishName, itemPath, partContext, part); + HeadRegistry.register(item, + new HeadProperties(tier, ToolType.DRILL, miningLevel, miningSpeed, attackDamage)); + }); + } +} 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 ab9076880..2f02312e3 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/MIParts.java @@ -46,8 +46,8 @@ public class MIParts { public static final PartTemplate DOUBLE_INGOT = new PartTemplate("Double Ingot", "double_ingot") .withTexture(new TextureGenParams.DoubleIngot()); - public static final PartTemplate DRILL_HEAD = new PartTemplate("Drill Head", "drill_head"); - public static final PartTemplate ROTARY_BLADE = new PartTemplate("Rotary Blade", "rotary_blade"); + public static final DrillHeadPart DRILL_HEAD = new DrillHeadPart(); + public static final RotaryBladePart ROTARY_BLADE = new RotaryBladePart(); public static final PartTemplate TOOL_CASING = new PartTemplate("Tool Casing", "tool_casing"); public static final PartTemplate DRILL = new PartTemplate("Drill", "drill"); diff --git a/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java new file mode 100644 index 000000000..f9d95f9fa --- /dev/null +++ b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java @@ -0,0 +1,26 @@ +package aztech.modern_industrialization.materials.part; + +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry.HeadProperties; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; + +public class RotaryBladePart implements PartKeyProvider { + @Override + public PartKey key() { + return new PartKey("rotary_blade"); + } + + public PartTemplate simple() { + return new PartTemplate("Rotary Blade", "rotary_blade"); + } + + public PartTemplate withModularComponent(ComponentTier tier, float miningSpeed, double attackDamage) { + return new PartTemplate("Rotary Blade", "rotary_blade").withRegister( + (partContext, part, itemPath, itemId, itemTag, englishName) -> { + var item = PartTemplate.createSimpleItem(englishName, itemPath, partContext, part); + HeadRegistry.register(item, + new HeadProperties(tier, ToolType.CHAINSAW, -1, miningSpeed, attackDamage)); + }); + } +} diff --git a/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java b/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java index 140658cdd..287571b0f 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java @@ -28,11 +28,14 @@ import aztech.modern_industrialization.MIBlock; import aztech.modern_industrialization.MIIdentifier; import aztech.modern_industrialization.MITags; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry.StorageProperties; import aztech.modern_industrialization.blocks.storage.StorageBehaviour; import aztech.modern_industrialization.blocks.storage.tank.*; import aztech.modern_industrialization.datagen.tag.TagsToGenerate; import aztech.modern_industrialization.definition.BlockDefinition; import aztech.modern_industrialization.items.SortOrder; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; import aztech.modern_industrialization.proxy.CommonProxy; import java.util.Optional; import java.util.function.BiConsumer; @@ -56,8 +59,10 @@ public class TankPart implements PartKeyProvider { public static final BiConsumer MODEL_GENERATOR = (block, gen) -> { var textureSlot = TextureSlot.create("0"); - var mapping = TextureMapping.singleSlot(textureSlot, new MIIdentifier("block/" + BuiltInRegistries.BLOCK.getKey(block).getPath())); - gen.createTrivialBlock(block, mapping, new ModelTemplate(Optional.of(new MIIdentifier("base/tank")), Optional.empty(), textureSlot)); + var mapping = TextureMapping.singleSlot(textureSlot, + new MIIdentifier("block/" + BuiltInRegistries.BLOCK.getKey(block).getPath())); + gen.createTrivialBlock(block, mapping, + new ModelTemplate(Optional.of(new MIIdentifier("base/tank")), Optional.empty(), textureSlot)); }; @Override @@ -73,7 +78,8 @@ public PartTemplate of(long bucketCapacity) { return of(new PartEnglishNameFormatter.Default("Tank"), bucketCapacity, null); } - public PartTemplate of(PartEnglishNameFormatter englishNameFormatter, long bucketCapacity, @Nullable String maybePathOverridden) { + public PartTemplate of(PartEnglishNameFormatter englishNameFormatter, long bucketCapacity, + @Nullable String maybePathOverridden) { MutableObject> bet = new MutableObject<>(); long capacity = FluidConstants.BUCKET * bucketCapacity; @@ -109,8 +115,12 @@ public PartTemplate of(PartEnglishNameFormatter englishNameFormatter, long bucke FluidStorage.SIDED.registerSelf(bet.getValue()); item.registerItemApi(); - CommonProxy.INSTANCE.registerPartTankClient(block, item, partContext.getMaterialName(), itemPath, bet.getValue(), + CommonProxy.INSTANCE.registerPartTankClient(block, item, partContext.getMaterialName(), itemPath, + bet.getValue(), partContext.get(MEAN_RGB)); + + EnergyStorageRegistry.register(item, + new StorageProperties(null, capacity * 1000, EnergyType.FLUID)); }); if (maybePathOverridden != null) { From e7ce44679bb079f2664ca64a2df283b6790d246c Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sat, 28 Oct 2023 16:52:04 -0700 Subject: [PATCH 08/18] Tool station now adds and removes components from tool --- .../modern_industrialization/MIItem.java | 40 ++- .../api/item/modular_tools/ComponentTier.java | 15 +- .../toolstation/ToolStationScreenHandler.java | 280 ++++++++++++++++-- .../items/modular_tools/ModularToolItem.java | 60 ++++ 4 files changed, 353 insertions(+), 42 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index 3f9c233da..c969f9ff7 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -158,14 +158,26 @@ public final class MIItem { public static final ItemDefinition STEAM_MINING_DRILL = itemHandheld("Steam Mining Drill", "steam_mining_drill",SteamDrillItem::new); - public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", (p) -> new ModularToolItem(p)) - .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.LV, 2))); - public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", (p) -> new ModularToolItem(p)) - .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.MV, 3))); - public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", (p) -> new ModularToolItem(p)) - .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.HV, 4))); - public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", (p) -> new ModularToolItem(p)) - .withItemRegistrationEvent(item -> CasingRegistry.register(item, new CasingProperties(ComponentTier.EV, 5))); + public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", ModularToolItem::new) + .withItemRegistrationEvent(item -> { + CasingRegistry.register(item, new CasingProperties(ComponentTier.LV, 2)); + // TODO: fluid and energy storage registration + }); + public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", ModularToolItem::new) + .withItemRegistrationEvent(item -> { + CasingRegistry.register(item, new CasingProperties(ComponentTier.MV, 3)); + // TODO: fluid and energy storage registration + }); + public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", ModularToolItem::new) + .withItemRegistrationEvent(item -> { + CasingRegistry.register(item, new CasingProperties(ComponentTier.HV, 4)); + // TODO: fluid and energy storage registration + }); + public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", ModularToolItem::new) + .withItemRegistrationEvent(item -> { + CasingRegistry.register(item, new CasingProperties(ComponentTier.EV, 5)); + // TODO: fluid and energy storage registration + }); // public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); @@ -249,15 +261,19 @@ public static ItemDefinition item( } public static ItemDefinition item(String englishName, String path, SortOrder sortOrder) { - return MIItem.item(englishName, path, Item::new, (item, modelGenerator) -> modelGenerator.generateFlatItem(item, - ModelTemplates.FLAT_ITEM), sortOrder); + return MIItem.item(englishName, path, Item::new, + (item, modelGenerator) -> modelGenerator.generateFlatItem(item, + ModelTemplates.FLAT_ITEM), + sortOrder); } public static ItemDefinition item(String englishName, String path, Function ctor, SortOrder sortOrder) { - return MIItem.item(englishName, path, ctor, (item, modelGenerator) -> modelGenerator.generateFlatItem(item, - ModelTemplates.FLAT_ITEM), sortOrder); + return MIItem.item(englishName, path, ctor, + (item, modelGenerator) -> modelGenerator.generateFlatItem(item, + ModelTemplates.FLAT_ITEM), + sortOrder); } public static ItemDefinition itemHandheld(String englishName, String path) { diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java index 231762b15..5df9e64bb 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java @@ -1,8 +1,21 @@ package aztech.modern_industrialization.api.item.modular_tools; +import org.jetbrains.annotations.Nullable; + public enum ComponentTier { LV, MV, HV, - EV + EV; + + public static boolean canUse(@Nullable ComponentTier maxComponentTier, + @Nullable ComponentTier potentialComponentTier) { + if (maxComponentTier == null) { + return false; + } else if (potentialComponentTier == null) { + return true; + } else { + return maxComponentTier.compareTo(potentialComponentTier) >= 0; + } + } } diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java index 05d49735b..21dace5c4 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -24,8 +24,18 @@ package aztech.modern_industrialization.blocks.toolstation; import aztech.modern_industrialization.ModernIndustrialization; +import aztech.modern_industrialization.api.item.modular_tools.CasingRegistry; +import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; +import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry; +import aztech.modern_industrialization.items.modular_tools.ModularToolItem; import java.util.ArrayList; import java.util.List; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.Container; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; @@ -39,17 +49,17 @@ public class ToolStationScreenHandler extends AbstractContainerMenu { public final Slot tool; - public final Slot energyConverter; - public final Slot energyStorage; - public final Slot head; - public final List addons; + public final SingleItemToggelableSlot energyConverter; + public final SingleItemToggelableSlot energyStorage; + public final SingleItemToggelableSlot head; + public final List addons; private final DataSlot numAddonSlots; private final DataSlot componentsEnabled; private final ContainerLevelAccess context; private final Level world; private final Player player; - private long lastSoundTime = 0; + private boolean isUpdating; public ToolStationScreenHandler(int syncId, Inventory playerInventory) { this(syncId, playerInventory, ContainerLevelAccess.NULL); @@ -60,41 +70,54 @@ public ToolStationScreenHandler(int syncId, Inventory playerInventory, Container this.context = context; this.world = playerInventory.player.level(); this.player = playerInventory.player; - - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 9; j++) { - this.addSlot(new Slot(playerInventory, i * 9 + j + 9, 8 + j * 18, 84 + i * 18)); - } - } - - for (int j = 0; j < 9; j++) { - this.addSlot(new Slot(playerInventory, j, 8 + j * 18, 58 + 84)); - } + this.isUpdating = false; this.tool = new SingleItemSlot(new SimpleContainer(1) { public void setChanged() { super.setChanged(); ToolStationScreenHandler.this.slotsChanged(this); } - }, 0, 17, 33); - this.energyConverter = new SingleItemSlot(new SimpleContainer(1) { + }, 0, 17, 33) { + public boolean mayPlace(ItemStack stack) { + return CasingRegistry.getProperties(stack.getItem()) != null; + } + }; + this.energyConverter = new SingleItemToggelableSlot(new SimpleContainer(1) { public void setChanged() { super.setChanged(); ToolStationScreenHandler.this.slotsChanged(this); } - }, 0, 44, 24); - this.energyStorage = new SingleItemSlot(new SimpleContainer(1) { + }, 0, 44, 24) { + public boolean mayPlace(ItemStack stack) { + var properties = EnergyConverterRegistry.getProperties(stack.getItem()); + return isActive() && properties != null + && ComponentTier.canUse(getMaxComponentTier(), properties.tier()); + } + }; + this.energyStorage = new SingleItemToggelableSlot(new SimpleContainer(1) { public void setChanged() { super.setChanged(); ToolStationScreenHandler.this.slotsChanged(this); } - }, 0, 62, 24); - this.head = new SingleItemSlot(new SimpleContainer(1) { + }, 0, 62, 24) { + public boolean mayPlace(ItemStack stack) { + var properties = EnergyStorageRegistry.getProperties(stack.getItem()); + return isActive() && properties != null + && ComponentTier.canUse(getMaxComponentTier(), properties.tier()); + } + }; + this.head = new SingleItemToggelableSlot(new SimpleContainer(1) { public void setChanged() { super.setChanged(); ToolStationScreenHandler.this.slotsChanged(this); } - }, 0, 80, 24); + }, 0, 80, 24) { + public boolean mayPlace(ItemStack stack) { + var properties = HeadRegistry.getProperties(stack.getItem()); + return isActive() && properties != null + && ComponentTier.canUse(getMaxComponentTier(), properties.tier()); + } + }; this.addons = new ArrayList<>(); for (int idx = 0; idx < 5; ++idx) { this.addons.add(new ToggleableSlot(new SimpleContainer(1) { @@ -102,7 +125,16 @@ public void setChanged() { super.setChanged(); ToolStationScreenHandler.this.slotsChanged(this); } - }, 0, 44 + idx * 18, 42)); + }, 0, 44 + idx * 18, 42) { + public boolean mayPlace(ItemStack stack) { + for (var addon : ToolStationScreenHandler.this.addons) { + if (addon != this && addon.hasItem() && addon.getItem().getItem() == stack.getItem()) { + return false; + } + } + return isActive() && ModuleRegistry.getProperties(stack.getItem()) != null; + } + }); } this.numAddonSlots = DataSlot.standalone(); this.numAddonSlots.set(0); @@ -118,15 +150,155 @@ public void setChanged() { } this.addDataSlot(numAddonSlots); this.addDataSlot(componentsEnabled); + + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(playerInventory, i * 9 + j + 9, 8 + j * 18, 84 + i * 18)); + } + } + + for (int j = 0; j < 9; j++) { + this.addSlot(new Slot(playerInventory, j, 8 + j * 18, 58 + 84)); + } + } + + private ComponentTier getMaxComponentTier() { + if (!tool.hasItem()) { + return null; + } + return CasingRegistry.getProperties(tool.getItem().getItem()).maxComponentTier(); + } public void slotsChanged(Container inventory) { - if (inventory == tool) { - // TODO: populate slots accordingly - } else if (tool.hasItem()) { - // TODO: update tool item + if (isUpdating) { + return; + } else { + isUpdating = true; + } + + try { + if (inventory == tool.container) { + if (tool.hasItem()) { + ItemStack toolStack = tool.getItem(); + int casingAddonSlots = CasingRegistry.getProperties(toolStack.getItem()).moduleSlots(); + + numAddonSlots.set(casingAddonSlots); + componentsEnabled.set(1); + + energyConverter.container.clearContent(); + energyConverter.setActive(true); + energyStorage.container.clearContent(); + energyStorage.setActive(true); + head.container.clearContent(); + head.setActive(true); + for (ToggleableSlot slot : this.addons) { + slot.container.clearContent(); + } + for (int idx = 0; idx < casingAddonSlots; ++idx) { + this.addons.get(idx).setActive(true); + } + + if (toolStack.hasTag()) { + CompoundTag tag = toolStack.getTag(); + + String energyConverterId = tag.getString("energyConverter"); + if (!energyConverterId.equals("")) { + energyConverter.set(new ItemStack(BuiltInRegistries.ITEM + .get(new ResourceLocation(energyConverterId)))); + } + + String energyStorageId = tag.getString("energyStorage"); + if (!energyStorageId.equals("")) { + energyStorage.set(new ItemStack(BuiltInRegistries.ITEM + .get(new ResourceLocation(energyStorageId)))); + } + + String headId = tag.getString("head"); + if (!headId.equals("")) { + head.set(new ItemStack(BuiltInRegistries.ITEM + .get(new ResourceLocation(headId)))); + } + + CompoundTag addonsTag = tag.getCompound("addons"); + for (int idx = 0; idx < casingAddonSlots; ++idx) { + if (addonsTag.contains(Integer.toString(idx))) { + CompoundTag addonTag = addonsTag.getCompound(Integer.toString(idx)); + addons.get(idx) + .set(new ItemStack( + BuiltInRegistries.ITEM + .get(new ResourceLocation(addonTag.getString("id"))), + addonTag.getInt("amount"))); + } + } + } + } else { + numAddonSlots.set(0); + componentsEnabled.set(0); + + energyConverter.container.clearContent(); + energyConverter.setActive(false); + energyStorage.container.clearContent(); + energyStorage.setActive(false); + head.container.clearContent(); + head.setActive(false); + for (ToggleableSlot slot : this.addons) { + slot.container.clearContent(); + slot.setActive(false); + } + } + } else { + ItemStack toolStack = tool.getItem(); + CompoundTag tag = toolStack.getOrCreateTag(); + if (inventory == energyConverter.container) { + if (energyConverter.hasItem()) { + tag.putString("energyConverter", + BuiltInRegistries.ITEM.getKey(energyConverter.getItem().getItem()).toString()); + } else { + tag.remove("energyConverter"); + } + } else if (inventory == energyStorage.container) { + if (energyStorage.hasItem()) { + tag.putString("energyStorage", + BuiltInRegistries.ITEM.getKey(energyStorage.getItem().getItem()).toString()); + } else { + tag.remove("energyStorage"); + } + } else if (inventory == head.container) { + if (head.hasItem()) { + tag.putString("head", + BuiltInRegistries.ITEM.getKey(head.getItem().getItem()).toString()); + } else { + tag.remove("head"); + } + } else { + // must be one of the addon slots + for (int idx = 0; idx < addons.size(); ++idx) { + Container addonSlot = addons.get(idx).container; + if (inventory == addonSlot) { + if (!tag.contains("addons")) { + tag.put("addons", new CompoundTag()); + } + CompoundTag addonsTag = tag.getCompound("addons"); + if (addonSlot.isEmpty()) { + addonsTag.remove(Integer.toString(idx)); + } else { + CompoundTag addonTag = new CompoundTag(); + addonTag.putString("id", + BuiltInRegistries.ITEM.getKey(addonSlot.getItem(0).getItem()).toString()); + addonTag.putInt("amount", addonSlot.getItem(0).getCount()); + addonsTag.put(Integer.toString(idx), addonTag); + } + } + } + } + + ModularToolItem.rebuildTool(toolStack); + } + super.slotsChanged(inventory); + } finally { + isUpdating = false; } - super.slotsChanged(inventory); } public int getNumAddonSlots() { @@ -144,7 +316,47 @@ public boolean stillValid(Player player) { @Override public ItemStack quickMoveStack(Player player, int index) { - return ItemStack.EMPTY; + ItemStack moved = ItemStack.EMPTY; + Slot slot = slots.get(index); + if (slot != null && slot.hasItem()) { + ItemStack inSlot = slot.getItem(); + moved = inSlot.copy(); + if (index >= 0 && index <= 8) { + if (!this.moveItemStackTo(inSlot, 9, 9 + 36, true)) { + return ItemStack.EMPTY; + } + } else { + // try to put it in an input slot + boolean inserted = false; + for (int idx = 0; idx < 9; ++idx) { + if (slots.get(idx).mayPlace(inSlot) && this.moveItemStackTo(inSlot, idx, idx + 1, false)) { + inserted = true; + } + } + if (!inserted) { + // move between player inventory and player hotbar + if (index < 9 + 27) { + if (!this.moveItemStackTo(inSlot, 9 + 27, 9 + 27 + 9, false)) { + return ItemStack.EMPTY; + } + } else { + if (!this.moveItemStackTo(inSlot, 9, 9 + 27, false)) { + return ItemStack.EMPTY; + } + } + } + } + if (inSlot.isEmpty()) { + slot.setByPlayer(ItemStack.EMPTY); + } else { + slot.setChanged(); + } + if (inSlot.getCount() == moved.getCount()) { + return ItemStack.EMPTY; + } + slot.onTake(player, inSlot); + } + return moved; } public void removed(Player player) { @@ -182,4 +394,14 @@ public void setActive(boolean active) { this.active = active; } } + + private static class SingleItemToggelableSlot extends ToggleableSlot { + public SingleItemToggelableSlot(Container container, int slot, int x, int y) { + super(container, slot, x, y); + } + + public int getMaxStackSize() { + return 1; + } + } } diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java index 2d9fbb151..cb1fe5c1e 100644 --- a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java @@ -24,6 +24,7 @@ package aztech.modern_industrialization.items.modular_tools; import aztech.modern_industrialization.api.FluidFuelRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry; import aztech.modern_industrialization.items.DynamicEnchantmentItem; import aztech.modern_industrialization.items.DynamicToolItem; import aztech.modern_industrialization.items.FluidFuelItemHelper; @@ -31,13 +32,16 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; import it.unimi.dsi.fastutil.objects.Reference2IntMap; +import java.util.ArrayList; import java.util.List; import java.util.Map; import net.fabricmc.fabric.api.mininglevel.v1.MiningLevelManager; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.EquipmentSlot; @@ -87,12 +91,14 @@ public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity atta @Override public boolean isSuitableFor(ItemStack stack, BlockState state) { + // TODO: consider tool type int requiredLevel = MiningLevelManager.getRequiredMiningLevel(state); return requiredLevel <= toolLevel(stack) && hasEnoughEnergy(stack) && isSupportedBlock(stack, state); } @Override public float getDestroySpeed(ItemStack stack, BlockState state) { + // TODO: inline getMiningSpeedMultiplier if (isSupportedBlock(stack, state)) { return getMiningSpeedMultiplier(stack); } @@ -101,6 +107,8 @@ public float getDestroySpeed(ItemStack stack, BlockState state) { @Override public Multimap getAttributeModifiers(ItemStack stack, EquipmentSlot slot) { + // TODO: inline getAttackDamage + if (slot == EquipmentSlot.MAINHAND && hasEnoughEnergy(stack)) { return ItemHelper.createToolModifiers(getAttackDamage(stack)); } @@ -119,6 +127,7 @@ public boolean isBarVisible(ItemStack stack) { @Override public int getBarWidth(ItemStack stack) { + // TODO: inline getDurabilityBarProgress return (int) Math.round(getDurabilityBarProgress(stack) * 13); } @@ -141,6 +150,52 @@ public InteractionResult interactLivingEntity(ItemStack stack, Player player, Li return InteractionResult.PASS; } + public static void rebuildTool(ItemStack stack) { + Item energyConverter = getComponent(stack, "energyConverter"); + Item energyStorage = getComponent(stack, "energyStorage"); + Item head = getComponent(stack, "head"); + List modules = getAddons(stack); + + // clear current energy storage + SimpleEnergyItem.setStoredEnergyUnchecked(stack, 0); + FluidFuelItemHelper.setAmount(stack, 0); + + // set new energy type + EnergyType converterType = EnergyConverterRegistry.getProperties(energyConverter) + .energyType(); + EnergyType storageType = EnergyConverterRegistry.getProperties(energyStorage) + .energyType(); + if (converterType == storageType) { + ModularToolItem.setEnergyType(stack, converterType); + } else { + ModularToolItem.setEnergyType(stack, EnergyType.NONE); + } + } + + private static Item getComponent(ItemStack stack, String componentName) { + String componentId = stack.getTag().getString(componentName); + if (componentId.equals("")) { + return null; + } + return BuiltInRegistries.ITEM.get(new ResourceLocation(componentId)); + } + + private static List getAddons(ItemStack stack) { + List addons = new ArrayList<>(5); + CompoundTag addonsTag = stack.getTag().getCompound("addons"); + for (int idx = 0; idx < addons.size(); ++idx) { + String addonId = addonsTag.getString(Integer.toString(idx)); + if (addonId.equals("")) { + addons.set(idx, null); + } else { + addons.set(idx, BuiltInRegistries.ITEM.get(new ResourceLocation(addonId))); + } + } + return addons; + } + + // ---------------------------------------------- + /** * get energy capacity, in EU or in mB, depending on energy storage module */ @@ -225,6 +280,11 @@ public static EnergyType getEnergyType(ItemStack stack) { } } + public static void setEnergyType(ItemStack stack, EnergyType energyType) { + CompoundTag tag = stack.getOrCreateTag(); + tag.putByte("energyType", (byte) energyType.ordinal()); + } + public static enum EnergyType { NONE, FLUID, From f4d9721b101ab21c28ff162bff0a49ef8d98869c Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 17:38:23 -0700 Subject: [PATCH 09/18] Add documentation to guidebook --- .../en_us/entries/electric_age/jetpack.json | 2 +- .../entries/electric_age/modular_tools.json | 88 +++++++++++++++++++ .../recipes/{ => tools}/tool_station.json | 0 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json rename src/main/resources/data/modern_industrialization/recipes/{ => tools}/tool_station.json (100%) diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json index 6d10efda2..bf1ea9739 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/jetpack.json @@ -1,5 +1,5 @@ { - "name": "Diesel Jetpack and Tools", + "name": "Diesel Jetpack", "category": "modern_industrialization:electric_age", "icon": "modern_industrialization:diesel_jetpack", "pages": [ diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json new file mode 100644 index 000000000..c51d752a9 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json @@ -0,0 +1,88 @@ +{ + "name": "Modular Tools", + "category": "modern_industrialization:electric_age", + "icon": "modern_industrialization:steel_tool_casing", + + "pages": [ + { + "type": "text", + "text": "Electricity isn't just useful in machines - you can power customizable tools with it too!" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/tool_station", + "text": "Unfortunately, you can't customize those tools in the field - you'll need a tool station to install, remove, or modify components of your tools. Be careful - the tool station will drain any energy or fuel stored in a tool when you make modifications." + }, + { + "type": "crafting", + "recipe": "modern_industrialization:materials/steel/craft/tool_casing", + "text": "The tool casing is the foundation of any modular tool. It comes in steel (shown above), aluminum, stainless steel, and titanium versions.$(br2)You can also make these in assemblers to save on the bolts." + }, + { + "type": "text", + "text": "Your tool casing determines the maximum tier of component you can install, and the number of upgrade modules. Steel casings support tier 1 components and up to two modules, aluminium casings support up to tier 2 and up to 3 modules, stainless steel casings support up to tier 3 and up to 4 modules, and titanium casings support up to tier 4 and up to 5 modules." + }, + { + "type": "spotlight", + "item": { + "item": "modern_industrialization:motor" + }, + "title": "Motors", + "text": "All tools require an motor to convert their stored energy into useful work. This is either a motor (of any kind) for an electric tool or a pump (of any kind) for a liquid-fuelled tool." + }, + { + "type": "spotlight", + "item": { + "item": "modern_industrialization:redstone_battery" + }, + "title": "Energy Storage", + "text": "Your tool also requires some energy storage - either a single battery (except for plutonium batteries) for electric tools or any tank for liquid-fuelled tools.$(br2)As an exception to the usual tier system, you can install any tank in any casing." + }, + { + "type": "spotlight", + "item": { + "item": "modern_industrialization:steel_drill_head" + }, + "title": "Tool Head", + "text": "Finally, your tool's head determines the kind of tool it is - a drill head for a drill and a rotary blade for a chainsaw." + }, + { + "type": "spotlight", + "item": { + "item": "modern_industrialization:area_module" + }, + "title": "Modules", + "text": "You can optionally install upgrade modules to change your tool's properties, for example, adding a fortune or a silk touch module, or even an area module." + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/area_module", + "recipe2": "modern_industrialization:tools/fire_aspect_module" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/looting_module", + "recipe2": "modern_industrialization:tools/knockback_module" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/sweeping_edge_module", + "recipe2": "modern_industrialization:tools/sharpness_module" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/smite_module", + "recipe2": "modern_industrialization:tools/bane_of_arthropods_module" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/efficiency_module", + "recipe2": "modern_industrialization:tools/fortune_module" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/silk_touch_module" + } + ], + "sortnum": 111 +} \ No newline at end of file diff --git a/src/main/resources/data/modern_industrialization/recipes/tool_station.json b/src/main/resources/data/modern_industrialization/recipes/tools/tool_station.json similarity index 100% rename from src/main/resources/data/modern_industrialization/recipes/tool_station.json rename to src/main/resources/data/modern_industrialization/recipes/tools/tool_station.json From 95e23b140dba203ed1eb1b9e635fea3e37d14ebf Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 17:39:10 -0700 Subject: [PATCH 10/18] Implement the actual modular tools --- .../modern_industrialization/MIItem.java | 17 +- .../items/ItemHelper.java | 2 +- .../items/modular_tools/ModularToolItem.java | 498 ++++++++++++++---- 3 files changed, 406 insertions(+), 111 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index c969f9ff7..d905be7d8 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -161,29 +161,28 @@ public final class MIItem { public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", ModularToolItem::new) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.LV, 2)); - // TODO: fluid and energy storage registration + FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); + EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", ModularToolItem::new) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.MV, 3)); - // TODO: fluid and energy storage registration + FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); + EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", ModularToolItem::new) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.HV, 4)); - // TODO: fluid and energy storage registration + FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); + EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", ModularToolItem::new) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.EV, 5)); - // TODO: fluid and energy storage registration + FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); + EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); - // public static final ItemDefinition DIESEL_MINING_DRILL = itemHandheld("Diesel Mining Drill", "diesel_mining_drill", s -> new DieselToolItem(s, 7)) - // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); - // public static final ItemDefinition DIESEL_CHAINSAW = itemHandheld("Diesel Chainsaw", "diesel_chainsaw", p -> new DieselToolItem(p, 12)) - // .withItemRegistrationEvent((item) -> FluidStorage.ITEM.registerForItems((stack, ctx) -> new FluidFuelItemHelper.ItemStorage(DieselToolItem.CAPACITY, ctx), item)); - public static final ItemDefinition PORTABLE_STORAGE_UNIT = itemHandheld("Portable Storage Unit", "portable_storage_unit", PortableStorageUnit::new) .withItemRegistrationEvent(item -> EnergyApi.ITEM.registerForItems((stack, ctx) -> SimpleEnergyItem.createStorage(ctx, item.getEnergyCapacity(stack), item.getEnergyMaxInput(stack), item.getEnergyMaxOutput(stack)), item)); diff --git a/src/main/java/aztech/modern_industrialization/items/ItemHelper.java b/src/main/java/aztech/modern_industrialization/items/ItemHelper.java index 824fb8ae7..a97714970 100644 --- a/src/main/java/aztech/modern_industrialization/items/ItemHelper.java +++ b/src/main/java/aztech/modern_industrialization/items/ItemHelper.java @@ -35,7 +35,7 @@ public final class ItemHelper { public static Multimap createToolModifiers(double damage) { return ImmutableMultimap.of(Attributes.ATTACK_DAMAGE, - new AttributeModifier(TOOL_UUID, "MI Diesel Tool Item", damage, AttributeModifier.Operation.ADDITION)); + new AttributeModifier(TOOL_UUID, "MI Modular Tool Item", damage, AttributeModifier.Operation.ADDITION)); } private ItemHelper() { diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java index cb1fe5c1e..1f88ea4da 100644 --- a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java @@ -25,33 +25,60 @@ import aztech.modern_industrialization.api.FluidFuelRegistry; import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry.ConverterProperties; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; +import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry.StorageProperties; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; +import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry.HeadProperties; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry.CustomModuleEffect; +import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry.ModuleProperties; +import aztech.modern_industrialization.fluid.MIFluid; import aztech.modern_industrialization.items.DynamicEnchantmentItem; import aztech.modern_industrialization.items.DynamicToolItem; import aztech.modern_industrialization.items.FluidFuelItemHelper; import aztech.modern_industrialization.items.ItemHelper; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; +import com.mojang.datafixers.util.Pair; +import dev.draylar.magna.api.MagnaTool; +import it.unimi.dsi.fastutil.objects.Reference2IntArrayMap; import it.unimi.dsi.fastutil.objects.Reference2IntMap; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.function.Consumer; +import java.util.function.Predicate; +import net.fabricmc.fabric.api.mininglevel.v1.FabricMineableTags; import net.fabricmc.fabric.api.mininglevel.v1.MiningLevelManager; +import net.fabricmc.fabric.api.transfer.v1.context.ContainerItemContext; import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant; +import net.fabricmc.fabric.api.transfer.v1.item.ItemVariant; +import net.fabricmc.fabric.api.transfer.v1.storage.base.SingleVariantItemStorage; +import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; +import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext; import net.minecraft.core.BlockPos; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.BlockTags; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.Shearable; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.AxeItem; +import net.minecraft.world.item.HoeItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.item.Rarity; import net.minecraft.world.item.ShovelItem; import net.minecraft.world.item.Tier; @@ -61,11 +88,16 @@ import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RotatedPillarBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.gameevent.GameEvent; import net.minecraft.world.level.material.Fluids; import team.reborn.energy.api.base.SimpleEnergyItem; -public class ModularToolItem extends Item implements Vanishable, DynamicEnchantmentItem, DynamicToolItem { +public class ModularToolItem extends Item implements Vanishable, DynamicEnchantmentItem, DynamicToolItem, MagnaTool { + public static final long BASE_ENERGY_CONSUMPTION = 32; + private static final ItemStack SHEAR_STACK = new ItemStack(Items.SHEARS); + public ModularToolItem(Properties settings) { super(settings.stacksTo(1).rarity(Rarity.UNCOMMON)); } @@ -91,33 +123,61 @@ public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity atta @Override public boolean isSuitableFor(ItemStack stack, BlockState state) { - // TODO: consider tool type int requiredLevel = MiningLevelManager.getRequiredMiningLevel(state); - return requiredLevel <= toolLevel(stack) && hasEnoughEnergy(stack) && isSupportedBlock(stack, state); + return requiredLevel <= getHeadProps(stack).flatMap(props -> Optional.of(props.miningLevel())).orElse(-1) + && hasEnoughEnergy(stack) && isSupportedBlock(stack, state); + } + + @Override + public boolean isSupportedBlock(ItemStack stack, BlockState state) { + switch (getToolType(stack)) { + case DRILL: { + return state.is(BlockTags.MINEABLE_WITH_PICKAXE) || state.is(BlockTags.MINEABLE_WITH_SHOVEL); + } + case CHAINSAW: { + return state.is(BlockTags.MINEABLE_WITH_AXE) + || (state.is(FabricMineableTags.SHEARS_MINEABLE) + || Items.SHEARS.getDestroySpeed(SHEAR_STACK, state) > 1.0f) + || state.is(FabricMineableTags.SWORD_MINEABLE) + || state.is(BlockTags.MINEABLE_WITH_HOE); + } + default: { + return false; + } + } } @Override public float getDestroySpeed(ItemStack stack, BlockState state) { - // TODO: inline getMiningSpeedMultiplier if (isSupportedBlock(stack, state)) { - return getMiningSpeedMultiplier(stack); + return getHeadProps(stack).map(props -> props.miningSpeed()).orElse(0.0f); } - return 1; + return 0.0f; } @Override public Multimap getAttributeModifiers(ItemStack stack, EquipmentSlot slot) { - // TODO: inline getAttackDamage - if (slot == EquipmentSlot.MAINHAND && hasEnoughEnergy(stack)) { - return ItemHelper.createToolModifiers(getAttackDamage(stack)); + return ItemHelper.createToolModifiers(getHeadProps(stack).map(props -> props.attackDamage()).orElse(0.0)); } return ImmutableMultimap.of(); } @Override public void appendHoverText(ItemStack stack, Level world, List tooltip, TooltipFlag context) { - // TODO: if fluid fuelled, add fluid tooltip; else add EU tooltip + switch (getEnergyType(stack)) { + case FLUID: { + FluidFuelItemHelper.appendTooltip(stack, tooltip, getCapacity(stack) / 1000); + break; + } + case ELECTRIC: { + // TODO: report EU inside + break; + } + default: { + break; + } + } } @Override @@ -127,88 +187,223 @@ public boolean isBarVisible(ItemStack stack) { @Override public int getBarWidth(ItemStack stack) { - // TODO: inline getDurabilityBarProgress - return (int) Math.round(getDurabilityBarProgress(stack) * 13); + switch (getEnergyType(stack)) { + case FLUID: { + return (int) Math + .round(13.0 * 1000.0 * (double) FluidFuelItemHelper.getAmount(stack) + / (double) getCapacity(stack)); + } + case ELECTRIC: { + return (int) Math.round( + 13.0 * (double) SimpleEnergyItem.getStoredEnergyUnchecked(stack) / (double) getCapacity(stack)); + } + default: { + return 0; + } + } + } + + @Override + public int getBarColor(ItemStack stack) { + switch (getEnergyType(stack)) { + case FLUID: { + if (FluidFuelItemHelper.getFluid(stack).getFluid() instanceof MIFluid cf) { + return cf.color; + } + break; + } + case ELECTRIC: { + return 0xff0000; + } + default: { + break; + } + } + return 0; } @Override public InteractionResult useOn(UseOnContext context) { - // TOOD: add handling for stripping, pathing, and tilling, depending on head - return InteractionResult.PASS; + ItemStack stack = context.getItemInHand(); + Level w = context.getLevel(); + BlockPos pos = context.getClickedPos(); + BlockState state = w.getBlockState(pos); + Player player = context.getPlayer(); + + if (hasEnoughEnergy(stack)) { + switch (getToolType(stack)) { + case DRILL: { + BlockState newState = PathingAccess.getPathStates().get(state.getBlock()); + if (newState != null) { + w.playSound(player, pos, SoundEvents.SHOVEL_FLATTEN, SoundSource.BLOCKS, 1, 1); + if (!w.isClientSide) { + w.setBlock(pos, newState, 11); + consumeEnergy(stack); + } + return InteractionResult.sidedSuccess(w.isClientSide); + } + break; + } + case CHAINSAW: { + Block newBlock = StrippingAccess.getStrippedBlocks().get(state.getBlock()); + if (newBlock != null) { + w.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1, 1); + if (!w.isClientSide) { + w.setBlock(pos, newBlock.defaultBlockState().setValue(RotatedPillarBlock.AXIS, + state.getValue(RotatedPillarBlock.AXIS)), 11); + consumeEnergy(stack); + } + return InteractionResult.sidedSuccess(w.isClientSide); + } + var pair = HoeItem.TILLABLES.get(state.getBlock()); + if (pair != null) { + Predicate predicate = pair.getFirst(); + Consumer consumer = pair.getSecond(); + if (predicate.test(context)) { + w.playSound(player, pos, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1.0F, 1.0F); + if (!w.isClientSide) { + consumer.accept(context); + consumeEnergy(stack); + } + + return InteractionResult.sidedSuccess(w.isClientSide); + } + } + break; + } + default: { + break; + } + } + } + return super.useOn(context); } @Override public Reference2IntMap getEnchantments(ItemStack stack) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getEnchantments'"); + var map = new Reference2IntArrayMap(); + for (var addon : getAddonProps(stack)) { + if (addon.isPresent() && addon.get().getFirst().enchantment() != null) { + Enchantment enchantment = addon.get().getFirst().enchantment(); + map.put(enchantment, addon.get().getSecond() + map.getOrDefault(enchantment, 0)); + } + } + return map; } @Override public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity interactionTarget, InteractionHand usedHand) { - // TODO: add handling for shearing, depending on head + if (hasEnoughEnergy(stack)) { + if (getToolType(stack) == ToolType.CHAINSAW && interactionTarget instanceof Shearable shearable) { + if (!interactionTarget.level().isClientSide && shearable.readyForShearing()) { + shearable.shear(SoundSource.PLAYERS); + interactionTarget.gameEvent(GameEvent.SHEAR, player); + consumeEnergy(stack); + return InteractionResult.SUCCESS; + } else { + return InteractionResult.CONSUME; + } + } + } + return InteractionResult.PASS; } - public static void rebuildTool(ItemStack stack) { - Item energyConverter = getComponent(stack, "energyConverter"); - Item energyStorage = getComponent(stack, "energyStorage"); - Item head = getComponent(stack, "head"); - List modules = getAddons(stack); + @Override + public boolean playBreakEffects() { + return true; + } + + @Override + public int getRadius(ItemStack stack) { + int radius = 0; + for (var addon : getAddonProps(stack)) { + if (addon.isPresent() && addon.get().getFirst().customEffect() == CustomModuleEffect.AREA) { + radius += addon.get().getSecond(); + } + } + return radius; + } + public static void rebuildTool(ItemStack stack) { // clear current energy storage SimpleEnergyItem.setStoredEnergyUnchecked(stack, 0); FluidFuelItemHelper.setAmount(stack, 0); + } - // set new energy type - EnergyType converterType = EnergyConverterRegistry.getProperties(energyConverter) - .energyType(); - EnergyType storageType = EnergyConverterRegistry.getProperties(energyStorage) - .energyType(); - if (converterType == storageType) { - ModularToolItem.setEnergyType(stack, converterType); - } else { - ModularToolItem.setEnergyType(stack, EnergyType.NONE); - } + private static Optional getConverterProps(ItemStack stack) { + Optional energyConverter = getComponent(stack, "energyConverter"); + return energyConverter + .flatMap(item -> Optional.ofNullable(EnergyConverterRegistry.getProperties(item))); } - private static Item getComponent(ItemStack stack, String componentName) { - String componentId = stack.getTag().getString(componentName); - if (componentId.equals("")) { - return null; - } - return BuiltInRegistries.ITEM.get(new ResourceLocation(componentId)); + private static Optional getStorageProps(ItemStack stack) { + Optional energyStorage = getComponent(stack, "energyStorage"); + return energyStorage + .flatMap(item -> Optional.ofNullable(EnergyStorageRegistry.getProperties(item))); + } + + private static Optional getHeadProps(ItemStack stack) { + Optional head = getComponent(stack, "head"); + return head.flatMap(item -> Optional.ofNullable(HeadRegistry.getProperties(item))); } - private static List getAddons(ItemStack stack) { - List addons = new ArrayList<>(5); - CompoundTag addonsTag = stack.getTag().getCompound("addons"); + private static List>> getAddonProps(ItemStack stack) { + List> addons = new ArrayList<>(); + for (int idx = 0; idx < 5; ++idx) { + addons.add(Optional.empty()); + } + + CompoundTag tag = stack.getTag(); + if (tag == null) { + return List.of(); + } + + CompoundTag addonsTag = tag.getCompound("addons"); for (int idx = 0; idx < addons.size(); ++idx) { - String addonId = addonsTag.getString(Integer.toString(idx)); - if (addonId.equals("")) { - addons.set(idx, null); - } else { - addons.set(idx, BuiltInRegistries.ITEM.get(new ResourceLocation(addonId))); + if (addonsTag.contains(Integer.toString(idx))) { + CompoundTag addonTag = addonsTag.getCompound(Integer.toString(idx)); + String addonId = addonTag.getString("id"); + int amount = addonTag.getInt("amount"); + addons.set(idx, + Optional.of(new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(addonId)), amount))); } } - return addons; + return addons.stream() + .map(module -> module.flatMap( + item -> { + var props = ModuleRegistry.getProperties(item.getItem()); + if (props == null) { + return Optional.empty(); + } else { + return Optional.of(new Pair<>(props, item.getCount())); + } + })) + .toList(); } - // ---------------------------------------------- - - /** - * get energy capacity, in EU or in mB, depending on energy storage module - */ - private static long getCapacity(ItemStack stack) { - return 0; // TODO + private static Optional getComponent(ItemStack stack, String componentName) { + CompoundTag tag = stack.getTag(); + if (tag == null) { + return Optional.empty(); + } + String componentId = tag.getString(componentName); + if (componentId.equals("")) { + return Optional.empty(); + } + return Optional.of(BuiltInRegistries.ITEM.get(new ResourceLocation(componentId))); } - /** - * report consumed energy for one operation, in EU - */ - private static long getConsumedEnergy(ItemStack stack) { - // TODO - return 0; + private static EnergyType getEnergyType(ItemStack stack) { + var converter = getConverterProps(stack); + var storage = getStorageProps(stack); + if (converter.isPresent() && storage.isPresent() + && converter.get().energyType() == storage.get().energyType()) { + return converter.get().energyType(); + } else { + return EnergyType.NONE; + } } /** @@ -216,20 +411,34 @@ private static long getConsumedEnergy(ItemStack stack) { * nearest mB */ private static void consumeEnergy(ItemStack stack) { - // TODO + switch (getEnergyType(stack)) { + case FLUID: { + FluidFuelItemHelper.setAmount(stack, FluidFuelItemHelper.getAmount(stack) - 81 * getMbRequired(stack)); + break; + } + case ELECTRIC: { + SimpleEnergyItem.setStoredEnergyUnchecked(stack, + SimpleEnergyItem.getStoredEnergyUnchecked(stack) - getConsumedEnergy(stack)); + break; + } + default: { + throw new IllegalStateException("Must have a known energy type to consume any energy"); + } + } } private static boolean hasEnoughEnergy(ItemStack stack) { + if (getConsumedEnergy(stack) > getConverterProps(stack).map(props -> props.maxEu()).orElse(0L)) { + return false; + } + switch (getEnergyType(stack)) { case FLUID: { FluidVariant fluid = FluidFuelItemHelper.getFluid(stack); if (fluid.getFluid() == Fluids.EMPTY) { return false; } - - long euPerMb = FluidFuelRegistry.getEu(fluid.getFluid()); - long mbRequired = (getConsumedEnergy(stack) + euPerMb - 1) / euPerMb; // do ceiling division - return FluidFuelItemHelper.getAmount(stack) > mbRequired; + return FluidFuelItemHelper.getAmount(stack) > getMbRequired(stack); } case ELECTRIC: { return SimpleEnergyItem.getStoredEnergyUnchecked(stack) > getConsumedEnergy(stack); @@ -240,49 +449,34 @@ private static boolean hasEnoughEnergy(ItemStack stack) { } } - private static int toolLevel(ItemStack stack) { - CompoundTag tag = stack.getTag(); - // TODO: get level of tool from head type; steel = 2, aluminium = 3, stainless = - // 4, titanium = 5 - return 0; + private static long getMbRequired(ItemStack stack) { + FluidVariant fluid = FluidFuelItemHelper.getFluid(stack); + long euPerMb = FluidFuelRegistry.getEu(fluid.getFluid()); + return (getConsumedEnergy(stack) + euPerMb - 1) / euPerMb; // do ceiling division } - private static float getMiningSpeedMultiplier(ItemStack stack) { - // TODO: calculate based on head and modules - return 1.0f; + private static ToolType getToolType(ItemStack stack) { + return getHeadProps(stack).map(props -> props.toolType()).orElse(ToolType.NONE); } - private static double getAttackDamage(ItemStack stack) { - // TODO: calculate based on head and modules - return 0.0; - } - - private static double getDurabilityBarProgress(ItemStack stack) { - switch (getEnergyType(stack)) { - case FLUID: { - return (double) FluidFuelItemHelper.getAmount(stack) / (double) getCapacity(stack); - } - case ELECTRIC: { - return (double) SimpleEnergyItem.getStoredEnergyUnchecked(stack) / (double) getCapacity(stack); - } - default: { - return 0.0; - } - } - } - - public static EnergyType getEnergyType(ItemStack stack) { - CompoundTag tag = stack.getTag(); - if (tag == null) { - return EnergyType.NONE; - } else { - return EnergyType.values()[tag.getByte("energyType")]; + /** + * report consumed energy for one operation, in EU + */ + private static long getConsumedEnergy(ItemStack stack) { + double multiplier = 1; + for (var addon : getAddonProps(stack)) { + if (addon.isPresent()) { + multiplier *= Math.pow(addon.get().getFirst().multiplier(), addon.get().getSecond()); + } } + return Math.round(BASE_ENERGY_CONSUMPTION * multiplier); } - public static void setEnergyType(ItemStack stack, EnergyType energyType) { - CompoundTag tag = stack.getOrCreateTag(); - tag.putByte("energyType", (byte) energyType.ordinal()); + /** + * get energy capacity, in EU or in mB, depending on energy storage module + */ + private static long getCapacity(ItemStack stack) { + return getStorageProps(stack).map(props -> props.capacity()).orElse(0L); } public static enum EnergyType { @@ -316,4 +510,106 @@ public static Map getPathStates() { return FLATTENABLES; } } + + public static class FluidStorage extends SingleVariantItemStorage { + private ContainerItemContext context; + + public FluidStorage(ContainerItemContext context) { + super(context); + this.context = context; + } + + @Override + protected FluidVariant getBlankResource() { + return FluidVariant.blank(); + } + + @Override + protected FluidVariant getResource(ItemVariant currentVariant) { + return FluidFuelItemHelper.getFluid(currentVariant.toStack()); + } + + @Override + protected long getAmount(ItemVariant currentVariant) { + return FluidFuelItemHelper.getAmount(currentVariant.toStack()); + } + + @Override + protected long getCapacity(FluidVariant variant) { + if (ModularToolItem.getEnergyType(context.getItemVariant().toStack()) == EnergyType.FLUID) { + return ModularToolItem.getCapacity(context.getItemVariant().toStack()) / 1000; + } else { + return 0; + } + } + + @Override + protected ItemVariant getUpdatedVariant(ItemVariant currentVariant, FluidVariant newResource, long newAmount) { + ItemStack stack = currentVariant.toStack(); + FluidFuelItemHelper.setFluid(stack, newResource); + FluidFuelItemHelper.setAmount(stack, newAmount); + return ItemVariant.of(stack); + } + } + + public static class EnergyStorage implements team.reborn.energy.api.EnergyStorage { + private ContainerItemContext context; + + public EnergyStorage(ContainerItemContext context) { + this.context = context; + } + + @Override + public long insert(long maxAmount, TransactionContext transaction) { + long toInsert = Math.min(maxAmount, getCapacity() - getAmount()); + if (trySetEnergy(getAmount() + toInsert, transaction)) { + return toInsert; + } else { + return 0; + } + } + + @Override + public long extract(long maxAmount, TransactionContext transaction) { + long toExtract = Math.min(maxAmount, getAmount()); + if (trySetEnergy(getAmount() - toExtract, transaction)) { + return toExtract; + } else { + return 0; + } + } + + private boolean trySetEnergy(long amount, TransactionContext transaction) { + ItemStack newStack = context.getItemVariant().toStack(); + SimpleEnergyItem.setStoredEnergyUnchecked(newStack, amount); + ItemVariant newVariant = ItemVariant.of(newStack); + try (Transaction nested = transaction.openNested()) { + if (context.extract(context.getItemVariant(), 1, nested) == 1 + && context.insert(newVariant, 1, nested) == 1) { + nested.commit(); + return true; + } else { + return false; + } + } + } + + @Override + public long getAmount() { + if (ModularToolItem.getEnergyType(context.getItemVariant().toStack()) == EnergyType.ELECTRIC) { + return SimpleEnergyItem.getStoredEnergyUnchecked(context.getItemVariant().toStack()); + } else { + return 0; + } + } + + @Override + public long getCapacity() { + if (ModularToolItem.getEnergyType(context.getItemVariant().toStack()) == EnergyType.ELECTRIC) { + return ModularToolItem.getCapacity(context.getItemVariant().toStack()); + } else { + return 0; + } + } + } } From 2d46f8af01fb17eea63ad4c087bed182c4e5f14f Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 20:30:42 -0700 Subject: [PATCH 11/18] Change model when changing tool head --- .../models/item/aluminum_tool_casing.json | 6 ------ .../item/stainless_steel_tool_casing.json | 6 ------ .../models/item/steel_tool_casing.json | 6 ------ .../models/item/titanium_tool_casing.json | 6 ------ .../modern_industrialization/MIItem.java | 8 +++---- .../items/modular_tools/ModularToolItem.java | 15 +++++++++++++ .../models/item/aluminum_tool_casing.json | 20 ++++++++++++++++++ .../item/aluminum_tool_casing_chainsaw.json | 7 ++++++ .../item/aluminum_tool_casing_drill.json | 7 ++++++ .../item/stainless_steel_tool_casing.json | 20 ++++++++++++++++++ .../stainless_steel_tool_casing_chainsaw.json | 7 ++++++ .../stainless_steel_tool_casing_drill.json | 7 ++++++ .../models/item/steel_tool_casing.json | 20 ++++++++++++++++++ .../item/steel_tool_casing_chainsaw.json | 7 ++++++ .../models/item/steel_tool_casing_drill.json | 7 ++++++ .../models/item/titanium_tool_casing.json | 20 ++++++++++++++++++ .../item/titanium_tool_casing_chainsaw.json | 7 ++++++ .../item/titanium_tool_casing_drill.json | 7 ++++++ .../textures/item/modular_chainsaw_blade.png | Bin 0 -> 1993 bytes .../textures/item/modular_drill_head.png | Bin 0 -> 2218 bytes 20 files changed, 155 insertions(+), 28 deletions(-) delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json delete mode 100644 src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_chainsaw.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_drill.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_chainsaw.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_drill.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_chainsaw.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_drill.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_chainsaw.json create mode 100644 src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_drill.json create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/modular_chainsaw_blade.png create mode 100644 src/main/resources/assets/modern_industrialization/textures/item/modular_drill_head.png diff --git a/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json deleted file mode 100644 index 88475d1ca..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/aluminum_tool_casing" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json deleted file mode 100644 index 3a4a46dc7..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/stainless_steel_tool_casing" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json deleted file mode 100644 index 891550183..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/steel_tool_casing.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/steel_tool_casing" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json b/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json deleted file mode 100644 index 67e304720..000000000 --- a/src/generated/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "modern_industrialization:item/titanium_tool_casing" - } -} \ No newline at end of file diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index d905be7d8..c411b8ff0 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -158,25 +158,25 @@ public final class MIItem { public static final ItemDefinition STEAM_MINING_DRILL = itemHandheld("Steam Mining Drill", "steam_mining_drill",SteamDrillItem::new); - public static final ItemDefinition STEEL_TOOL_CASING = itemHandheld("Steel Tool Casing", "steel_tool_casing", ModularToolItem::new) + public static final ItemDefinition STEEL_TOOL_CASING = itemNoModel("Steel Tool Casing", "steel_tool_casing", ModularToolItem::new, ITEMS_OTHER) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.LV, 2)); FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); - public static final ItemDefinition ALUMINUM_TOOL_CASING = itemHandheld("Aluminum Tool Casing", "aluminum_tool_casing", ModularToolItem::new) + public static final ItemDefinition ALUMINUM_TOOL_CASING = itemNoModel("Aluminum Tool Casing", "aluminum_tool_casing", ModularToolItem::new, ITEMS_OTHER) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.MV, 3)); FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); - public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemHandheld("Stainless Steel Tool Casing", "stainless_steel_tool_casing", ModularToolItem::new) + public static final ItemDefinition STAINLESS_STEEL_TOOL_CASING = itemNoModel("Stainless Steel Tool Casing", "stainless_steel_tool_casing", ModularToolItem::new, ITEMS_OTHER) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.HV, 4)); FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); EnergyApi.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.EnergyStorage(ctx), item); }); - public static final ItemDefinition TITANIUM_TOOL_CASING = itemHandheld("Titanium Tool Casing", "titanium_tool_casing", ModularToolItem::new) + public static final ItemDefinition TITANIUM_TOOL_CASING = itemNoModel("Titanium Tool Casing", "titanium_tool_casing", ModularToolItem::new, ITEMS_OTHER) .withItemRegistrationEvent(item -> { CasingRegistry.register(item, new CasingProperties(ComponentTier.EV, 5)); FluidStorage.ITEM.registerForItems((stack, ctx) -> new ModularToolItem.FluidStorage(ctx), item); diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java index 1f88ea4da..ae6ca682c 100644 --- a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java @@ -330,6 +330,21 @@ public static void rebuildTool(ItemStack stack) { // clear current energy storage SimpleEnergyItem.setStoredEnergyUnchecked(stack, 0); FluidFuelItemHelper.setAmount(stack, 0); + + switch (getToolType(stack)) { + case DRILL: { + stack.getOrCreateTag().putInt("CustomModelData", 1); + break; + } + case CHAINSAW: { + stack.getOrCreateTag().putInt("CustomModelData", 2); + break; + } + default: { + stack.getOrCreateTag().putInt("CustomModelData", 0); + break; + } + } } private static Optional getConverterProps(ItemStack stack) { diff --git a/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json new file mode 100644 index 000000000..b56ae69e7 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/aluminum_tool_casing" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model": "modern_industrialization:item/aluminum_tool_casing_drill" + }, + { + "predicate": { + "custom_model_data": 2 + }, + "model": "modern_industrialization:item/aluminum_tool_casing_chainsaw" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_chainsaw.json b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_chainsaw.json new file mode 100644 index 000000000..2882034f6 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_chainsaw.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/aluminum_tool_casing", + "layer0": "modern_industrialization:item/modular_chainsaw_blade" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_drill.json b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_drill.json new file mode 100644 index 000000000..45eef9f5e --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/aluminum_tool_casing_drill.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/aluminum_tool_casing", + "layer0": "modern_industrialization:item/modular_drill_head" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json new file mode 100644 index 000000000..e7e0688a8 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/stainless_steel_tool_casing" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model": "modern_industrialization:item/stainless_steel_tool_casing_drill" + }, + { + "predicate": { + "custom_model_data": 2 + }, + "model": "modern_industrialization:item/stainless_steel_tool_casing_chainsaw" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_chainsaw.json b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_chainsaw.json new file mode 100644 index 000000000..4ef16439f --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_chainsaw.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/stainless_steel_tool_casing", + "layer0": "modern_industrialization:item/modular_chainsaw_blade" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_drill.json b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_drill.json new file mode 100644 index 000000000..cb5bd1693 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/stainless_steel_tool_casing_drill.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/stainless_steel_tool_casing", + "layer0": "modern_industrialization:item/modular_drill_head" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing.json b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing.json new file mode 100644 index 000000000..7dbf90095 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/steel_tool_casing" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model": "modern_industrialization:item/steel_tool_casing_drill" + }, + { + "predicate": { + "custom_model_data": 2 + }, + "model": "modern_industrialization:item/steel_tool_casing_chainsaw" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_chainsaw.json b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_chainsaw.json new file mode 100644 index 000000000..6f7b161f8 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_chainsaw.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/steel_tool_casing", + "layer0": "modern_industrialization:item/modular_chainsaw_blade" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_drill.json b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_drill.json new file mode 100644 index 000000000..32a8922c3 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/steel_tool_casing_drill.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/steel_tool_casing", + "layer0": "modern_industrialization:item/modular_drill_head" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json new file mode 100644 index 000000000..50dc89753 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "modern_industrialization:item/titanium_tool_casing" + }, + "overrides": [ + { + "predicate": { + "custom_model_data": 1 + }, + "model": "modern_industrialization:item/titanium_tool_casing_drill" + }, + { + "predicate": { + "custom_model_data": 2 + }, + "model": "modern_industrialization:item/titanium_tool_casing_chainsaw" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_chainsaw.json b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_chainsaw.json new file mode 100644 index 000000000..a168ee304 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_chainsaw.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/titanium_tool_casing", + "layer0": "modern_industrialization:item/modular_chainsaw_blade" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_drill.json b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_drill.json new file mode 100644 index 000000000..3dfef8ed9 --- /dev/null +++ b/src/main/resources/assets/modern_industrialization/models/item/titanium_tool_casing_drill.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer1": "modern_industrialization:item/titanium_tool_casing", + "layer0": "modern_industrialization:item/modular_drill_head" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/textures/item/modular_chainsaw_blade.png b/src/main/resources/assets/modern_industrialization/textures/item/modular_chainsaw_blade.png new file mode 100644 index 0000000000000000000000000000000000000000..05bb7f2a9e8dd4ba86d252fde481f081cb759f72 GIT binary patch literal 1993 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 s^!9L&s{ Date: Sun, 29 Oct 2023 21:48:35 -0700 Subject: [PATCH 12/18] Add design documentation --- docs/MODULAR_TOOLS.md | 147 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/MODULAR_TOOLS.md diff --git a/docs/MODULAR_TOOLS.md b/docs/MODULAR_TOOLS.md new file mode 100644 index 000000000..93e47fcf7 --- /dev/null +++ b/docs/MODULAR_TOOLS.md @@ -0,0 +1,147 @@ +# Modular Tools + +A tool consists of: + +A casing (the base ModularToolItem) +An energy storage component +An energy converter component +A head +Some number of upgrade modules + +## Tiers + +The following material tiers exist + +- Steel (motor/pump, redstone battery) +- Aluninium (large motor/pump, silicon battery) +- Stainless Steel (advanced motor/pump, sodium battery) +- Titanium (large advanced motor/pump, cadmium battery) + +## Casings + +Casings determine: + +- the max tier of electric energy storage component that can be installed +- the max tier of energy converter component that can be installed +- the max tier of head that can be installed +- the number of upgrade modules that can be installed + +Casings: + +- Steel: redstone battery, basic converter, steel heads, 2 stacks +- Aluminium: silicon battery, large converter, aluminium heads, 3 stacks +- Stainless Steel: sodium battery, advanced converter, stainless heads, 4 stacks +- Titanium: cadmium battery, large advanced converter, titanium heads, 5 stacks + +## Energy + +A tool may be fitted with a battery and motor, allowing it to store and use EU directly, or with a tank and pump, allowing it to store liquid fuels and burn them to generate energy, with a granularity of 1 mB + +Base energy consumption is 32 EU + +Converters have a max throughput + +- Motor: 1024 EU +- Large Motor: 2048 EU +- Advanced Motor: 4096 EU +- Large Advanced Motor: 8192 +- Pump: 1024 EU +- Large Pump: 2048 EU +- Advanced Pump: 4096 EU +- Large Advanced Pump: 8192 EU + +## Heads + +Heads determine the base mining speed and attack damage + +There are two kinds - drill heads and rotary blades + +## Modules + +- Area = 9x, max 2 + +- Fire Aspect = 1.5x, max 2 +- Looting = 2x, max 3 +- Knockback = 1.25x, max 2 +- Sweeping Edge = 1.5x, max 3 +- Sharpness/Smite/Bane of Arthropods = 1.25x, max 5 + +- Efficiency = 1.25x, max 5 + +- Fortune = 2x, max 3 +- Silk Touch = 2x, max 1 + +### Module Identification + +Modules are crafted by choosing the placement of fine copper wires around a circuit board; each recipe has 8 slots for 4 wires, for a total of 8C4 = 70 possible modules. See the list below for current assignments (the format has 1 = wire and 0 = no wire, and starting in the top left corner going clockwise) + +- 11110000 = area +- 11101000 = fire aspect +- 11100100 = looting +- 11100010 = knockback +- 11100001 = sweeping edge +- 11011000 = sharpness +- 11010100 = smite +- 11010010 = bane of arthropods +- 11010001 = efficiency +- 11001100 = fortune +- 11001010 = silk touch +- 11001001 +- 11000110 +- 11000101 +- 11000011 +- 10111000 +- 10110100 +- 10110010 +- 10110001 +- 10101100 +- 10101010 +- 10101001 +- 10100110 +- 10100101 +- 10100011 +- 10011100 +- 10011010 +- 10011001 +- 10010110 +- 10010101 +- 10010011 +- 10001110 +- 10001101 +- 10001011 +- 10000111 +- 01111000 +- 01110100 +- 01110010 +- 01110001 +- 01101100 +- 01101010 +- 01101001 +- 01100110 +- 01100101 +- 01100011 +- 01011100 +- 01011010 +- 01011001 +- 01010110 +- 01010101 +- 01010011 +- 01001110 +- 01001101 +- 01001011 +- 01000111 +- 00111100 +- 00111010 +- 00111001 +- 00110110 +- 00110101 +- 00110011 +- 00101110 +- 00101101 +- 00101011 +- 00100111 +- 00011110 +- 00011101 +- 00011011 +- 00010111 +- 00001111 From b790ba8dc93d3d51eb85b423d0fb1e119b47a47e Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 22:28:27 -0700 Subject: [PATCH 13/18] Update in-game docs - List energy converter max EUs - State baseline EU - Include module effects, stacking, and energy consumption --- .../entries/electric_age/modular_tools.json | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json index c51d752a9..12350b7f3 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json @@ -30,6 +30,10 @@ "title": "Motors", "text": "All tools require an motor to convert their stored energy into useful work. This is either a motor (of any kind) for an electric tool or a pump (of any kind) for a liquid-fuelled tool." }, + { + "type": "text", + "text": "These have a maximum EU per operations they support - 1024 for basic components, 2048 for large components, 4096 for advanced components, and 8192 for large advanced components." + }, { "type": "spotlight", "item": { @@ -52,36 +56,57 @@ "item": "modern_industrialization:area_module" }, "title": "Modules", - "text": "You can optionally install upgrade modules to change your tool's properties, for example, adding a fortune or a silk touch module, or even an area module." + "text": "You can optionally install upgrade modules to change your tool's properties, for example, adding a fortune or a silk touch module, or even an area module. These increase energy consumption from the baseline of 32 EU/operation." }, { "type": "crafting", "recipe": "modern_industrialization:tools/area_module", - "recipe2": "modern_industrialization:tools/fire_aspect_module" + "text": "Area modules increase the mining radius by one; you can install up to two of them, but they increase energy consumption by 9x" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/fire_aspect_module", + "text": "Adds a level of Fire Aspect, stacks up to 2, and increases energy consumption by 1.5x" }, { "type": "crafting", "recipe": "modern_industrialization:tools/looting_module", - "recipe2": "modern_industrialization:tools/knockback_module" + "text": "Adds a level of Looting, stacks up to 3, and increases energy consumption by 2x" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/knockback_module", + "text": "Adds a level of Knockback, stacks up to 2, and increases energy consumption by 1.25x" }, { "type": "crafting", "recipe": "modern_industrialization:tools/sweeping_edge_module", - "recipe2": "modern_industrialization:tools/sharpness_module" + "text": "Adds a level of Sweeping Edge, stacks up to 3, and increases energy consumption by 1.5x" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/sharpness_module", + "recipe2": "modern_industrialization:tools/smite_module" }, { "type": "crafting", - "recipe": "modern_industrialization:tools/smite_module", - "recipe2": "modern_industrialization:tools/bane_of_arthropods_module" + "recipe": "modern_industrialization:tools/bane_of_arthropods_module", + "text": "Adds a level of Sharpness, Smite, or Bane of Arthropods, stacks up to 5, and increases energy consumption by 1.25x" }, { "type": "crafting", "recipe": "modern_industrialization:tools/efficiency_module", - "recipe2": "modern_industrialization:tools/fortune_module" + "text": "Adds a level of Efficiency, stacks up to 5, and increases energy consumption by 1.25x" + }, + { + "type": "crafting", + "recipe": "modern_industrialization:tools/fortune_module", + "text": "Adds a level of Fortune, stacks up to 3, and increases energy consumption by 2x" }, { "type": "crafting", - "recipe": "modern_industrialization:tools/silk_touch_module" + "recipe": "modern_industrialization:tools/silk_touch_module", + "text": "Adds Silk Touch (doesn't stack) and increases energy consumption by 2x" } ], "sortnum": 111 From 21306f4d2d91b9db19648bae43d8cdab27f7f373 Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 22:29:09 -0700 Subject: [PATCH 14/18] Change package name to follow existing conventions --- src/main/java/aztech/modern_industrialization/MIItem.java | 4 ++-- .../api/item/modular_tools/EnergyConverterRegistry.java | 2 +- .../api/item/modular_tools/EnergyStorageRegistry.java | 2 +- .../api/item/modular_tools/HeadRegistry.java | 2 +- .../blocks/toolstation/ToolStationScreenHandler.java | 2 +- .../{modular_tools => modulartools}/ModularToolItem.java | 2 +- .../modern_industrialization/materials/part/BatteryPart.java | 2 +- .../materials/part/DrillHeadPart.java | 2 +- .../materials/part/RotaryBladePart.java | 2 +- .../modern_industrialization/materials/part/TankPart.java | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename src/main/java/aztech/modern_industrialization/items/{modular_tools => modulartools}/ModularToolItem.java (99%) diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index c411b8ff0..f8f004abd 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -40,8 +40,8 @@ import aztech.modern_industrialization.items.armor.JetpackItem; import aztech.modern_industrialization.items.armor.QuantumArmorItem; import aztech.modern_industrialization.items.armor.RubberArmorMaterial; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; import aztech.modern_industrialization.items.tools.QuantumSword; import aztech.modern_industrialization.nuclear.INeutronBehaviour; import aztech.modern_industrialization.nuclear.NuclearComponentItem; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java index 455fb4f01..aabeb8b64 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java @@ -1,6 +1,6 @@ package aztech.modern_industrialization.api.item.modular_tools; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; import java.util.IdentityHashMap; import java.util.Objects; import net.minecraft.world.item.Item; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java index 729332fd9..dcfb9cb8d 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java @@ -1,6 +1,6 @@ package aztech.modern_industrialization.api.item.modular_tools; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; import java.util.IdentityHashMap; import java.util.Objects; import net.minecraft.world.item.Item; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java index 664513dc6..76fc40b61 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java @@ -1,6 +1,6 @@ package aztech.modern_industrialization.api.item.modular_tools; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.ToolType; import java.util.IdentityHashMap; import java.util.Objects; import net.minecraft.world.item.Item; diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java index 21dace5c4..47fc56fb6 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -30,7 +30,7 @@ import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; import aztech.modern_industrialization.api.item.modular_tools.ModuleRegistry; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem; +import aztech.modern_industrialization.items.modulartools.ModularToolItem; import java.util.ArrayList; import java.util.List; import net.minecraft.core.registries.BuiltInRegistries; diff --git a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java similarity index 99% rename from src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java rename to src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java index ae6ca682c..8dce5b949 100644 --- a/src/main/java/aztech/modern_industrialization/items/modular_tools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package aztech.modern_industrialization.items.modular_tools; +package aztech.modern_industrialization.items.modulartools; import aztech.modern_industrialization.api.FluidFuelRegistry; import aztech.modern_industrialization.api.item.modular_tools.EnergyConverterRegistry; diff --git a/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java b/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java index a4e9fb170..d616afe73 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/BatteryPart.java @@ -28,7 +28,7 @@ import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry; import aztech.modern_industrialization.api.item.modular_tools.EnergyStorageRegistry.StorageProperties; import aztech.modern_industrialization.items.PortableStorageUnit; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; public class BatteryPart implements PartKeyProvider { diff --git a/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java index e4744adec..d82c8699e 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java @@ -3,7 +3,7 @@ import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry.HeadProperties; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.ToolType; public class DrillHeadPart implements PartKeyProvider { @Override diff --git a/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java index f9d95f9fa..e1c48a02e 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java @@ -3,7 +3,7 @@ import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry; import aztech.modern_industrialization.api.item.modular_tools.HeadRegistry.HeadProperties; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.ToolType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.ToolType; public class RotaryBladePart implements PartKeyProvider { @Override diff --git a/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java b/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java index 287571b0f..971bd7a9e 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/TankPart.java @@ -35,7 +35,7 @@ import aztech.modern_industrialization.datagen.tag.TagsToGenerate; import aztech.modern_industrialization.definition.BlockDefinition; import aztech.modern_industrialization.items.SortOrder; -import aztech.modern_industrialization.items.modular_tools.ModularToolItem.EnergyType; +import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; import aztech.modern_industrialization.proxy.CommonProxy; import java.util.Optional; import java.util.function.BiConsumer; From 861945e1426dc3b89b8e2952c1e1a7e91c86d9cb Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Sun, 29 Oct 2023 22:36:39 -0700 Subject: [PATCH 15/18] Minor bugfixes - Enchantments don't apply when tool is empty - Tool mining speed when out of energy is zero; inappropriate blocks are now mined at 1.0 speed - Tools now can't go negative in energy --- .../items/modulartools/ModularToolItem.java | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java index 8dce5b949..d44ebaf02 100644 --- a/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java @@ -149,10 +149,13 @@ public boolean isSupportedBlock(ItemStack stack, BlockState state) { @Override public float getDestroySpeed(ItemStack stack, BlockState state) { + if (!hasEnoughEnergy(stack)) { + return 0.0f; + } if (isSupportedBlock(stack, state)) { return getHeadProps(stack).map(props -> props.miningSpeed()).orElse(0.0f); } - return 0.0f; + return 1.0f; } @Override @@ -170,10 +173,6 @@ public void appendHoverText(ItemStack stack, Level world, List toolti FluidFuelItemHelper.appendTooltip(stack, tooltip, getCapacity(stack) / 1000); break; } - case ELECTRIC: { - // TODO: report EU inside - break; - } default: { break; } @@ -282,6 +281,10 @@ public InteractionResult useOn(UseOnContext context) { @Override public Reference2IntMap getEnchantments(ItemStack stack) { var map = new Reference2IntArrayMap(); + if (!hasEnoughEnergy(stack)) { + return map; + } + for (var addon : getAddonProps(stack)) { if (addon.isPresent() && addon.get().getFirst().enchantment() != null) { Enchantment enchantment = addon.get().getFirst().enchantment(); @@ -426,19 +429,22 @@ private static EnergyType getEnergyType(ItemStack stack) { * nearest mB */ private static void consumeEnergy(ItemStack stack) { - switch (getEnergyType(stack)) { - case FLUID: { - FluidFuelItemHelper.setAmount(stack, FluidFuelItemHelper.getAmount(stack) - 81 * getMbRequired(stack)); - break; - } - case ELECTRIC: { - SimpleEnergyItem.setStoredEnergyUnchecked(stack, - SimpleEnergyItem.getStoredEnergyUnchecked(stack) - getConsumedEnergy(stack)); - break; - } - default: { - throw new IllegalStateException("Must have a known energy type to consume any energy"); - } + if (hasEnoughEnergy(stack)) { + switch (getEnergyType(stack)) { + case FLUID: { + FluidFuelItemHelper.setAmount(stack, + FluidFuelItemHelper.getAmount(stack) - 81 * getMbRequired(stack)); + break; + } + case ELECTRIC: { + SimpleEnergyItem.setStoredEnergyUnchecked(stack, + SimpleEnergyItem.getStoredEnergyUnchecked(stack) - getConsumedEnergy(stack)); + break; + } + default: { + throw new IllegalStateException("Must have a known energy type to consume any energy"); + } + } } } From ca3402e8d34d1b28663aa8f4994198d64cad9a2a Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Wed, 1 Nov 2023 18:07:14 -0700 Subject: [PATCH 16/18] remove sweeping edge modules Sweeping edge only works if the held item is an instanceof a SwordItem --- docs/MODULAR_TOOLS.md | 2 +- .../modern_industrialization/lang/en_us.json | 1 - .../lang/untranslated/ko_kr.json | 1 - .../lang/untranslated/pt_br.json | 1 - .../lang/untranslated/ru_ru.json | 1 - .../lang/untranslated/zh_cn.json | 1 - .../lang/untranslated/zh_tw.json | 1 - .../modern_industrialization/MIItem.java | 2 -- .../models/item/sweeping_edge_module.json | 6 ------ .../entries/electric_age/modular_tools.json | 5 ----- .../{minecraft/tags => c}/items/coals.json | 12 ++++++------ .../recipes/tools/sweeping_edge_module.json | 19 ------------------- 12 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json rename src/main/resources/data/{minecraft/tags => c}/items/coals.json (93%) delete mode 100644 src/main/resources/data/modern_industrialization/recipes/tools/sweeping_edge_module.json diff --git a/docs/MODULAR_TOOLS.md b/docs/MODULAR_TOOLS.md index 93e47fcf7..d8127de9e 100644 --- a/docs/MODULAR_TOOLS.md +++ b/docs/MODULAR_TOOLS.md @@ -79,7 +79,7 @@ Modules are crafted by choosing the placement of fine copper wires around a circ - 11101000 = fire aspect - 11100100 = looting - 11100010 = knockback -- 11100001 = sweeping edge +- 11100001 = sweeping edge - temporarily disabled - 11011000 = sharpness - 11010100 = smite - 11010010 = bane of arthropods 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 8e53c790e..f4e94e70c 100644 --- a/src/generated/resources/assets/modern_industrialization/lang/en_us.json +++ b/src/generated/resources/assets/modern_industrialization/lang/en_us.json @@ -1001,7 +1001,6 @@ "item.modern_industrialization.superconductor_plate": "Superconductor Plate", "item.modern_industrialization.superconductor_tiny_dust": "Superconductor Tiny Dust", "item.modern_industrialization.superconductor_wire": "Superconductor Wire", - "item.modern_industrialization.sweeping_edge_module": "Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "Tin Blade", 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 4e2370c48..aa19c2997 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 @@ -1195,7 +1195,6 @@ "item.modern_industrialization.superconductor_plate": "초전도 판", "item.modern_industrialization.superconductor_tiny_dust": "작은 초전도 가루", "item.modern_industrialization.superconductor_wire": "초전도 선", - "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "주석 칼날", 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 a547a167b..fda3314f6 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 @@ -1007,7 +1007,6 @@ "item.modern_industrialization.superconductor_plate": "Chapa de Supercondutor", "item.modern_industrialization.superconductor_tiny_dust": "Pó Pequeno de Supercondutor", "item.modern_industrialization.superconductor_wire": "Fio Supercondutor", - "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Balde de Óleo Sintético", "item.modern_industrialization.synthetic_rubber_bucket": "Balde de Borracha Sintética", "item.modern_industrialization.tin_blade": "Lâmina de Estanho", 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 a9348a1ee..042e2a603 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 @@ -1007,7 +1007,6 @@ "item.modern_industrialization.superconductor_plate": "Пластина сверхпроводника", "item.modern_industrialization.superconductor_tiny_dust": "Мельчайший порошок из сверхпроводника", "item.modern_industrialization.superconductor_wire": "Провод из сверхпроводника", - "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "Ведро синтетического масла", "item.modern_industrialization.synthetic_rubber_bucket": "Ведро искусственного каучука", "item.modern_industrialization.tin_blade": "Оловянная лопасть", 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 071e881cf..536a27654 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 @@ -1005,7 +1005,6 @@ "item.modern_industrialization.superconductor_plate": "超导体板", "item.modern_industrialization.superconductor_tiny_dust": "小堆超导体粉", "item.modern_industrialization.superconductor_wire": "超导体线", - "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "锡叶片", 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 31c38f3e6..73f340087 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 @@ -1178,7 +1178,6 @@ "item.modern_industrialization.superconductor_plate": "[UNTRANSLATED] Superconductor Plate", "item.modern_industrialization.superconductor_tiny_dust": "[UNTRANSLATED] Superconductor Tiny Dust", "item.modern_industrialization.superconductor_wire": "[UNTRANSLATED] Superconductor Wire", - "item.modern_industrialization.sweeping_edge_module": "[UNTRANSLATED] Sweeping Edge Module", "item.modern_industrialization.synthetic_oil_bucket": "[UNTRANSLATED] Synthetic Oil Bucket", "item.modern_industrialization.synthetic_rubber_bucket": "[UNTRANSLATED] Synthetic Rubber Bucket", "item.modern_industrialization.tin_blade": "錫葉片", diff --git a/src/main/java/aztech/modern_industrialization/MIItem.java b/src/main/java/aztech/modern_industrialization/MIItem.java index f8f004abd..69d5e8c84 100644 --- a/src/main/java/aztech/modern_industrialization/MIItem.java +++ b/src/main/java/aztech/modern_industrialization/MIItem.java @@ -200,8 +200,6 @@ public final class MIItem { .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.MOB_LOOTING, null, 2.0))); public static final ItemDefinition KNOCKBACK_MODULE = itemNoModel("Knockback Module", "knockback_module", p -> new Item(p.maxCount(2)), ITEMS_OTHER) .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.KNOCKBACK, null, 1.25))); - public static final ItemDefinition SWEEPING_EDGE_MODULE = itemNoModel("Sweeping Edge Module", "sweeping_edge_module", p -> new Item(p.maxCount(3)), ITEMS_OTHER) - .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SWEEPING_EDGE, null, 1.5))); public static final ItemDefinition SHARPNESS_MODULE = itemNoModel("Sharpness Module", "sharpness_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) .withItemRegistrationEvent(item -> ModuleRegistry.register(item, new ModuleProperties(Enchantments.SHARPNESS, null, 1.25))); public static final ItemDefinition SMITE_MODULE = itemNoModel("Smite Module", "smite_module", p -> new Item(p.maxCount(5)), ITEMS_OTHER) diff --git a/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json b/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json deleted file mode 100644 index 143ab2f2a..000000000 --- a/src/main/resources/assets/modern_industrialization/models/item/sweeping_edge_module.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "modern_industrialization:item/upgrade_module" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json index 12350b7f3..547ed00bb 100644 --- a/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json +++ b/src/main/resources/assets/modern_industrialization/patchouli_books/book/en_us/entries/electric_age/modular_tools.json @@ -78,11 +78,6 @@ "recipe": "modern_industrialization:tools/knockback_module", "text": "Adds a level of Knockback, stacks up to 2, and increases energy consumption by 1.25x" }, - { - "type": "crafting", - "recipe": "modern_industrialization:tools/sweeping_edge_module", - "text": "Adds a level of Sweeping Edge, stacks up to 3, and increases energy consumption by 1.5x" - }, { "type": "crafting", "recipe": "modern_industrialization:tools/sharpness_module", diff --git a/src/main/resources/data/minecraft/tags/items/coals.json b/src/main/resources/data/c/items/coals.json similarity index 93% rename from src/main/resources/data/minecraft/tags/items/coals.json rename to src/main/resources/data/c/items/coals.json index 5d4151ace..fee53c7b4 100644 --- a/src/main/resources/data/minecraft/tags/items/coals.json +++ b/src/main/resources/data/c/items/coals.json @@ -1,6 +1,6 @@ -{ - "replace": false, - "values": [ - "modern_industrialization:lignite_coal" - ] -} +{ + "replace": false, + "values": [ + "modern_industrialization:lignite_coal" + ] +} diff --git a/src/main/resources/data/modern_industrialization/recipes/tools/sweeping_edge_module.json b/src/main/resources/data/modern_industrialization/recipes/tools/sweeping_edge_module.json deleted file mode 100644 index 355981bcf..000000000 --- a/src/main/resources/data/modern_industrialization/recipes/tools/sweeping_edge_module.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "###", - "#b ", - " " - ], - "key": { - "b": { - "item": "modern_industrialization:analog_circuit_board" - }, - "#": { - "item": "modern_industrialization:copper_fine_wire" - } - }, - "result": { - "item": "modern_industrialization:sweeping_edge_module" - } -} From 202acd262a88005cf7085858519ba8438edc1cc3 Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Thu, 2 Nov 2023 17:44:38 -0700 Subject: [PATCH 17/18] fix license headers --- gradle.properties | 2 +- .../blocks/toolstation/ToolStationScreen.java | 2 +- .../item/modular_tools/CasingRegistry.java | 23 +++++++++++++++++++ .../api/item/modular_tools/ComponentTier.java | 23 +++++++++++++++++++ .../EnergyConverterRegistry.java | 23 +++++++++++++++++++ .../modular_tools/EnergyStorageRegistry.java | 23 +++++++++++++++++++ .../api/item/modular_tools/HeadRegistry.java | 23 +++++++++++++++++++ .../item/modular_tools/ModuleRegistry.java | 23 +++++++++++++++++++ .../blocks/toolstation/ToolStationBlock.java | 2 +- .../toolstation/ToolStationScreenHandler.java | 2 +- .../items/modulartools/ModularToolItem.java | 2 +- .../materials/part/DrillHeadPart.java | 23 +++++++++++++++++++ .../materials/part/RotaryBladePart.java | 23 +++++++++++++++++++ 13 files changed, 189 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9ce83c4ef..89d13648f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # Done to increase the memory available to gradle. # Also add exports for google-java-format to work in 1.16 -org.gradle.jvmargs=-Xmx1G \ +org.gradle.jvmargs=-Xmx8G \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ diff --git a/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java b/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java index de52cfc90..681c565d9 100644 --- a/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java +++ b/src/client/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreen.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Justin Hu + * Copyright (c) 2020 Azercoco & Technici4n * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java index a9fd18536..b9debf044 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/CasingRegistry.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import java.util.IdentityHashMap; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java index 5df9e64bb..131b7119b 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ComponentTier.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java index aabeb8b64..f0471db19 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyConverterRegistry.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java index dcfb9cb8d..82638087c 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/EnergyStorageRegistry.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import aztech.modern_industrialization.items.modulartools.ModularToolItem.EnergyType; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java index 76fc40b61..e192233f3 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/HeadRegistry.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import aztech.modern_industrialization.items.modulartools.ModularToolItem.ToolType; diff --git a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java index 1add8114f..5820618a8 100644 --- a/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java +++ b/src/main/java/aztech/modern_industrialization/api/item/modular_tools/ModuleRegistry.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.api.item.modular_tools; import java.util.IdentityHashMap; diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java index 053b47fa6..a0dd94a0c 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationBlock.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Justin Hu + * Copyright (c) 2020 Azercoco & Technici4n * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java index 47fc56fb6..fbc3007c1 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Justin Hu + * Copyright (c) 2020 Azercoco & Technici4n * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java index d44ebaf02..f944abb6d 100644 --- a/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java +++ b/src/main/java/aztech/modern_industrialization/items/modulartools/ModularToolItem.java @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Justin Hu + * Copyright (c) 2020 Azercoco & Technici4n * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java index d82c8699e..9bbd9722e 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/DrillHeadPart.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.materials.part; import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; diff --git a/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java index e1c48a02e..cc1910d15 100644 --- a/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java +++ b/src/main/java/aztech/modern_industrialization/materials/part/RotaryBladePart.java @@ -1,3 +1,26 @@ +/* + * MIT License + * + * Copyright (c) 2020 Azercoco & Technici4n + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ package aztech.modern_industrialization.materials.part; import aztech.modern_industrialization.api.item.modular_tools.ComponentTier; From 3d08c51951a800531076068fba9ac5467a26aa25 Mon Sep 17 00:00:00 2001 From: Justin Hu Date: Thu, 2 Nov 2023 18:06:17 -0700 Subject: [PATCH 18/18] Fix shift-click of stacks Now can't place a whole stack into the tool's slot --- .../toolstation/ToolStationScreenHandler.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java index fbc3007c1..c5061df59 100644 --- a/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java +++ b/src/main/java/aztech/modern_industrialization/blocks/toolstation/ToolStationScreenHandler.java @@ -359,6 +359,65 @@ public ItemStack quickMoveStack(Player player, int index) { return moved; } + @Override + protected boolean moveItemStackTo(ItemStack toMove, int startIndex, int endIndex, boolean reverseDirection) { + ItemStack target; + Slot slot; + boolean moved = false; + int slotIdx = startIndex; + if (reverseDirection) { + slotIdx = endIndex - 1; + } + if (toMove.isStackable()) { + while (!toMove.isEmpty() && (reverseDirection ? slotIdx >= startIndex : slotIdx < endIndex)) { + slot = this.slots.get(slotIdx); + target = slot.getItem(); + if (!target.isEmpty() && ItemStack.isSameItemSameTags(toMove, target)) { + int j = target.getCount() + toMove.getCount(); + if (j <= slot.getMaxStackSize(toMove)) { + toMove.setCount(0); + target.setCount(j); + slot.setChanged(); + moved = true; + } else if (target.getCount() < slot.getMaxStackSize(toMove)) { + toMove.shrink(slot.getMaxStackSize(toMove) - target.getCount()); + target.setCount(slot.getMaxStackSize(toMove)); + slot.setChanged(); + moved = true; + } + } + if (reverseDirection) { + --slotIdx; + continue; + } + ++slotIdx; + } + } + if (!toMove.isEmpty()) { + slotIdx = reverseDirection ? endIndex - 1 : startIndex; + while (reverseDirection ? slotIdx >= startIndex : slotIdx < endIndex) { + slot = this.slots.get(slotIdx); + target = slot.getItem(); + if (target.isEmpty() && slot.mayPlace(toMove)) { + if (toMove.getCount() > slot.getMaxStackSize()) { + slot.setByPlayer(toMove.split(slot.getMaxStackSize())); + } else { + slot.setByPlayer(toMove.split(toMove.getCount())); + } + slot.setChanged(); + moved = true; + break; + } + if (reverseDirection) { + --slotIdx; + continue; + } + ++slotIdx; + } + } + return moved; + } + public void removed(Player player) { super.removed(player); this.context.execute((world, blockPos) -> {