mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Beacon Activation Range Configurable
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -139,6 +_,16 @@
|
||||
|
||||
public double getEffectRange() {
|
||||
if (this.effectRange < 0) {
|
||||
+ // Purpur start - Beacon Activation Range Configurable
|
||||
+ if (this.level != null) {
|
||||
+ switch (this.levels) {
|
||||
+ case 1: return this.level.purpurConfig.beaconLevelOne;
|
||||
+ case 2: return this.level.purpurConfig.beaconLevelTwo;
|
||||
+ case 3: return this.level.purpurConfig.beaconLevelThree;
|
||||
+ case 4: return this.level.purpurConfig.beaconLevelFour;
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - Beacon Activation Range Configurable
|
||||
return this.levels * 10 + 10;
|
||||
} else {
|
||||
return effectRange;
|
||||
@@ -458,6 +458,17 @@ public class PurpurWorldConfig {
|
||||
anvilColorsUseMiniMessage = getBoolean("blocks.anvil.use-mini-message", anvilColorsUseMiniMessage);
|
||||
}
|
||||
|
||||
public int beaconLevelOne = 20;
|
||||
public int beaconLevelTwo = 30;
|
||||
public int beaconLevelThree = 40;
|
||||
public int beaconLevelFour = 50;
|
||||
private void beaconSettings() {
|
||||
beaconLevelOne = getInt("blocks.beacon.effect-range.level-1", beaconLevelOne);
|
||||
beaconLevelTwo = getInt("blocks.beacon.effect-range.level-2", beaconLevelTwo);
|
||||
beaconLevelThree = getInt("blocks.beacon.effect-range.level-3", beaconLevelThree);
|
||||
beaconLevelFour = getInt("blocks.beacon.effect-range.level-4", beaconLevelFour);
|
||||
}
|
||||
|
||||
public boolean bedExplode = true;
|
||||
public double bedExplosionPower = 5.0D;
|
||||
public boolean bedExplosionFire = true;
|
||||
|
||||
Reference in New Issue
Block a user