
- [1.15.2] Draggable GUI
-
xSlart01x changed their profile photo
-
[1.15.2] Draggable GUI
Little bump bc i need an answer to complete my mod...
-
My minecraft mods not popping up!
This is your Launcher directory and not your game directory Try to go here: %appdata%/.minecraft/logs (Just copy and paste it)
-
My minecraft mods not popping up!
Please upload your debug.log and your latest.log so we could try to help. They are on your minecraft folder inside a folder called logs. (Default installation directory: %appdata%/.minecraft/logs).
-
[1.15.2] Draggable GUI
Hi, this is my Screen class with the explaining of my problem: public class GuiScreen extends Screen { private boolean dragging; private int lastMouseX; private int lastMouseY; public GuiScreen() { super(new StringTextComponent("MyGUI")); this.dragging = false; } // [...] // I'm not sure if this is right: [ protected void mouseClicked(final int mouseX, final int mouseY, final int button) { super.mouseClicked(mouseX, mouseY, button); if (button == 0) { final SlartStrokesSettings settings = SlartStrokesMod.getSettings(); final int startX = settings.getX(); final int startY = settings.getY(); final int endX = startX + 74; final int endY = startY + (settings.isShowingMouseButtons() ? 74 : 50); if (mouseX >= startX && mouseX <= endX && mouseY >= startY && mouseY <= endY) { this.dragging = true; this.lastMouseX = mouseX; this.lastMouseY = mouseY; } } } protected void mouseReleased(final int mouseX, final int mouseY, final int action) { super.mouseReleased(mouseX, mouseY, action); this.dragging = false; } // ] // Then, the real problem. What is the 1.15.2 version of mouseClickMove ? protected void mouseClickMove(final int mouseX, final int mouseY, final int lastButtonClicked, final long timeSinceMouseClick) { super.mouseClickMove(mouseX, mouseY, lastButtonClicked, timeSinceMouseClick); if (this.dragging) { final SlartStrokesSettings settings = SlartStrokesMod.getSettings(); settings.setX(settings.getX() + mouseX - this.lastMouseX); settings.setY(settings.getY() + mouseY - this.lastMouseY); this.lastMouseX = mouseX; this.lastMouseY = mouseY; } } Best regards.
-
working on mods without internet
Post the full log here. I worked on my mod even without connection so it shouldn't give you any error (except "unkown host" but it may not be relevant).
-
Cant find mods in folder but game is crashing
Sorry, my fault.
-
Cant find mods in folder but game is crashing
As said by diesieben07, it is on your minecraft directory. But, if you are running client from your IDE (i.g. eclipse or IntelliJ Idea), you can find it on your workspace directory. Into that there is run/logs/debug.log
-
[1.14.4] KeyBinding falsely reporting isPressed after using inventory
Hi, i've solved some issues by adding this to the if statement: Minecraft.getInstance().currentScreen == null Maybe could help
-
[1.15.2] Button.displayString
Nvm, solved. I was overriding onClose() too. So, i've added this and it seems to work: Minecraft.getInstance().player.closeScreen();
-
[1.15.2] Button.displayString
Oh it was so simple... Thanks anyway . Another little question, if i can. I tried to make the GUI closing when ESC is pressed. So, I overrode the boolean method "shouldCloseOnEsc" from the class Screen to return true, as follows: @Override public boolean shouldCloseOnEsc() { return true; } But it didn't work. Any tips?
-
[1.15.2] Button.displayString
Easy way to update buttonName.displayString = "Something" to 1.15.2?
-
[1.15.2] Updating handleInput()
so.. i should completely remove this check? if (this.mc.currentScreen instanceof GuiScreenKeystrokes)
-
[1.15.2] Updating handleInput()
Fun fuct, i neither remember what it should do, cause i did my mod so much time ago... :') Anyway, this is the full method: @SubscribeEvent public void onRenderTick(final TickEvent.RenderTickEvent event) { if (this.mc.currentScreen != null) { if (this.mc.currentScreen instanceof GuiScreenKeystrokes) { try { Minecraft.getInstance().currentScreen.handleInput(); // @FIXME } catch (Exception e) { e.printStackTrace(); } } } else if (this.mc.isGameFocused() && !this.mc.gameSettings.showDebugInfo) { this.renderKeystrokes(); } }
-
[1.15.2] Updating handleInput()
Hi, it's me again. I'm now locked on this istruction: Minecraft.getInstance().currentScreen.handleInput() Any tips? Thanks.
IPS spam blocked by CleanTalk.