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.

Craftiii4

Members
  • Joined

  • Last visited

  1. Was experimenting with the boss related classes trying to get the output out I wanted, so granted it's not the best reflection ever written. I'll modify my above code to reflect the changes suggested, thanks again!
  2. By on server I meant that the boss bar is on the server, e.g. "Welcome to thisserver.com" Thanks for the tips, I do only look up field once, just modified it slightly before I added the code here so it would work as a standalone function.
  3. Thanks, unfortunately, this is a client-side only mod. However, I did manage to resolve my problem using a little bit of reflection. In case anyone else ever needs it, here's my solution: @SuppressWarnings("unchecked") public static List<String> getBossBarNames(Minecraft minecraft) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { GuiBossOverlay bossOverlay = minecraft.ingameGUI.getBossOverlay(); String nameAfter = null; // Find the name of the field as it will change with each obfuscation of forge // If you're using this, you'll want to move this lookup elsewhere and store the result for (Field s : GuiBossOverlay.class.getDeclaredFields()) { if (s.getType().getName().equals("java.util.Map")) { nameAfter = s.getName(); break; } } List<String> names = new ArrayList<String>(); if (nameAfter != null) { Field bossField = GuiBossOverlay.class.getDeclaredField(nameAfter); bossField.setAccessible(true); Map<UUID, BossInfoLerping> mapBossInfos = (Map<UUID, BossInfoLerping>) bossField.get(bossOverlay); for (BossInfoLerping bIL : mapBossInfos.values()) names.add(bIL.getName().getFormattedText()); } return names; }
  4. Hey, I'm trying to extract information out of a boss bar on a server. However, there doesn't seem to be any entities in the world which could be the boss. How would I go about extracting this information without the entity? Thanks in advance

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.