Interface GamerulesMixins
public interface GamerulesMixins
A mixin into the
GameRules class which
provides access to some of its internal methods.-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic Map<net.minecraft.world.level.GameRules.Key<?>,net.minecraft.world.level.GameRules.Type<?>> Get theGAME_RULE_TYPESfield off theGameRulesclass.static <T extends net.minecraft.world.level.GameRules.Value<T>>
net.minecraft.world.level.GameRules.Key<T>invokeRegister(String key, net.minecraft.world.level.GameRules.Category category, net.minecraft.world.level.GameRules.Type<T> type) Invoke theregistermethod of theGameRulesclass.
-
Method Details
-
invokeRegister
static <T extends net.minecraft.world.level.GameRules.Value<T>> net.minecraft.world.level.GameRules.Key<T> invokeRegister(String key, net.minecraft.world.level.GameRules.Category category, net.minecraft.world.level.GameRules.Type<T> type) Invoke theregistermethod of theGameRulesclass.- Type Parameters:
T- The type of gamerule being registered.- Parameters:
key- The key to register the new gamerule under. This must be unique.category- The category to register the new gamerule under.type- The type of value to register the new gamerule as.- Returns:
- The key the new gamerule was registered under.
-
accessGameruleTypes
static Map<net.minecraft.world.level.GameRules.Key<?>,net.minecraft.world.level.GameRules.Type<?>> accessGameruleTypes()Get theGAME_RULE_TYPESfield off theGameRulesclass.- Returns:
- The
GAME_RULE_TYPESfield.
-