Cleaned up ContainerBlock inventory reading from NBT

Changed ListTag's List parameter to List<? extends Tag>
This commit is contained in:
zml2008
2012-03-29 21:11:49 -07:00
parent 33752eb058
commit 3bfb12c051
13 changed files with 185 additions and 302 deletions

View File

@ -31,6 +31,11 @@ import com.sk89q.worldedit.*;
* @author sk89q
*/
public abstract class ChunkStore {
/**
* >> to chunk
* << from chunk
*/
public static final int CHUNK_SHIFTS = 4;
/**
* Convert a position to a chunk.
*
@ -66,7 +71,7 @@ public abstract class ChunkStore {
*/
public Chunk getChunk(Vector2D pos, LocalWorld world)
throws DataException, IOException {
CompoundTag tag = getChunkTag(pos, world);
Map<String, Tag> tags = tag.getValue();
if(tags.containsKey("Sections")) {