use of crazypants.enderio.conduits.network.PacketExtractMode in project EnderIO by SleepyTrousers.
the class ConduitRedstoneModeControlable method setRedstoneControlMode.
@Override
public void setRedstoneControlMode(@Nonnull RedstoneControlMode mode) {
RedstoneControlMode curMode = getRedstoneControlMode();
con.setExtractionRedstoneMode(mode, gui.getDir());
colorB.onGuiInit();
colorB.setColorIndex(con.getExtractionSignalColor(gui.getDir()).ordinal());
if (mode == RedstoneControlMode.OFF || mode == RedstoneControlMode.ON) {
colorB.setIsVisible(true);
} else {
colorB.setIsVisible(false);
}
if (curMode != mode) {
PacketHandler.INSTANCE.sendToServer(new PacketExtractMode(con, gui.getDir()));
}
}
use of crazypants.enderio.conduits.network.PacketExtractMode in project EnderIO by SleepyTrousers.
the class ItemSettings method connectionModeChanged.
@Override
protected void connectionModeChanged(@Nonnull ConnectionMode mode) {
super.connectionModeChanged(mode);
PacketHandler.INSTANCE.sendToServer(new PacketExtractMode(itemConduit, gui.getDir()));
updateGuiVisibility();
}
use of crazypants.enderio.conduits.network.PacketExtractMode in project EnderIO by SleepyTrousers.
the class ItemSettings method actionPerformed.
@Override
public void actionPerformed(@Nonnull GuiButton guiButton) {
super.actionPerformed(guiButton);
if (guiButton.id == ID_COLOR_BUTTON) {
itemConduit.setExtractionSignalColor(gui.getDir(), DyeColor.fromIndex(colorB.getColorIndex()));
PacketHandler.INSTANCE.sendToServer(new PacketExtractMode(itemConduit, gui.getDir()));
return;
} else if (guiButton.id == ID_LOOP) {
itemConduit.setSelfFeedEnabled(gui.getDir(), !itemConduit.isSelfFeedEnabled(gui.getDir()));
} else if (guiButton.id == ID_ROUND_ROBIN) {
itemConduit.setRoundRobinEnabled(gui.getDir(), !itemConduit.isRoundRobinEnabled(gui.getDir()));
} else if (guiButton.id == ID_PRIORITY_UP) {
itemConduit.setOutputPriority(gui.getDir(), itemConduit.getOutputPriority(gui.getDir()) + 1);
} else if (guiButton.id == ID_PRIORITY_DOWN) {
itemConduit.setOutputPriority(gui.getDir(), itemConduit.getOutputPriority(gui.getDir()) - 1);
} else if (guiButton.id == ID_INSERT_CHANNEL) {
DyeColor col = DyeColor.values()[insertChannelB.getColorIndex()];
itemConduit.setOutputColor(gui.getDir(), col);
} else if (guiButton.id == ID_EXTRACT_CHANNEL) {
DyeColor col = DyeColor.values()[extractChannelB.getColorIndex()];
itemConduit.setInputColor(gui.getDir(), col);
} else if (guiButton.id == ID_INSERT_FILTER_OPTIONS) {
doOpenFilterGui(FilterGuiUtil.INDEX_OUTPUT);
return;
} else if (guiButton.id == ID_EXTRACT_FILTER_OPTIONS) {
doOpenFilterGui(FilterGuiUtil.INDEX_INPUT);
return;
}
PacketHandler.INSTANCE.sendToServer(new PacketItemConduitFilter(itemConduit, gui.getDir()));
}
use of crazypants.enderio.conduits.network.PacketExtractMode in project EnderIO by SleepyTrousers.
the class LiquidSettings method actionPerformed.
@Override
public void actionPerformed(@Nonnull GuiButton guiButton) {
super.actionPerformed(guiButton);
if (guiButton.id == ID_COLOR_BUTTON) {
conduit.setExtractionSignalColor(gui.getDir(), DyeColor.fromIndex(colorB.getColorIndex()));
PacketHandler.INSTANCE.sendToServer(new PacketExtractMode(conduit, gui.getDir()));
} else if (guiButton.id == ID_INSERT_WHITELIST) {
toggleBlacklist(false);
} else if (guiButton.id == ID_EXTRACT_WHITELIST) {
toggleBlacklist(true);
}
}
use of crazypants.enderio.conduits.network.PacketExtractMode in project EnderIO by SleepyTrousers.
the class PowerSettings method actionPerformed.
@Override
public void actionPerformed(@Nonnull GuiButton guiButton) {
super.actionPerformed(guiButton);
if (guiButton.id == ID_COLOR_BUTTON) {
conduit.setExtractionSignalColor(gui.getDir(), DyeColor.fromIndex(colorB.getColorIndex()));
PacketHandler.INSTANCE.sendToServer(new PacketExtractMode(conduit, gui.getDir()));
}
}
Aggregations