
Does radioactive cell works at 1.18?
Goufix opened this issue ยท 2 comments
I tried to use radioactive cell, but it doesn't work.
A superficial code inspect give me a hypothesis
MEGAChemicalCell
implementation is kinda different from MEGARadioactiveCell
one.
I think that it should be the same, with inverted filter, AIR?
Not how it works in the slightest. The radioactive cell uses its own custom inventory and handler altogether and requires you to filter it in advance with the chemical you want it to hold, similarly to the Bulk Item Cell.
I thought of something like this:
public class MEGARadioactiveCell extends MEGAStorageCell {
public MEGARadioactiveCell(Properties properties) {
super(properties.stacksTo(1), MEGATier._256M, AppMekCellType.CHEMICAL);
}
public void appendHoverText(ItemStack is, Level level, List<Component> lines, TooltipFlag advancedTooltips) {
addCellInformationToTooltip(is, lines);
}
@Override
public boolean isBlackListed(ItemStack cellItem, AEKey requestedAddition) {
if (requestedAddition instanceof MekanismKey key) {
// blacklist anything but radioactive
return ChemicalAttributeValidator.DEFAULT.process(key.getStack());
}
return true;
}
}