Fix 1.7 relighting
This commit is contained in:
parent
26fc8b781c
commit
f674c75f1d
@ -378,8 +378,8 @@ public class BukkitQueue17 extends BukkitQueue_0<Chunk, ChunkSection[], ChunkSec
|
|||||||
}
|
}
|
||||||
byte[] currentIdArray = (byte[]) fieldIds.get(section);
|
byte[] currentIdArray = (byte[]) fieldIds.get(section);
|
||||||
NibbleArray currentDataArray = (NibbleArray) fieldData.get(section);
|
NibbleArray currentDataArray = (NibbleArray) fieldData.get(section);
|
||||||
boolean data = currentDataArray != null;
|
boolean data = currentDataArray != null && newDataArray != null;
|
||||||
if (!data && newDataArray != null) {
|
if (!data) {
|
||||||
section.setDataArray(newDataArray);
|
section.setDataArray(newDataArray);
|
||||||
}
|
}
|
||||||
if (currentIdArray == null) {
|
if (currentIdArray == null) {
|
||||||
@ -645,12 +645,12 @@ public class BukkitQueue17 extends BukkitQueue_0<Chunk, ChunkSection[], ChunkSec
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getOpacity(ChunkSection section, int x, int y, int z) {
|
public int getOpacity(ChunkSection section, int x, int y, int z) {
|
||||||
return section.getTypeId(x, y, z).k();
|
return section.getTypeId(x & 15, y & 15, z & 15).k();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBrightness(ChunkSection section, int x, int y, int z) {
|
public int getBrightness(ChunkSection section, int x, int y, int z) {
|
||||||
return section.getTypeId(x, y, z).m();
|
return section.getTypeId(x & 15, y & 15, z & 15).m();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -661,7 +661,7 @@ public class BukkitQueue17 extends BukkitQueue_0<Chunk, ChunkSection[], ChunkSec
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getOpacityBrightnessPair(ChunkSection section, int x, int y, int z) {
|
public int getOpacityBrightnessPair(ChunkSection section, int x, int y, int z) {
|
||||||
Block block = section.getTypeId(x, y, z);
|
Block block = section.getTypeId(x & 15, y & 15, z & 15);
|
||||||
return MathMan.pair16(block.k(), block.m());
|
return MathMan.pair16(block.k(), block.m());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user