hotfix: Oops!
This commit is contained in:
@@ -8,14 +8,12 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import mc.core.Location;
|
||||
import mc.core.network.NetOutputStream;
|
||||
import mc.core.network.SCPacket;
|
||||
import mc.core.network.proto_1_12_2.ByteArrayOutputNetStream;
|
||||
import mc.core.world.Block;
|
||||
import mc.core.world.Chunk;
|
||||
import mc.core.world.block.Block;
|
||||
import mc.core.world.chunk.Chunk;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -80,8 +78,8 @@ public class ChunkDataPacket implements SCPacket {
|
||||
@Getter
|
||||
private List<Chunk> chunks = new ArrayList<>();
|
||||
|
||||
private int serializeBlockState(int id, int state) {
|
||||
return (id << 4) | state;
|
||||
private int serializeBlockState(int id, int meta) {
|
||||
return (id << 4) | meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -115,7 +113,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
for (int x = 0; x < 16; x++) {
|
||||
Block block = chunk.getBlock(x, y, z);
|
||||
int blockState = serializeBlockState(block.getId(), block.getState());
|
||||
int blockState = serializeBlockState(block.getId(), block.getMeta());
|
||||
|
||||
int currentIndexPaletteBlock;
|
||||
if (!palette.contains(blockState)) {
|
||||
@@ -151,7 +149,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
}
|
||||
|
||||
if (!biomeFinally) {
|
||||
biomes.writeByte(chunk.getBiome(x, z));
|
||||
biomes.writeByte(chunk.getBiome(x, z).getId());
|
||||
if (x == 15 && z == 15) {
|
||||
biomeFinally = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user