mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Make lightning rod range configurable (#402)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: 12emin34 <macanovic.emin@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 13:36:20 +0200
|
||||
Subject: [PATCH] Make lightning rod range configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LightningRodBlock.java b/src/main/java/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
index f29a5c035f2f860c3e58e85f5cacf137a5a5510f..db578f472f6f732dc6614b75b890567c85118b55 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
@@ -42,7 +42,7 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc
|
||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
public static final BooleanProperty POWERED = BlockStateProperties.POWERED;
|
||||
private static final int ACTIVATION_TICKS = 8;
|
||||
- public static final int RANGE = 128;
|
||||
+ public static final int RANGE = net.pl3x.purpur.PurpurConfig.lightningRodRange;
|
||||
private static final int SPARK_CYCLE = 200;
|
||||
|
||||
public LightningRodBlock(BlockBehaviour.Properties settings) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index fb4a745404c7b0c28f4eba8ebfdc87977a132884..728b31e4d59a824536dbb0de3edd88071b22b61a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -216,6 +216,7 @@ public class PurpurConfig {
|
||||
public static boolean cryingObsidianValidForPortalFrame = false;
|
||||
public static int beeInsideBeeHive = 3;
|
||||
public static boolean anvilCumulativeCost = true;
|
||||
+ public static int lightningRodRange = 128;
|
||||
private static void blockSettings() {
|
||||
if (version < 3) {
|
||||
boolean oldValue = getBoolean("settings.barrel.packed-barrels", true);
|
||||
@@ -233,6 +234,7 @@ public class PurpurConfig {
|
||||
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
|
||||
beeInsideBeeHive = getInt("settings.blocks.beehive.max-bees-inside", beeInsideBeeHive);
|
||||
anvilCumulativeCost = getBoolean("settings.blocks.anvil.cumulative-cost", anvilCumulativeCost);
|
||||
+ lightningRodRange = getInt("settings.blocks.lightning_rod.range", lightningRodRange);
|
||||
}
|
||||
|
||||
public static boolean allowInfinityMending = false;
|
||||
Reference in New Issue
Block a user