public interface GamerulesMixins
A mixin into the GameRules class which provides access to some of its internal methods.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static Map<net.minecraft.world.level.GameRules.Key<?>,net.minecraft.world.level.GameRules.Type<?>>
    Get the GAME_RULE_TYPES field off the GameRules class.
    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 the register method of the GameRules class.
  • 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 the register method of the GameRules class.
      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 the GAME_RULE_TYPES field off the GameRules class.
      Returns:
      The GAME_RULE_TYPES field.