2023-06-07 19:57:08 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Luna <lunahatesgogle@gmail.com>
|
|
|
|
Date: Wed, 7 Jun 2023 16:50:35 -0300
|
|
|
|
Subject: [PATCH] Limit beacon effectRange
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
2024-01-24 22:30:21 +00:00
|
|
|
index bfcf9e0c342f255d285b1ef7f88d71efed653ecd..8ebee182002a360a7438938a97834f25da2695fb 100644
|
2023-06-07 19:57:08 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
2023-09-24 22:01:28 +00:00
|
|
|
@@ -87,7 +87,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
2023-06-07 19:57:08 +00:00
|
|
|
private double effectRange = -1;
|
|
|
|
|
|
|
|
public double getEffectRange() {
|
|
|
|
- if (this.effectRange < 0) {
|
|
|
|
+ if (this.effectRange < 0 || this.effectRange > 256) { // Scissors
|
|
|
|
return this.levels * 10 + 10;
|
|
|
|
} else {
|
|
|
|
return effectRange;
|
2023-09-24 22:01:28 +00:00
|
|
|
@@ -456,6 +456,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
2023-06-07 19:57:08 +00:00
|
|
|
|
|
|
|
this.lockKey = LockCode.fromTag(nbt);
|
2024-01-24 01:05:59 +00:00
|
|
|
this.effectRange = nbt.contains(PAPER_RANGE_TAG, 6) ? nbt.getDouble(PAPER_RANGE_TAG) : -1; // Paper - Custom beacon ranges
|
2023-06-07 19:57:08 +00:00
|
|
|
+ if (this.effectRange > 256) this.effectRange = 256; // Scissors
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|