Skip to content

Commit

Permalink
Fix being unable to disassemble portable chemical, mana and source cells
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Feb 18, 2024
1 parent 65bdb75 commit 2da205c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -58,6 +62,12 @@ private static ItemDefinition<PortableManaCellItem> 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());
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -70,6 +74,12 @@ private static ItemDefinition<ChemicalPortableCellItem> 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());
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -57,6 +61,12 @@ private static ItemDefinition<PortableSourceCellItem> 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());
}
});
}
}

0 comments on commit 2da205c

Please sign in to comment.