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:
Ursprung
127cae80bd
Commit
ee147a4b37
@ -134,7 +134,7 @@ public class WorldPackets {
|
|||||||
int[] motionBlocking = new int[16 * 16];
|
int[] motionBlocking = new int[16 * 16];
|
||||||
int[] worldSurface = 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];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public class WorldPackets {
|
|||||||
chunk.setBiomeData(newBiomeData);
|
chunk.setBiomeData(newBiomeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int s = 0; s < 16; s++) {
|
for (int s = 0; s < chunk.getSections().length; s++) {
|
||||||
ChunkSection section = chunk.getSections()[s];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
for (int i = 0; i < section.getPaletteSize(); i++) {
|
for (int i = 0; i < section.getPaletteSize(); i++) {
|
||||||
|
@ -36,7 +36,7 @@ public class WorldPackets {
|
|||||||
Chunk chunk = wrapper.read(new Chunk1_16Type());
|
Chunk chunk = wrapper.read(new Chunk1_16Type());
|
||||||
wrapper.write(new Chunk1_16_2Type(), chunk);
|
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];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
for (int i = 0; i < section.getPaletteSize(); i++) {
|
for (int i = 0; i < section.getPaletteSize(); i++) {
|
||||||
|
@ -48,7 +48,7 @@ public class WorldPackets {
|
|||||||
|
|
||||||
chunk.setIgnoreOldLightData(chunk.isFullChunk());
|
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];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
for (int i = 0; i < section.getPaletteSize(); i++) {
|
for (int i = 0; i < section.getPaletteSize(); i++) {
|
||||||
|
@ -82,7 +82,7 @@ public class WorldPackets {
|
|||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
Chunk chunk = wrapper.read(new Chunk1_16_2Type());
|
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);
|
BiomeStorage biomeStorage = wrapper.user().get(BiomeStorage.class);
|
||||||
if (chunk.isFullChunk()) {
|
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];
|
ChunkSection section = chunk.getSections()[s];
|
||||||
if (section == null) continue;
|
if (section == null) continue;
|
||||||
for (int i = 0; i < section.getPaletteSize(); i++) {
|
for (int i = 0; i < section.getPaletteSize(); i++) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren