geforkt von Mirrors/Paper
b8edb0e130
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender CraftBukkit Changes: db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender 4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties 8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block Spigot Changes: d2eba2c8 Rebuild patches
169 Zeilen
7.4 KiB
Diff
169 Zeilen
7.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Sat, 16 Oct 2021 22:57:31 -0700
|
|
Subject: [PATCH] Add missing block data mins and maxes
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
|
|
index 83f86725c00f0e175cb46c7e27705ca777f413ba..24d16825c10edfed6d22e8e37ddb9fd804b716c4 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
|
|
@@ -31,6 +31,12 @@ public final class CraftCandle extends org.bukkit.craftbukkit.block.data.CraftBl
|
|
public int getMaximumCandles() {
|
|
return getMax(CraftCandle.CANDLES);
|
|
}
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumCandles() {
|
|
+ return getMin(CraftCandle.CANDLES);
|
|
+ }
|
|
+ // Paper end
|
|
|
|
// org.bukkit.craftbukkit.block.data.CraftLightable
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
|
|
index bd1c7e41f0d21c69b1d1b4d4021d188502d7fee3..82da57f7d288da45062f7d61325caf0e47e6d4f6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
|
|
@@ -51,4 +51,16 @@ public final class CraftCherryLeaves extends org.bukkit.craftbukkit.block.data.C
|
|
public void setWaterlogged(boolean waterlogged) {
|
|
set(CraftCherryLeaves.WATERLOGGED, waterlogged);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMaximumDistance() {
|
|
+ return getMax(DISTANCE);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getMinimumDistance() {
|
|
+ return getMin(DISTANCE);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
|
|
index 780b6a29592571f4a730a858734256f69519cca7..ef97e77b25562a8aed35d68d42ced4825d43a29d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
|
|
@@ -31,4 +31,11 @@ public final class CraftComposter extends org.bukkit.craftbukkit.block.data.Craf
|
|
public int getMaximumLevel() {
|
|
return getMax(CraftComposter.LEVEL);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumLevel() {
|
|
+ return getMin(CraftComposter.LEVEL);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
|
|
index f083cf727e7fd55f0749e85e3d034b5606121110..e40cda2f23d63e9d2029a8c8818103b6eeb6a925 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
|
|
@@ -31,4 +31,11 @@ public final class CraftFluids extends org.bukkit.craftbukkit.block.data.CraftBl
|
|
public int getMaximumLevel() {
|
|
return getMax(CraftFluids.LEVEL);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumLevel() {
|
|
+ return getMin(CraftFluids.LEVEL);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
|
|
index 0d08c81dd8582ef4f259f0e0db88e1b85d79f2a1..5b96ec73bf7bd4d90ce77cfe8ffec82580b20d2b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
|
|
@@ -31,4 +31,11 @@ public final class CraftLayeredCauldron extends org.bukkit.craftbukkit.block.dat
|
|
public int getMaximumLevel() {
|
|
return getMax(CraftLayeredCauldron.LEVEL);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumLevel() {
|
|
+ return getMin(CraftLayeredCauldron.LEVEL);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
|
|
index 2775bcc7d61806764a121d45621a8928f5e301e7..8cb0f9bf8a2e264e089a0278d5fb4b157844f6e4 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
|
|
@@ -51,4 +51,16 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl
|
|
public void setWaterlogged(boolean waterlogged) {
|
|
set(CraftLeaves.WATERLOGGED, waterlogged);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMaximumDistance() {
|
|
+ return getMax(CraftLeaves.DISTANCE);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getMinimumDistance() {
|
|
+ return getMin(CraftLeaves.DISTANCE);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
|
|
index de882af105fae1166aced908cfe45b826a07f418..0d430382a05dfc0802a2569816c5ec876a053f16 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
|
|
@@ -32,6 +32,13 @@ public final class CraftLight extends org.bukkit.craftbukkit.block.data.CraftBlo
|
|
return getMax(CraftLight.LEVEL);
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumLevel() {
|
|
+ return getMin(CraftLight.LEVEL);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
// org.bukkit.craftbukkit.block.data.CraftWaterlogged
|
|
|
|
private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightBlock.class, "waterlogged");
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
|
|
index f070c35833b33ad2d7cfa629d8702a95e9bc6d04..5a021dc1931d35cbe235ab399aa98f3c7e93ded3 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
|
|
@@ -51,4 +51,16 @@ public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data
|
|
public void setWaterlogged(boolean waterlogged) {
|
|
set(CraftMangroveLeaves.WATERLOGGED, waterlogged);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumDistance() {
|
|
+ return getMin(CraftMangroveLeaves.DISTANCE);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getMaximumDistance() {
|
|
+ return getMax(CraftMangroveLeaves.DISTANCE);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
|
|
index c6bd91bdf6bf64701ffc69619174cc3b43b72d88..c6289306f0f933b67ff1f6db63ef976df7aa5438 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
|
|
@@ -31,4 +31,11 @@ public final class CraftPowderSnowCauldron extends org.bukkit.craftbukkit.block.
|
|
public int getMaximumLevel() {
|
|
return getMax(CraftPowderSnowCauldron.LEVEL);
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public int getMinimumLevel() {
|
|
+ return getMin(CraftPowderSnowCauldron.LEVEL);
|
|
+ }
|
|
+ // Paper end
|
|
}
|