mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
156 lines
7.3 KiB
Diff
156 lines
7.3 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/data/type/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCauldron.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
|
||
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
|
||
|
@@ -0,0 +0,0 @@ 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
|
||
|
}
|