mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Implement isItemValidForSlot for ItemHandlers and obey it for inserting
This commit is contained in:
1 parent
83d0c81151
commit
1a05fc9680
14 files changed
+135
-21
No files matched your search
@@ -11,6 +11,7 @@ import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.gas.GasTankInfo;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Upgrade;
|
||||
@@ -361,4 +362,9 @@ public class TileEntitySolarNeutronActivator extends TileEntityContainerBlock im
|
||||
public int[] getSlotsForFace(@Nonnull EnumFacing side) {
|
||||
return side == facing ? new int[]{1} : new int[]{0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, @Nonnull ItemStack stack) {
|
||||
return stack.getItem() instanceof IGasItem;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user