diff options
author | Nassim Jahnke <[email protected]> | 2022-03-13 08:47:54 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-13 08:47:54 +0100 |
commit | 1358d1e9146ca80d0ff84a644c7796d20b39765c (patch) | |
tree | b387981c9a67bfad7e649813c1f1ea30fecfb4d9 /patches/server/0863-Add-missing-block-data-mins-and-maxes.patch | |
parent | ab03538fa1af67a941ad0a9de75d367f13046c8d (diff) | |
download | Paper-1358d1e9146ca80d0ff84a644c7796d20b39765c.tar.gz Paper-1358d1e9146ca80d0ff84a644c7796d20b39765c.zip |
Updated Upstream (CraftBukkit/Spigot) (#7580)
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:
881e06e5 PR-725: Add Item Unlimited Lifetime APIs
CraftBukkit Changes:
74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall
64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn
2d760831 Increase outdated build delay
9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel
fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent
59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta
Spigot Changes:
ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue
e19ddabd PR-1011: Add Item Unlimited Lifetime APIs
34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
Diffstat (limited to 'patches/server/0863-Add-missing-block-data-mins-and-maxes.patch')
-rw-r--r-- | patches/server/0863-Add-missing-block-data-mins-and-maxes.patch | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/patches/server/0863-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0863-Add-missing-block-data-mins-and-maxes.patch new file mode 100644 index 0000000000..6f3d051671 --- /dev/null +++ b/patches/server/0863-Add-missing-block-data-mins-and-maxes.patch @@ -0,0 +1,155 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +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/data/type/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java +index 5b0da54982fc0879005fd1db104284eb3318bee8..3c5a2de56724bc784f619f3087140c72a42dc57b 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java +@@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.block.data.type; + import org.bukkit.block.data.type.Leaves; + import org.bukkit.craftbukkit.block.data.CraftBlockData; + +-public class CraftLeaves extends CraftBlockData implements Leaves { ++public abstract class CraftLeaves extends CraftBlockData implements Leaves { // Paper - make abstract (not used anyways) + + private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger("distance"); + private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean("persistent"); +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/CraftCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java +index e17a85182555b7b50b4b1e42af871462699dba06..ef90de836888caa0a56c9c34c15bcd0d6c2d16a8 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java +@@ -31,4 +31,11 @@ public final class CraftCauldron extends org.bukkit.craftbukkit.block.data.Craft + public int getMaximumLevel() { + return getMax(CraftCauldron.LEVEL); + } ++ ++ // Paper start ++ @Override ++ public int getMinimumLevel() { ++ return getMin(CraftCauldron.LEVEL); ++ } ++ // 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 c4ac30e38bf786c491e0e1d47a9003f2b8e1d985..709812fd312f9eddfada21d3836eca6a696183fd 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java +@@ -37,4 +37,16 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl + public void setDistance(int distance) { + set(CraftLeaves.DISTANCE, distance); + } ++ ++ // 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/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 + } |