diff --git a/src/main/java/li/netcube/mcvm/client/ui/DisplayGUI.java b/src/main/java/li/netcube/mcvm/client/ui/DisplayGUI.java index ca6b7e6..84f6dc1 100755 --- a/src/main/java/li/netcube/mcvm/client/ui/DisplayGUI.java +++ b/src/main/java/li/netcube/mcvm/client/ui/DisplayGUI.java @@ -11,7 +11,10 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiLabel; import net.minecraft.client.gui.GuiScreen; +<<<<<<< HEAD import net.minecraft.client.gui.ScaledResolution; +======= +>>>>>>> refs/remotes/origin/master import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.DynamicTexture; @@ -88,6 +91,10 @@ public String get() { client = new VernacularClient(config); connect(); +<<<<<<< HEAD +======= + +>>>>>>> refs/remotes/origin/master Keyboard.enableRepeatEvents(true); } @@ -223,6 +230,7 @@ public void DisplayDrawTexturedModalRect(int x, int y, int width, int height) boolean lastMouseR = false; public void checkMouse(int bX, int bY, int bW, int bH) { +<<<<<<< HEAD ScaledResolution scaledresolution = new ScaledResolution(Minecraft.getMinecraft()); float guiScale = scaledresolution.getScaleFactor()/2f; if (client != null && client.isRunning()) { @@ -254,6 +262,21 @@ public void checkMouse(int bX, int bY, int bW, int bH) { System.out.println(mouseX); System.out.println(mouseY); System.out.println("-------------"); +======= + if (client != null && client.isRunning()) { + int mouseX = Mouse.getX(); + int mouseY = Mouse.getY(); + if (lastMouseX != mouseX || lastMouseY != mouseY) { + lastMouseY = mouseY; lastMouseX = mouseX; + + mouseY = this.height - mouseY; + + mouseX = mouseX - bX; + mouseY = mouseY + bY; + + mouseX = scaleMouseX(mouseX, bW, bW); + mouseY = scaleMouseY(mouseY, bH, bH); +>>>>>>> refs/remotes/origin/master if (mouseX < 0) {mouseX = 0;} @@ -261,7 +284,11 @@ public void checkMouse(int bX, int bY, int bW, int bH) { if (mouseY < 0) {mouseY = 0;} if (mouseY > bH) {mouseY = bH;} +<<<<<<< HEAD client.moveMouse((int)(mouseX/guiScale), (int)(mouseY/guiScale)); +======= + client.moveMouse(mouseX, mouseY); +>>>>>>> refs/remotes/origin/master } boolean mouseL = Mouse.isButtonDown(0); diff --git a/src/main/java/li/netcube/mcvm/util/vm/VirtualMachine.java b/src/main/java/li/netcube/mcvm/util/vm/VirtualMachine.java index e001d54..bc226b4 100755 --- a/src/main/java/li/netcube/mcvm/util/vm/VirtualMachine.java +++ b/src/main/java/li/netcube/mcvm/util/vm/VirtualMachine.java @@ -186,7 +186,16 @@ public void start() { errorGobbler.start(); outputGobbler.start(); +<<<<<<< HEAD System.out.println(commandLine); +======= + //builder.directory(gameFolder); + + System.out.println(commandLine); + //builder.inheritIO(); + //builder.redirectOutput(new File("mcvm_vmlog.txt")); + //builder.redirectError(new File("mcvm_vmerrlog.txt")); +>>>>>>> refs/remotes/origin/master System.out.println(); MCVM.virtualMachines.add(this); diff --git a/src/main/resources/assets/mcvm/models/item/computer.json b/src/main/resources/assets/mcvm/models/item/computer.json new file mode 100755 index 0000000..63e6b50 --- /dev/null +++ b/src/main/resources/assets/mcvm/models/item/computer.json @@ -0,0 +1,3 @@ +{ + "parent": "mcvm:block/computer" +} \ No newline at end of file diff --git a/src/main/resources/assets/mcvm/models/item/display.json b/src/main/resources/assets/mcvm/models/item/display.json new file mode 100755 index 0000000..4394eb1 --- /dev/null +++ b/src/main/resources/assets/mcvm/models/item/display.json @@ -0,0 +1,3 @@ +{ + "parent": "mcvm:block/display" +} \ No newline at end of file