Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Peyang

Members
  • Joined

  • Last visited

  1. Apparently my repository is cursed. It worked perfectly in other repositories. Thank you very much.
  2. When I reproduced it as another mod, it worked fine. I'll port the code to this mod and test it. I would appreciate it if you could tell me why it doesn't work. https://github.com/Yuki-At/RenderMod
  3. Ah, I'm sorry. I will try to reproduce it in personal project.
  4. Peyang changed their profile photo
  5. This is a mod that reproduces the GTA Wanted Star. 1. Build a PaperMC 1.15.2 server. 2. Copy https://github.com/TeamKun/GTAWantedDisplayTestPlugin/releases to plugins and do /reload or /restart. 3. Build https://github.com/TeamKun/GTA5WantedDisplayMod and enter the Bukkit server. 4. From the player, run /wanted <maxWanted> <nowWanted>. Note: maxWanted is the maximum number of stars and nowWanted is the number of stars to change Five stars will wrap to the next line. Test case: Input /wanted 10 4 Expected output: ★★★★☆ ☆☆☆☆☆ Input /wanted 5 3 Expected output: ★★★☆☆ Input /wanted 20 13 Expected output: ★★★★★ ★★★★★ ★★★☆☆ ☆☆☆☆☆ I look forward to working with you. Thank you
  6. Originally it was created to connect Bukkit and Forge with a Plugin Message. nowWanted is a dedicated plug-in "https://github.com/TeamKun/GTAWantedDisplayTestPlugin" Changed from "/ wanted <max> <now>". The server is Bukkit Server, not Forge Server. Also, nowWanted if passed safely and I was able to get standard output. I look forward to working with you. Also, this mod does not need to send packets, it intercepts packets from the server. I pushed the code for this log. public void draw() { if (nowWanted == 0) return; System.out.println("nowWanted: " + nowWanted);
  7. I'm sorry, when pasting from IDE, the variable name seems to disappear around the color... It actually compiles and draw () seems to be running. <-Checked with standard output. Also, my code is posted on GitHub, and if you have any questions, please take a look there. Also, I modified the code. https://github.com/TeamKun/GTA5WantedDisplayMod
  8. @SubscribeEvent public void onRender(final RenderGameOverlayEvent.Pre event) { if (event.getType() != RenderGameOverlayEvent.ElementType.ALL/*HEALTH*/) return; DrawTest.draw(); } public void draw() { if (nowWanted == 0) return; IngameGui gui = Minecraft.getInstance().ingameGUI; int maxWidth = Minecraft.getInstance().getMainWindow().getWidth(); int maxHeight = Minecraft.getInstance().getMainWindow().getHeight(); int width = Regions.getStringWidth(StringUtils.repeat(/*'\u2606'*/"a", 5)); String nowS= StringUtils.repeat(/*'\u2605'*/"a", 5); String maxS= StringUtils.repeat(/*'\u2606'*/"b", 5); String cS= nowS+ maxS; Matcher matcher = new Pattern("[\\s]{1,5}").matcher(cS); AtomicInteger ip = new AtomicInteger(); FontRenderer fr = Minecraft.getInstance().fontRenderer; while (matcher.find()) { //drawText(matcher.group(), 2, 2); gui.drawCenteredString(fr, "Test123", 20, 20, 0xffFFFFFF); ip.set(ip.get() + 11); } } public static final int FULL_COLOR = Regions.colorFromRGB(255, 255, 255, 255) public static int colorFromRGB(Number red, Number green, Number blue, Number alpha) { return red.intValue() << 16 | green.intValue() << 8 | blue.intValue() | alpha.intValue() << 24; } public static void drawText(String s, int w, int h) { FontRenderer fr = Minecraft.getInstance().fontRenderer; fr.drawStringWithShadow(s, (float) w, (float) h, FULL_COLOR);}
  9. (Please forgive me for using a translator. I wanted to show strings on the display and created a project in 1.15.2. I ported from the code that worked in 1.8.9, but apparently it doesn't work in 1.15.2. In the code of 1.8.9 I used Minecraft.getInstance().fontRenderer.drawStringWithShadow() from RenderGameOverlayEvent.Pre. Since there was the same method in 1.15.2, I wrote it as it is, but it seems that it does not work. I also tried, but it didn't work. I also tried RenderGameOverlayEvent.Post and so on. Can anyone please teach me how to display the character string in the upper left corner of the screen?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.