Package rakama.worldtools.data.entity

Examples of rakama.worldtools.data.entity.EntityFactory


        chunk = new ManagedChunk(xPos.data, zPos.data, heightmap.data, biome.data, manager);
        // TODO: create ManagedSection to catch Section changes?
        // TODO: alternatively, hide sections from interface
        chunk.loadSections(sections);

        EntityFactory factory = manager.getEntityFactory();
       
        Tag tagEntities = level.get("Entities");  
        if(tagEntities != null)
        {
            ListTag<CompoundTag> list = (ListTag<CompoundTag>)tagEntities;           
            for(int i=0; i<list.size(); i++)
                chunk.entities.add(factory.createEntity(list.get(i)));
        }
       
        Tag tagTileEntities = level.get("TileEntities");
        if(tagEntities != null)
        {
            ListTag<CompoundTag> list = (ListTag<CompoundTag>)tagTileEntities;           
            for(int i=0; i<list.size(); i++)
                chunk.tileEntities.add(factory.createTileEntity(list.get(i)));
        }
       
        chunk.tag = tag;
        return chunk;
    }
View Full Code Here

TOP

Related Classes of rakama.worldtools.data.entity.EntityFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.