Fix occasional NPE when removing section lighting

Dieser Commit ist enthalten in:
dordsor21 2021-02-05 16:05:53 +00:00
Ursprung 3df080abe4
Commit 2ab207cfe9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
4 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -191,7 +191,7 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
if (sky) {
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
if (nibble != null) {
if (nibbleSky != null) {
lightUpdate = true;
synchronized (nibbleSky) {
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();

Datei anzeigen

@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
if (sky) {
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
if (nibble != null) {
if (nibbleSky != null) {
lightUpdate = true;
synchronized (nibbleSky) {
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();

Datei anzeigen

@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
if (sky) {
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
if (nibble != null) {
if (nibbleSky != null) {
lightUpdate = true;
synchronized (nibbleSky) {
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();

Datei anzeigen

@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_5 extends CharGetBlocks implements BukkitGetBl
if (sky) {
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
if (nibble != null) {
if (nibbleSky != null) {
lightUpdate = true;
synchronized (nibbleSky) {
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();