geforkt von Mirrors/FastAsyncWorldEdit
Fix occasional NPE when removing section lighting
Dieser Commit ist enthalten in:
Ursprung
3df080abe4
Commit
2ab207cfe9
@ -191,7 +191,7 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_5 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren