mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-08-30 19:38:13 +00:00
28 lines
1.3 KiB
Diff
28 lines
1.3 KiB
Diff
|
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
|
||
|
index f2325c0c475bb465f5275f78c71949648a860d0c..4ec228ce026ee39eebd17d180fb5caea1b74e6e2 100644
|
||
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||
|
@@ -83,7 +83,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||
|
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;
|
||
|
@@ -415,6 +415,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||
|
|
||
|
this.lockKey = LockCode.fromTag(nbt);
|
||
|
this.effectRange = nbt.contains(PAPER_RANGE_TAG, 6) ? nbt.getDouble(PAPER_RANGE_TAG) : -1; // Paper
|
||
|
+ if (this.effectRange > 256) this.effectRange = 256; // Scissors
|
||
|
}
|
||
|
|
||
|
@Override
|