use of crazypants.enderio.conduits.network.PacketItemConduitFilter 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()));
}
Aggregations