public void read (NBTTagCompound nbt) {
NBTTagList blocksMapping = nbt.getTagList("blocksMapping",
Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < blocksMapping.tagCount(); ++i) {
NBTTagCompound sub = blocksMapping.getCompoundTagAt(i);
String name = sub.getString("name");
Block b = (Block) Block.blockRegistry.getObject(name);
registerBlock (b);
}
NBTTagList itemsMapping = nbt.getTagList("itemsMapping",
Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < itemsMapping.tagCount(); ++i) {
NBTTagCompound sub = itemsMapping.getCompoundTagAt(i);
String name = sub.getString("name");
Item item = (Item) Item.itemRegistry.getObject(name);
registerItem (item);
}
NBTTagList entitiesMapping = nbt.getTagList("entitiesMapping",
Constants.NBT.TAG_COMPOUND);
for (int i = 0; i < entitiesMapping.tagCount(); ++i) {
NBTTagCompound sub = entitiesMapping.getCompoundTagAt(i);
String name = sub.getString("name");
Class<? extends Entity> e = null;
try {
e = (Class<? extends Entity>) Class.forName(name);
} catch (ClassNotFoundException e1) {