From 2da205c22d142f0a2ea0f1292117bc06195f2ab1 Mon Sep 17 00:00:00 2001 From: 90 Date: Sun, 18 Feb 2024 16:57:25 +0000 Subject: [PATCH] Fix being unable to disassemble portable chemical, mana and source cells --- .../megacells/integration/appbot/AppBotItems.java | 12 +++++++++++- .../megacells/integration/appmek/AppMekItems.java | 12 +++++++++++- .../megacells/integration/arseng/ArsEngItems.java | 12 +++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/gripe/_90/megacells/integration/appbot/AppBotItems.java b/common/src/main/java/gripe/_90/megacells/integration/appbot/AppBotItems.java index b978b2a2..3ebd797d 100644 --- a/common/src/main/java/gripe/_90/megacells/integration/appbot/AppBotItems.java +++ b/common/src/main/java/gripe/_90/megacells/integration/appbot/AppBotItems.java @@ -2,6 +2,10 @@ import java.util.List; +import org.jetbrains.annotations.NotNull; + +import net.minecraft.resources.ResourceLocation; + import appeng.core.definitions.ItemDefinition; import appeng.items.materials.MaterialItem; import appeng.items.storage.StorageTier; @@ -58,6 +62,12 @@ private static ItemDefinition portable(StorageTier tier) { return MEGAItems.item( tier.namePrefix().toUpperCase() + " Portable Mana Cell", "portable_mana_cell_" + tier.namePrefix(), - p -> new PortableManaCellItem(p, tier.bytes() / 1024, tier.idleDrain())); + p -> new PortableManaCellItem(p, tier.bytes() / 1024, tier.idleDrain()) { + @NotNull + @Override + public ResourceLocation getRecipeId() { + return MEGACells.makeId("cells/portable/portable_mana_cell_" + tier.namePrefix()); + } + }); } } diff --git a/forge/src/main/java/gripe/_90/megacells/integration/appmek/AppMekItems.java b/forge/src/main/java/gripe/_90/megacells/integration/appmek/AppMekItems.java index 518f1b01..c45e615d 100644 --- a/forge/src/main/java/gripe/_90/megacells/integration/appmek/AppMekItems.java +++ b/forge/src/main/java/gripe/_90/megacells/integration/appmek/AppMekItems.java @@ -2,6 +2,10 @@ import java.util.List; +import org.jetbrains.annotations.NotNull; + +import net.minecraft.resources.ResourceLocation; + import appeng.core.definitions.ItemDefinition; import appeng.items.materials.MaterialItem; import appeng.items.storage.StorageTier; @@ -70,6 +74,12 @@ private static ItemDefinition portable(StorageTier tie return MEGAItems.item( tier.namePrefix().toUpperCase() + " Portable Chemical Cell", "portable_chemical_cell_" + tier.namePrefix(), - p -> new ChemicalPortableCellItem(18, AMMenus.PORTABLE_CHEMICAL_CELL_TYPE, tier, p, 0x33528D)); + p -> new ChemicalPortableCellItem(18, AMMenus.PORTABLE_CHEMICAL_CELL_TYPE, tier, p, 0x33528D) { + @NotNull + @Override + public ResourceLocation getRecipeId() { + return MEGACells.makeId("cells/portable/portable_chemical_cell_" + tier.namePrefix()); + } + }); } } diff --git a/forge/src/main/java/gripe/_90/megacells/integration/arseng/ArsEngItems.java b/forge/src/main/java/gripe/_90/megacells/integration/arseng/ArsEngItems.java index 7b074ada..5a6a8062 100644 --- a/forge/src/main/java/gripe/_90/megacells/integration/arseng/ArsEngItems.java +++ b/forge/src/main/java/gripe/_90/megacells/integration/arseng/ArsEngItems.java @@ -2,6 +2,10 @@ import java.util.List; +import org.jetbrains.annotations.NotNull; + +import net.minecraft.resources.ResourceLocation; + import appeng.core.definitions.ItemDefinition; import appeng.items.materials.MaterialItem; import appeng.items.storage.StorageTier; @@ -57,6 +61,12 @@ private static ItemDefinition portable(StorageTier tier) return MEGAItems.item( tier.namePrefix().toUpperCase() + " Portable Source Cell", "portable_source_cell_" + tier.namePrefix(), - p -> new PortableSourceCellItem(p, tier)); + p -> new PortableSourceCellItem(p, tier) { + @NotNull + @Override + public ResourceLocation getRecipeId() { + return MEGACells.makeId("cells/portable/portable_source_cell_" + tier.namePrefix()); + } + }); } }