mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes:05cb10c56fAdd repo for Velocity natives to dev bundle (#6536)7bd7b18811Configurable feature seeds (#6531)ca708a0944Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6539)f02d3d8989flattener should try to render custom translations (#6540)1276bd5039Fixed layers from V2550 not being added to list (#6541)a763f258dadocs: remove Paper tool method for patch mods20903fcf5edocs: drop table of contents; it's built into GH
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 40b9ce197be14894610673832752b8759fabd0da..30322750466f266eba295d39de30461c02423df9 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -1012,7 +1012,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
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 72860c591af31efbdf50b8ce606ef009c62b1610..5a21baed2943fd9e2f472f8548e42067efcbf419 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
|
@@ -258,6 +258,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);
|
|
@@ -291,6 +292,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;
|