Fix getBrightness and getRawBrightness throwing exception in BlockStateListPopulator (#9111)

This commit is contained in:
Redned 2023-04-10 03:06:49 -05:00
parent 898b222b42
commit ab78c91615
2 changed files with 11 additions and 0 deletions

View file

@ -55,4 +55,5 @@ TheFruxz <cedricspitzer@outlook.de>
Kieran Wallbanks <kieran.wallbanks@gmail.com> Kieran Wallbanks <kieran.wallbanks@gmail.com>
Denery <dorofeevij@gmail.com> Denery <dorofeevij@gmail.com>
Jakubk15 <jakubk15@protonmail.com> Jakubk15 <jakubk15@protonmail.com>
Redned <redned235@gmail.com>
``` ```

View file

@ -45,6 +45,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public net.minecraft.world.level.storage.LevelData getLevelData() { + public net.minecraft.world.level.storage.LevelData getLevelData() {
+ return world.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 + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java