Jump to content

xSlart01x

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by xSlart01x

  1. Any news?
  2. Little bump bc i need an answer to complete my mod...
  3. This is your Launcher directory and not your game directory Try to go here: %appdata%/.minecraft/logs (Just copy and paste it)
  4. 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).
  5. 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.
  6. 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).
  7. 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
  8. Hi, i've solved some issues by adding this to the if statement: Minecraft.getInstance().currentScreen == null Maybe could help
  9. Nvm, solved. I was overriding onClose() too. So, i've added this and it seems to work: Minecraft.getInstance().player.closeScreen();
  10. 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?
  11. Easy way to update buttonName.displayString = "Something" to 1.15.2?
  12. so.. i should completely remove this check? if (this.mc.currentScreen instanceof GuiScreenKeystrokes)
  13. 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(); } }
  14. Hi, it's me again. I'm now locked on this istruction: Minecraft.getInstance().currentScreen.handleInput() Any tips? Thanks.
  15. Mhhh.... If i declare an object ITextComponent style; // Then style.getStyle(); Where i set the style? p.s. if it is all wrong excuse me but i've not understood so much..
  16. Okay.. maybe i've understood... So.... Style cs = new Style(); Then cs.setStyle(/*Color?*/); // Now output of the chat message: mc.player.sendMessage((ITextComponent)new StringTextComponent("*String*"); And what goes inside setStyle?
  17. Firstly, thanks for the answer. Now, i've never used this type of.. istruction? What should be the type "Class#method" ?
  18. Hi everyone, i'm trying to update an 1.8.9 mod to 1.15.2. For now, i'm blocked on this component. Old code was: ManageKeys.mc.thePlayer.addChatMessage((IChatComponent)new ChatComponentText(ChatFormatting.RED + "*string*")); New code (actually) is: ManageKeys.mc.player.sendMessage((ITextComponent)new ChatComponentText(ChatFormatting.RED + "*string*")); I don't now if i'm doing right but i'm blocked here. Appreciating your help. Best regards, Slart.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.