mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: a7cddc4 Hotfix for some of the reobf issues tracked in Paperweight issue 24 (#5965) b1f6e26 Fix mobs not burning from summon command (#5961) 4e2f0be Refactor Anti-Xray and make some fixes to it (#5938) d50cc01 Make gradle take build number from env vars and add git build info (#5890)
40 lines
2.4 KiB
Diff
40 lines
2.4 KiB
Diff
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/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index 40ece868bdab53ee10a9b2251540849732e77f69..378a0feef4f178ddce1e852f07966f377802fa3a 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -846,7 +846,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
|
return villageplacetype == PoiType.LIGHTNING_ROD;
|
|
}, (blockposition1) -> {
|
|
return blockposition1.getY() == this.getLevel().getHeight(Heightmap.Types.WORLD_SURFACE, blockposition1.getX(), blockposition1.getZ()) - 1;
|
|
- }, pos, 128, PoiManager.Occupancy.ANY);
|
|
+ }, pos, net.pl3x.purpur.PurpurConfig.lightningRodRange, PoiManager.Occupancy.ANY);
|
|
|
|
return optional.map((blockposition1) -> {
|
|
return blockposition1.above(1);
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
index 8b5f2de46838e8c7c9e3ca6dfbd72bdbc6d82036..eaa0fcff033d59189475f7c04c5a3f2fc5421469 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -325,6 +325,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);
|
|
@@ -342,6 +343,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;
|