3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Replace some hardcoded chunk section values (#2274)

Dieser Commit ist enthalten in:
RK_01 2021-01-05 09:42:32 +01:00 committet von GitHub
Ursprung 127cae80bd
Commit ee147a4b37
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
5 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -134,7 +134,7 @@ public class WorldPackets {
int[] motionBlocking = new int[16 * 16];
int[] worldSurface = new int[16 * 16];
for (int s = 0; s < 16; s++) {
for (int s = 0; s < chunk.getSections().length; s++) {
ChunkSection section = chunk.getSections()[s];
if (section == null) continue;

Datei anzeigen

@ -53,7 +53,7 @@ public class WorldPackets {
chunk.setBiomeData(newBiomeData);
}
for (int s = 0; s < 16; s++) {
for (int s = 0; s < chunk.getSections().length; s++) {
ChunkSection section = chunk.getSections()[s];
if (section == null) continue;
for (int i = 0; i < section.getPaletteSize(); i++) {

Datei anzeigen

@ -36,7 +36,7 @@ public class WorldPackets {
Chunk chunk = wrapper.read(new Chunk1_16Type());
wrapper.write(new Chunk1_16_2Type(), chunk);
for (int s = 0; s < 16; s++) {
for (int s = 0; s < chunk.getSections().length; s++) {
ChunkSection section = chunk.getSections()[s];
if (section == null) continue;
for (int i = 0; i < section.getPaletteSize(); i++) {

Datei anzeigen

@ -48,7 +48,7 @@ public class WorldPackets {
chunk.setIgnoreOldLightData(chunk.isFullChunk());
for (int s = 0; s < 16; s++) {
for (int s = 0; s < chunk.getSections().length; s++) {
ChunkSection section = chunk.getSections()[s];
if (section == null) continue;
for (int i = 0; i < section.getPaletteSize(); i++) {

Datei anzeigen

@ -82,7 +82,7 @@ public class WorldPackets {
public void registerMap() {
handler(wrapper -> {
Chunk chunk = wrapper.read(new Chunk1_16_2Type());
wrapper.write(new Chunk1_17Type(16), chunk);
wrapper.write(new Chunk1_17Type(chunk.getSections().length), chunk);
BiomeStorage biomeStorage = wrapper.user().get(BiomeStorage.class);
if (chunk.isFullChunk()) {
@ -98,7 +98,7 @@ public class WorldPackets {
}
}
for (int s = 0; s < 16; s++) {
for (int s = 0; s < chunk.getSections().length; s++) {
ChunkSection section = chunk.getSections()[s];
if (section == null) continue;
for (int i = 0; i < section.getPaletteSize(); i++) {