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.

Phylogeny

Members
  • Joined

  • Last visited

Everything posted by Phylogeny

  1. Well, that's unfortunate. I haven't looked much at the backend of the config annotations system, but perhaps calling Enum#toString rather than Enum#name will work without breaking anything else.
  2. I see. Then in the mean time, my next questions is: How stable is the solution I posted? Is this a "that's just not the intended usage" objection, or a "that can cause actual problems" objection?
  3. An enum is what tells Forge to generate a cycling button config element. Do you have a constructive suggestions as to how to tell Forge to create one with formatted text (with or without an enum)? It helps to give input on what should be done, as well a what shouldn't.
  4. Here's a more stable way, that requires only the EnumHelper: static { for (RarityGlowTypeNames value : RarityGlowTypeNames.values()) { String name = ""; for (String word : value.name().split("_")) name += word.substring(0, 1) + word.substring(1).toLowerCase() + " "; EnumHelper.addEnum(RarityGlowType.class, name.substring(0, name.length() - 1), new Class<?>[0]); } } // This is inside the root class for the config file public static class Inventory { @Config.Name("Rarity Type") public RarityGlowType rarityGlowType = RarityGlowType.values()[0]; } public enum RarityGlowType {} public enum RarityGlowTypeNames { SOLID_COLOR, GRADIENT_COLOR; } Or here's a variant of that without dynamic name generation: static { for (RarityGlowTypeNames name : RarityGlowTypeNames.values()) EnumHelper.addEnum(RarityGlowType.class, name.toString(), new Class<?>[0]); } // This is inside the root class for the config file public static class Inventory { @Config.Name("Rarity Type") public RarityGlowType rarityGlowType = RarityGlowType.values()[0]; } public enum RarityGlowType {} public enum RarityGlowTypeNames { SOLID_COLOR("Solid Color"), GRADIENT_COLOR("Gradient Color"); private String name; private RarityGlowTypeNames(String name) { this.name = name; } @Override public String toString() { return name; } } An example of checking the value could be: ConfigMod.inventory.rarityGlowType.ordinal() == RarityGlowTypeNames.GRADIENT_COLOR.ordinal()

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.