-
Notifications
You must be signed in to change notification settings - Fork 10
GameRuleHelper
friendlyhj edited this page Jun 22, 2024
·
1 revision
This allows you to create custom gamerules, and get the value of any existing gamerule.
mods.zenutils.GameRuleHelper
Get the instance from IWorld
using ZenGetter gameRuleHelper
, or method getGameRuleHelper
.
-
void addGameRule(String key, String value, String type) --- add gamerule with the given default value and type, type must be Any, Numeric or Boolean.
-
boolean hasRule(String name) --- check whether the given rule existed.
-
String[] getRules() --- get all the existing rules.
-
boolean getBoolean(String name) --- get the rule value as boolean type.
-
int getInt(String name) --- get the rule value as int type.
-
String getString(String name) --- get the rule value as string type.
- GlobalFunctions
- ScriptReloading
- SuppressErrorPreprocessor
- HardFailPreprocessor
- OrderlyMap
- IData Deep Update
- Template String
- Native Method Access
- Mixin
- CrTI18n
- CrTUUID
- CrTItemHandler
- CrTLiquidHandler
- ILiquidTankProperties
- StringList
- HexHelper
- StaticString
- Catenation
- PersistedCatenation
- PlayerStat
- IStatFormatter
- GameRuleHelper
- ZenCommand
- ZenCommandTree
- ZenUtilsCommandSender
- IGetCommandUsage
- ICommandExecute
- IGetTabCompletion
- CommandUtils