mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
Limit beacon effectRange (#96)
This commit is contained in:
parent
7e6bd02e17
commit
b72d5ec8fc
27
patches/server/0056-Limit-beacon-effectRange.patch
Normal file
27
patches/server/0056-Limit-beacon-effectRange.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Luna <lunahatesgogle@gmail.com>
|
||||||
|
Date: Wed, 7 Jun 2023 17:02:00 -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 8038e3a10b563321df1e8cedd26b256078ce745a..7fb177779fa2bf30e4d190a277691eeab375120e 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
|
||||||
|
@@ -84,7 +84,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||||
|
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;
|
||||||
|
@@ -410,6 +410,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user