cleanup, gamerule for lightning rod range

This commit is contained in:
2022-11-13 18:25:58 +01:00
parent ff1cbb8644
commit dfefed1286
7 changed files with 57 additions and 19 deletions
@@ -0,0 +1,25 @@
package me.youhavetrouble.moregamerules;
import net.fabricmc.fabric.api.gamerule.v1.GameRuleFactory;
import net.fabricmc.fabric.api.gamerule.v1.GameRuleRegistry;
import net.minecraft.world.GameRules;
public class ExtraGameRule {
public static GameRules.Key<GameRules.BooleanRule> MAGMA_BLOCK_DAMAGE;
public static GameRules.Key<GameRules.IntRule> LIGHTNING_ROD_RANGE;
protected static void init() {
MAGMA_BLOCK_DAMAGE = GameRuleRegistry.register(
"magmaBlockDamage",
GameRules.Category.MISC,
GameRuleFactory.createBooleanRule(true)
);
LIGHTNING_ROD_RANGE = GameRuleRegistry.register(
"lightningRodRange",
GameRules.Category.MISC,
GameRuleFactory.createIntRule(128, 0, Integer.MAX_VALUE)
);
}
}