diff --git a/patches/api/Add-missing-block-data-mins-and-maxes.patch b/patches/api/Add-missing-block-data-API.patch similarity index 63% rename from patches/api/Add-missing-block-data-mins-and-maxes.patch rename to patches/api/Add-missing-block-data-API.patch index a7f6a6c275..ad2efad665 100644 --- a/patches/api/Add-missing-block-data-mins-and-maxes.patch +++ b/patches/api/Add-missing-block-data-API.patch @@ -1,8 +1,13 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 16 Oct 2021 22:57:10 -0700 -Subject: [PATCH] Add missing block data mins and maxes +Subject: [PATCH] Add missing block data API +General purpose patch adding missing getters/setters to BlockData and +its child types. + +Co-authored-by: SoSeDiK +Co-authored-by: Fabrizio La Rosa diff --git a/src/main/java/org/bukkit/block/data/Levelled.java b/src/main/java/org/bukkit/block/data/Levelled.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -22,6 +27,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int getMinimumLevel(); + // Paper end } +diff --git a/src/main/java/org/bukkit/block/data/type/Bed.java b/src/main/java/org/bukkit/block/data/type/Bed.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/data/type/Bed.java ++++ b/src/main/java/org/bukkit/block/data/type/Bed.java +@@ -0,0 +0,0 @@ public interface Bed extends Directional { + */ + boolean isOccupied(); + ++ // Paper start ++ /** ++ * Sets the value of the 'occupied' property. ++ * ++ * @param occupied the new 'occupied' value ++ */ ++ void setOccupied(boolean occupied); ++ // Paper end ++ + /** + * Horizontal half of a bed. + */ diff --git a/src/main/java/org/bukkit/block/data/type/Candle.java b/src/main/java/org/bukkit/block/data/type/Candle.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/block/data/type/Candle.java @@ -40,6 +65,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int getMinimumCandles(); + // Paper end } +diff --git a/src/main/java/org/bukkit/block/data/type/DecoratedPot.java b/src/main/java/org/bukkit/block/data/type/DecoratedPot.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/data/type/DecoratedPot.java ++++ b/src/main/java/org/bukkit/block/data/type/DecoratedPot.java +@@ -0,0 +0,0 @@ import org.bukkit.block.data.Directional; + import org.bukkit.block.data.Waterlogged; + + public interface DecoratedPot extends Directional, Waterlogged { ++ // Paper start - add missing block data api ++ /** ++ * @return whether the pot is cracked ++ */ ++ public boolean isCracked(); ++ ++ /** ++ * Set whether the pot is cracked. ++ * ++ * @param cracked whether the pot is cracked ++ */ ++ public void setCracked(boolean cracked); ++ // Paper end - add missing block data api + } diff --git a/src/main/java/org/bukkit/block/data/type/Leaves.java b/src/main/java/org/bukkit/block/data/type/Leaves.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/block/data/type/Leaves.java diff --git a/patches/api/Allow-changing-bed-s-occupied-property.patch b/patches/api/Allow-changing-bed-s-occupied-property.patch deleted file mode 100644 index 0c6c0a5674..0000000000 --- a/patches/api/Allow-changing-bed-s-occupied-property.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: SoSeDiK -Date: Wed, 12 Oct 2022 00:36:55 +0300 -Subject: [PATCH] Allow changing bed's 'occupied' property - - -diff --git a/src/main/java/org/bukkit/block/data/type/Bed.java b/src/main/java/org/bukkit/block/data/type/Bed.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/block/data/type/Bed.java -+++ b/src/main/java/org/bukkit/block/data/type/Bed.java -@@ -0,0 +0,0 @@ public interface Bed extends Directional { - */ - boolean isOccupied(); - -+ // Paper start -+ /** -+ * Sets the value of the 'occupied' property. -+ * -+ * @param occupied the new 'occupied' value -+ */ -+ void setOccupied(boolean occupied); -+ // Paper end -+ - /** - * Horizontal half of a bed. - */ diff --git a/patches/server/Add-missing-block-data-mins-and-maxes.patch b/patches/server/Add-missing-block-data-API.patch similarity index 77% rename from patches/server/Add-missing-block-data-mins-and-maxes.patch rename to patches/server/Add-missing-block-data-API.patch index 6aa2f01730..df123565b5 100644 --- a/patches/server/Add-missing-block-data-mins-and-maxes.patch +++ b/patches/server/Add-missing-block-data-API.patch @@ -1,9 +1,30 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 16 Oct 2021 22:57:31 -0700 -Subject: [PATCH] Add missing block data mins and maxes +Subject: [PATCH] Add missing block data API +General purpose patch adding missing getters/setters to BlockData and +its child types. +Co-authored-by: SoSeDiK +Co-authored-by: Fabrizio La Rosa + +diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java +@@ -0,0 +0,0 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock + public java.util.Set getFaces() { + return this.getValues(CraftBed.FACING, org.bukkit.block.BlockFace.class); + } ++ ++ // Paper start ++ @Override ++ public void setOccupied(boolean occupied) { ++ set(CraftBed.OCCUPIED, occupied); ++ } ++ // Paper end + } 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java @@ -58,6 +79,29 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end } +diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java +@@ -0,0 +0,0 @@ public final class CraftDecoratedPot extends org.bukkit.craftbukkit.block.data.C + public void setWaterlogged(boolean waterlogged) { + this.set(CraftDecoratedPot.WATERLOGGED, waterlogged); + } ++ ++ // Paper start - add missing block data api ++ private static final net.minecraft.world.level.block.state.properties.BooleanProperty CRACKED = getBoolean(net.minecraft.world.level.block.DecoratedPotBlock.class, "cracked"); ++ ++ @Override ++ public boolean isCracked() { ++ return this.get(CraftDecoratedPot.CRACKED); ++ } ++ ++ @Override ++ public void setCracked(final boolean cracked) { ++ this.set(CraftDecoratedPot.CRACKED, cracked); ++ } ++ // Paper end - add missing block data api + } 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java diff --git a/patches/server/Allow-changing-bed-s-occupied-property.patch b/patches/server/Allow-changing-bed-s-occupied-property.patch deleted file mode 100644 index 518eb3ebe7..0000000000 --- a/patches/server/Allow-changing-bed-s-occupied-property.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: SoSeDiK -Date: Wed, 12 Oct 2022 00:36:55 +0300 -Subject: [PATCH] Allow changing bed's 'occupied' property - - -diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java -@@ -0,0 +0,0 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock - public java.util.Set getFaces() { - return this.getValues(CraftBed.FACING, org.bukkit.block.BlockFace.class); - } -+ -+ // Paper start -+ @Override -+ public void setOccupied(boolean occupied) { -+ set(CraftBed.OCCUPIED, occupied); -+ } -+ // Paper end - }