summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOwen <[email protected]>2022-07-29 19:28:46 -0400
committerGitHub <[email protected]>2022-07-30 00:28:46 +0100
commit65f0b2e2e490448da8c4a8af88e620a02a0797a1 (patch)
treeb8ed17a4596696dfebac998d427bf339dac32ee1
parentb74c4d4587720c74d647b429d4c9b2c83c52edae (diff)
downloadPaper-65f0b2e2e490448da8c4a8af88e620a02a0797a1.tar.gz
Paper-65f0b2e2e490448da8c4a8af88e620a02a0797a1.zip
Add more needed BlockStateListPopulator Methods (#8021)
-rw-r--r--patches/server/0908-Add-missing-important-BlockStateListPopulator-method.patch31
1 files changed, 29 insertions, 2 deletions
diff --git a/patches/server/0908-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0908-Add-missing-important-BlockStateListPopulator-method.patch
index 25aee4a60d..2296cce864 100644
--- a/patches/server/0908-Add-missing-important-BlockStateListPopulator-method.patch
+++ b/patches/server/0908-Add-missing-important-BlockStateListPopulator-method.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add missing important BlockStateListPopulator methods
Without these methods it causes exceptions due to these being used by certain feature generators.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
-index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..03153abb425acf2d615acc386c91a6524aaa80bf 100644
+index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..19abf7b6000a875be8c7141cfba81b279b2cae60 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
-@@ -129,4 +129,27 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
+@@ -129,4 +129,32 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
public DimensionType dimensionType() {
return this.world.dimensionType();
}
@@ -32,8 +32,35 @@ index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..03153abb425acf2d615acc386c91a652
+ }
+
+ @Override
++ public int getHeight(net.minecraft.world.level.levelgen.Heightmap.Types heightmap, int x, int z) {
++ return world.getHeight(heightmap, x, z);
++ }
++
++ @Override
+ public net.minecraft.world.level.storage.LevelData getLevelData() {
+ return world.getLevelData();
+ }
+ // Paper end
}
+diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+index fbd82b6be6604bf854e01ed5718e4e072f42b265..cd0dc080fbd8c5b1509d67e2b60264393b2b7dbb 100644
+--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
++++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+@@ -269,5 +269,17 @@ public class DummyGeneratorAccess implements WorldGenLevel {
+
+ @Override
+ public <T> void getEntitiesByClass(Class<? extends T> clazz, Entity except, AABB box, List<? super T> into, Predicate<? super T> predicate) {}
++
++ @Override
++ public void scheduleTick(BlockPos pos, Fluid fluid, int delay) {
++ }
++
++ @Override
++ public void scheduleTick(BlockPos pos, Block block, int delay, net.minecraft.world.ticks.TickPriority priority) {
++ }
++
++ @Override
++ public void scheduleTick(BlockPos pos, Fluid fluid, int delay, net.minecraft.world.ticks.TickPriority priority) {
++ }
+ // Paper end
+ }