mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
prevent the side IO mode from being toggled for the inventory panel
This commit is contained in:
1 parent
b6cc814767
commit
b9b20ddbc4
2 files changed
+20
-1
No files matched your search
@@ -20,6 +20,7 @@ import crazypants.enderio.conduit.item.ItemConduitNetwork;
|
||||
import crazypants.enderio.conduit.item.filter.IItemFilter;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.machine.AbstractMachineEntity;
|
||||
import crazypants.enderio.machine.IoMode;
|
||||
import crazypants.enderio.machine.SlotDefinition;
|
||||
import crazypants.enderio.machine.generator.zombie.IHasNutrientTank;
|
||||
import crazypants.enderio.machine.generator.zombie.PacketNutrientTank;
|
||||
@@ -283,6 +284,7 @@ public class TileInventoryPanel extends AbstractMachineEntity implements IFluidH
|
||||
fuelTank.readCommon("fuelTank", nbtRoot);
|
||||
guiSortMode = nbtRoot.getInteger("guiSortMode");
|
||||
guiFilterString = nbtRoot.getString("guiFilterString");
|
||||
faceModes = null;
|
||||
|
||||
storedCraftingRecipes.clear();
|
||||
NBTTagList recipesNBT = (NBTTagList) nbtRoot.getTag("craftingRecipes");
|
||||
@@ -319,6 +321,20 @@ public class TileInventoryPanel extends AbstractMachineEntity implements IFluidH
|
||||
return ModObject.blockInventoryPanel.unlocalisedName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IoMode getIoMode(ForgeDirection face) {
|
||||
return face == getIODirection() ? IoMode.NONE : IoMode.DISABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIoMode(ForgeDirection faceHit, IoMode mode) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IoMode toggleIoModeForFace(ForgeDirection faceHit) {
|
||||
return getIoMode(faceHit);
|
||||
}
|
||||
|
||||
private ForgeDirection getIODirection() {
|
||||
return getFacingDir().getOpposite();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import crazypants.enderio.gui.TooltipAddera;
|
||||
import crazypants.enderio.machine.IIoConfigurable;
|
||||
import crazypants.enderio.machine.IoMode;
|
||||
import crazypants.enderio.machine.capbank.TileCapBank;
|
||||
import crazypants.enderio.machine.invpanel.TileInventoryPanel;
|
||||
import crazypants.enderio.machine.power.PowerDisplayUtil;
|
||||
import crazypants.enderio.power.IInternalPoweredTile;
|
||||
import crazypants.util.IFacade;
|
||||
@@ -180,7 +181,9 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
IoMode mode = machine.getIoMode(side);
|
||||
currenttip.add(EnumChatFormatting.YELLOW
|
||||
+ String.format(Lang.localize("gui.machine.side"), EnumChatFormatting.WHITE + Lang.localize("gui.machine.side." + side.name().toLowerCase())));
|
||||
currenttip.add(EnumChatFormatting.YELLOW + String.format(Lang.localize("gui.machine.ioMode"), mode.colorLocalisedName()));
|
||||
if(!(te instanceof TileInventoryPanel)) {
|
||||
currenttip.add(EnumChatFormatting.YELLOW + String.format(Lang.localize("gui.machine.ioMode"), mode.colorLocalisedName()));
|
||||
}
|
||||
}
|
||||
|
||||
if(block instanceof IWailaInfoProvider) {
|
||||
|
||||
Reference in new issue
Block a user