protected void recursivePopulate( World world, int xChunkCoord, int zChunkCoord, int origXChunkCoord, int origZChunkCoord) { Long key = Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(xChunkCoord, zChunkCoord)); if (structureMap.containsKey(key)) { BaseStructureStart start = structureMap.get(key); start.populateChunk(world, origXChunkCoord, origZChunkCoord); } else { FMLLog.info( "No " + this.getName() + " for population for coords " + (xChunkCoord * 16) + "/" + (zChunkCoord * 16) + ", that's weird..."); } }
/** * Creates or gets an instance of BaseStructure, then makes it generate the current chunk * * @param world * @param xChunkCoord * @param zChunkCoord * @param origXChunkCoord * @param origZChunkCoord * @param arrayOfIDs * @param arrayOfMeta */ protected void makeStructure( World world, int xChunkCoord, int zChunkCoord, int origXChunkCoord, int origZChunkCoord, Block[] arrayOfIDs, byte[] arrayOfMeta) { Long key = Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(xChunkCoord, zChunkCoord)); BaseStructureStart start = null; if (!structureMap.containsKey(key)) { start = createNewStructure( xChunkCoord, zChunkCoord); // new GridVillageStart(xChunkCoord, zChunkCoord, this.rand); structureMap.put(key, start); } else { start = structureMap.get(key); } start.generateChunk(origXChunkCoord, origZChunkCoord, arrayOfIDs, arrayOfMeta); }