gamerule for toggling player crits

This commit is contained in:
2022-11-14 20:10:28 +01:00
parent b7d1b02d56
commit 28021c389a
5 changed files with 35 additions and 1 deletions
@@ -12,6 +12,8 @@ public class ExtraGameRule {
public static GameRules.Key<GameRules.IntRule> ELYTRA_DAMAGE_FROM_FIREWORK_BOOST;
public static GameRules.Key<GameRules.IntRule> ELYTRA_DAMAGE_FROM_RIPTIDE_BOOST;
public static GameRules.Key<GameRules.BooleanRule> PLAYER_CRITS;
protected static void init() {
MAGMA_BLOCK_DAMAGE = GameRuleRegistry.register(
"magmaBlockDamage",
@@ -38,6 +40,11 @@ public class ExtraGameRule {
GameRules.Category.MISC,
GameRuleFactory.createIntRule(0, 0, Integer.MAX_VALUE)
);
PLAYER_CRITS = GameRuleRegistry.register(
"playerCrits",
GameRules.Category.PLAYER,
GameRuleFactory.createBooleanRule(true)
);
}
}