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.

Featured Replies

Posted

This is probably impossible, but figured I'd check just in case.  I am working on a mod which automatically changes the values of some game rules, or more specifically "disables" specific rules if certain conditions are met.
However, if someone changes the value of a game rule, say doDaylightCycle from false to true after my mod disables it then when my mod's status is triggered to update it thinks the rule is currently disabled.  I mean obviously
setting doDaylightCycle back to true won't change anything since the user already changed it to true, but this is different for a game rule like randomTickSpeed where the value is non-binary.

With randomTickSpeed, however, when I say "disabled" that means set to 0.  When I disable it, I store the current value so I can restore it later.  However, the user can update the randomTickSpeed to something else.
That's okay because I can check the current value when my mod goes to update and make sure I store the new value if it has changed.  But, the user could explicitly update the game rule value of randomTickSpeed to 0
and expect that when my mod re-enables randomTickSpeed that the value remains 0.  There is no way for me to know they specifically set it to 0.


Not sure if there is anything in Forge that allows me to subscribe to changes in the game rules or something like that.  Otherwise I guess that workflow just can't work with my mod.
I guess a way I could do it is to have my own commands which set the "enabled" values for the game rules, but I would prefer an automatic behind the scenes solution.

  • Author

I've been able to get it working, so thank you.  However, I still don't quite understand how to use the discord bot to find the SRG name of the field GameRules.RuleType.callback.

I managed to find it with !moj callback, but how would I have searched for callback on GameRules.RuleType specifically?  I also don't understand the different between !moj and !mcp

Edited by Gr3atsaga

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.