From 70cbc21972410f14b0ae15bbf73b27105ced5f9b Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 23 Dec 2022 11:36:46 +1100 Subject: [PATCH] SPIGOT-7211: generateTree() with Consumer or Predicate is broken By: md_5 --- .../craftbukkit/util/BlockStateListPopulator.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java index f61bec1fc9..c934af47f8 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java @@ -8,6 +8,7 @@ import java.util.Map; import java.util.Set; import java.util.function.Predicate; import net.minecraft.core.BlockPosition; +import net.minecraft.core.IRegistryCustom; import net.minecraft.server.level.WorldServer; import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.block.ITileEntity; @@ -126,8 +127,18 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { return predicate.test(getBlockState(blockposition)); } + @Override + public boolean isFluidAtPosition(BlockPosition bp, Predicate prdct) { + return world.isFluidAtPosition(bp, prdct); + } + @Override public DimensionManager dimensionType() { return world.dimensionType(); } + + @Override + public IRegistryCustom registryAccess() { + return world.registryAccess(); + } }