From ab78c91615bcac590866f1d1e6d964c16b5f7817 Mon Sep 17 00:00:00 2001 From: Redned Date: Mon, 10 Apr 2023 03:06:49 -0500 Subject: [PATCH] Fix getBrightness and getRawBrightness throwing exception in BlockStateListPopulator (#9111) --- LICENSE.md | 1 + ...sing-important-BlockStateListPopulator-method.patch | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/LICENSE.md b/LICENSE.md index d26a9927eb..f525115aa3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -55,4 +55,5 @@ TheFruxz Kieran Wallbanks Denery Jakubk15 +Redned ``` diff --git a/patches/server/Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch index 6511d06251..a5faaaea3d 100644 --- a/patches/server/Add-missing-important-BlockStateListPopulator-method.patch +++ b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch @@ -45,6 +45,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public net.minecraft.world.level.storage.LevelData getLevelData() { + return world.getLevelData(); + } ++ ++ @Override ++ public int getRawBrightness(BlockPos pos, int ambientDarkness) { ++ return world.getRawBrightness(pos, ambientDarkness); ++ } ++ ++ @Override ++ public int getBrightness(net.minecraft.world.level.LightLayer type, BlockPos pos) { ++ return world.getBrightness(type, pos); ++ } + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java