optimize
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user