use of pneumaticCraft.client.gui.GuiInventorySearcher in project PneumaticCraft by MineMaarten.
the class GuiProgWidgetCoordinate method actionPerformed.
@Override
public void actionPerformed(GuiButton button) {
if (button.id == 0) {
invSearchGui = new GuiInventorySearcher(FMLClientHandler.instance().getClient().thePlayer);
ChunkPosition area = widget.getRawCoordinate();
ItemStack gps = new ItemStack(Itemss.GPSTool);
ItemGPSTool.setGPSLocation(gps, area.chunkPosX, area.chunkPosY, area.chunkPosZ);
invSearchGui.setSearchStack(ItemGPSTool.getGPSLocation(gps) != null ? gps : null);
FMLClientHandler.instance().showGuiScreen(invSearchGui);
}
super.actionPerformed(button);
}
use of pneumaticCraft.client.gui.GuiInventorySearcher in project PneumaticCraft by MineMaarten.
the class GuiProgWidgetArea method actionPerformed.
@Override
public void actionPerformed(GuiButton button) {
if (button.id == 0 || button.id == 1) {
invSearchGui = new GuiInventorySearcher(FMLClientHandler.instance().getClient().thePlayer);
ItemStack gps = new ItemStack(Itemss.GPSTool);
if (button.id == 0) {
ItemGPSTool.setGPSLocation(gps, widget.x1, widget.y1, widget.z1);
} else {
ItemGPSTool.setGPSLocation(gps, widget.x2, widget.y2, widget.z2);
}
invSearchGui.setSearchStack(ItemGPSTool.getGPSLocation(gps) != null ? gps : null);
FMLClientHandler.instance().showGuiScreen(invSearchGui);
pointSearched = button.id;
}
super.actionPerformed(button);
}
use of pneumaticCraft.client.gui.GuiInventorySearcher in project PneumaticCraft by MineMaarten.
the class GuiProgWidgetItemFilter method actionPerformed.
@Override
public void actionPerformed(GuiButton button) {
if (button.id == 0) {
searchGui = new GuiSearcher(FMLClientHandler.instance().getClient().thePlayer);
searchGui.setSearchStack(widg.getFilter());
FMLClientHandler.instance().showGuiScreen(searchGui);
} else if (button.id == 1) {
invSearchGui = new GuiInventorySearcher(FMLClientHandler.instance().getClient().thePlayer);
invSearchGui.setSearchStack(widg.getFilter());
FMLClientHandler.instance().showGuiScreen(invSearchGui);
} else if (button.id == 2) {
if (--widg.specificMeta < 0)
widg.specificMeta = 15;
} else if (button.id == 3) {
if (++widg.specificMeta > 15)
widg.specificMeta = 0;
}
super.actionPerformed(button);
}
Aggregations