Archived
0
This commit is contained in:
2019-01-29 18:16:20 +03:00
parent 5c91122b08
commit 00d536710a
6 changed files with 34 additions and 47 deletions

View File

@@ -31,15 +31,7 @@ public class AnvilBlock implements Block {
public BlockType getType() {
final byte id = chunkSection.getBlocks().get((location.getY() << 8) + (location.getZ() << 4) + location.getX());
final int meta = chunkSection.getBlocksMeta().get(location);
BlockType type = BlockType.getByIdMeta(id & 0xFF, meta);
if (type.equals(BlockType.BEDROCK) && id != 7) {
log.warn("ChunkSection: {},{},{} | Block: {}",
chunkSection.getParent().getX(),
chunkSection.getY(),
chunkSection.getParent().getZ(),
location.toString());
}
return type;
return BlockType.getByIdMeta(id & 0xFF, meta);
}
@Override

View File

@@ -1,6 +1,7 @@
package mc.world.anvil;
import gnu.trove.list.TByteList;
import gnu.trove.list.array.TByteArrayList;
import gnu.trove.list.linked.TByteLinkedList;
import lombok.Getter;
import lombok.Setter;
@@ -17,7 +18,7 @@ public class AnvilChunkSection implements ChunkSection {
@Setter
private int y;
private TByteList blocks = new TByteLinkedList();
private TByteList blocks = new TByteArrayList();
@Setter
private NibbleArray blocksMeta;
@Setter