Class GameRuleRegistry

java.lang.Object
me.shedaniel.architectury.registry.GameRuleRegistry

public final class GameRuleRegistry extends Object
A registry for registering game rules.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends net.minecraft.world.level.GameRules.Value<T>>
    net.minecraft.world.level.GameRules.Key<T>
    register(String name, net.minecraft.world.level.GameRules.Category category, net.minecraft.world.level.GameRules.Type<T> type)
    Registers a game rule.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static <T extends net.minecraft.world.level.GameRules.Value<T>> net.minecraft.world.level.GameRules.Key<T> register(String name, net.minecraft.world.level.GameRules.Category category, net.minecraft.world.level.GameRules.Type<T> type)
      Registers a game rule.
      Type Parameters:
      T - the type of the rule value
      Parameters:
      name - the rule's name
      category - the rule category
      type - the type of the rule
      Returns:
      a key for the registered rule