Add more needed BlockStateListPopulator Methods (#8021)
This commit is contained in:
parent
b74c4d4587
commit
65f0b2e2e4
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue