mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 12:19:55 +00:00
Fix farm crashing when IO config is pressed
This commit is contained in:
1 parent
b9fd4c1a19
commit
4841edb8d7
2 files changed
+11
-5
No files matched your search
@@ -137,6 +137,7 @@ public class BlockDarkSteelPressurePlate extends BlockPressurePlate implements I
|
||||
return super.colorMultiplier(world, x, y, z);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item arg0, CreativeTabs arg1, List items) {
|
||||
|
||||
@@ -49,12 +49,14 @@ public class GuiFarmStation extends GuiPoweredMachineBase {
|
||||
@Override
|
||||
protected void drawForegroundImpl(int mouseX, int mouseY) {
|
||||
super.drawForegroundImpl(mouseX, mouseY);
|
||||
|
||||
|
||||
if(inventorySlots.inventorySlots.size() >= farm.maxSupSlot && !isConfigOverlayEnabled()) {
|
||||
for (int i : farm.lockedSlots) {
|
||||
Slot slot = inventorySlots.getSlot(i);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
RenderUtil.renderQuad2D(slot.xDisplayPosition, slot.yDisplayPosition, 0, 16, 16, new Vector4f(0, 0, 0, 0.5));
|
||||
if (i < inventorySlots.inventorySlots.size()) { // hack to allow old broken farms to be opened
|
||||
Slot slot = inventorySlots.getSlot(i);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
RenderUtil.renderQuad2D(slot.xDisplayPosition, slot.yDisplayPosition, 0, 16, 16, new Vector4f(0, 0, 0, 0.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,7 +85,10 @@ public class GuiFarmStation extends GuiPoweredMachineBase {
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton b) {
|
||||
farm.toggleLockedState(b.id);
|
||||
if (b instanceof ToggleButtonEIO) {
|
||||
farm.toggleLockedState(b.id);
|
||||
}
|
||||
super.actionPerformed(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user