use of com.github.lunatrius.schematica.client.gui.load.GuiSchematicLoad in project Spark-Client by Spark-Client-Development.
the class SchematicaConfig method onKeyInput.
@SubscribeEvent
public void onKeyInput(final InputEvent event) {
if (mc.currentScreen == null) {
final SchematicWorld schematic = ClientProxy.schematic;
int key = event.getKey();
if (key == LOAD.getKey())
mc.displayGuiScreen(new GuiSchematicLoad(mc.currentScreen));
if (key == CONTROL.getKey())
mc.displayGuiScreen(new GuiSchematicControl(mc.currentScreen));
if (key == LAYER_INC.getKey())
if (schematic != null && schematic.layerMode != SchematicWorld.LayerMode.ALL) {
schematic.renderingLayer = MathHelper.clamp(schematic.renderingLayer + 1, 0, schematic.getHeight() - 1);
RenderSchematic.INSTANCE.refresh();
}
if (key == LAYER_DEC.getKey())
if (schematic != null && schematic.layerMode != SchematicWorld.LayerMode.ALL) {
schematic.renderingLayer = MathHelper.clamp(schematic.renderingLayer - 1, 0, schematic.getHeight() - 1);
RenderSchematic.INSTANCE.refresh();
}
if (key == LAYER_TOGGLE.getKey())
if (schematic != null) {
schematic.layerMode = SchematicWorld.LayerMode.next(schematic.layerMode);
RenderSchematic.INSTANCE.refresh();
}
if (key == RENDER_TOGGLE.getKey())
if (schematic != null) {
schematic.isRendering = !schematic.isRendering;
RenderSchematic.INSTANCE.refresh();
}
if (key == MOVE_HERE.getKey())
if (schematic != null) {
ClientProxy.moveSchematicToPlayer(schematic);
RenderSchematic.INSTANCE.refresh();
}
if (key == PICK_BLOC.getKey())
if (schematic != null && schematic.isRendering) {
pickBlock(schematic, ClientProxy.objectMouseOver);
}
}
}
Aggregations