use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiArmourerBlockUtil in project Armourers-Workshop by RiskyKen.
the class GuiTabArmourerBlockUtils method dialogResult.
@Override
public void dialogResult(AbstractGuiDialog dialog, DialogResult result) {
if (result == DialogResult.OK & dialog != null) {
if (dialog instanceof GuiDialogClear) {
String tag = ((GuiDialogClear) dialog).getClearTag();
if (!StringUtils.isNullOrEmpty(tag)) {
ISkinPartType partType = SkinTypeRegistry.INSTANCE.getSkinPartFromRegistryName(tag);
boolean clearBlocks = ((GuiDialogClear) dialog).isClearBlocks();
boolean clearPaint = ((GuiDialogClear) dialog).isClearPaint();
boolean clearMarkers = ((GuiDialogClear) dialog).isClearMarkers();
MessageClientGuiArmourerBlockUtil message;
message = new MessageClientGuiArmourerBlockUtil("clear", partType, null, clearBlocks, clearPaint, clearMarkers);
PacketHandler.networkWrapper.sendToServer(message);
}
}
if (dialog instanceof GuiDialogCopy) {
ISkinPartType srcPart = ((GuiDialogCopy) dialog).getSrcPart();
ISkinPartType desPart = ((GuiDialogCopy) dialog).getDesPart();
boolean mirror = ((GuiDialogCopy) dialog).isMirror();
MessageClientGuiArmourerBlockUtil message;
message = new MessageClientGuiArmourerBlockUtil("copy", srcPart, desPart, mirror, false, false);
PacketHandler.networkWrapper.sendToServer(message);
}
}
}
Aggregations