/** * creates a new world chunk manager for WorldProvider */ protected void registerWorldChunkManager() { WorldType worldtype = this.worldObj.getWorldInfo().getTerrainType(); if (worldtype == WorldType.FLAT) { FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions()); this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.getBiomeFromBiomeList(flatgeneratorinfo.getBiome(), BiomeGenBase.field_180279_ad), 0.5F); } else if (worldtype == WorldType.DEBUG_WORLD) { this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.plains, 0.0F); } else { this.worldChunkMgr = new WorldChunkManager(this.worldObj); } }
public BiomeGenBase getBiome(BlockPos pos, WorldChunkManager chunkManager) { int i = pos.getX() & 15; int j = pos.getZ() & 15; int k = this.blockBiomeArray[j << 4 | i] & 255; if (k == 255) { BiomeGenBase biomegenbase = chunkManager.getBiomeGenerator(pos, BiomeGenBase.plains); k = biomegenbase.biomeID; this.blockBiomeArray[j << 4 | i] = (byte)(k & 255); } BiomeGenBase biomegenbase1 = BiomeGenBase.getBiome(k); return biomegenbase1 == null ? BiomeGenBase.plains : biomegenbase1; }
@Override protected void registerWorldChunkManager() { if(wrapped.getType().equals("overworld")){ this.worldChunkMgr = new WorldChunkManager(this.worldObj); }else if(wrapped.getType().equals("void")){ this.worldChunkMgr = new WorldChunkManagerVoid(this.worldObj); }else if(wrapped.getType().equals("nether")){ this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.hell, 0.0F); this.isHellWorld = true; this.hasNoSky = true; }else if(wrapped.getType().equals("end")){ this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.sky, 0.0F); this.hasNoSky = true; }else if(wrapped.getType().equals("flat")){ FlatGeneratorInfo info = FlatGeneratorInfo.createFlatGeneratorFromString(this.wrapped.getOptions()); this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.getBiome(info.getBiome()), 0.5F); }else{ throw new IllegalArgumentException("Unknown world type " + this.wrapped.getType()); } }
private void convertFile(File p_75813_1_, Iterable<File> p_75813_2_, WorldChunkManager p_75813_3_, int p_75813_4_, int p_75813_5_, IProgressUpdate p_75813_6_) { for (File file1 : p_75813_2_) { this.convertChunks(p_75813_1_, file1, p_75813_3_, p_75813_4_, p_75813_5_, p_75813_6_); ++p_75813_4_; int i = (int)Math.round(100.0D * (double)p_75813_4_ / (double)p_75813_5_); p_75813_6_.setLoadingProgress(i); } }
public Start(WorldChunkManager chunkManagerIn, int p_i2104_2_, Random rand, int p_i2104_4_, int p_i2104_5_, List<StructureVillagePieces.PieceWeight> p_i2104_6_, int p_i2104_7_) { super((StructureVillagePieces.Start)null, 0, rand, p_i2104_4_, p_i2104_5_); this.worldChunkMngr = chunkManagerIn; this.structureVillageWeightedPieceList = p_i2104_6_; this.terrainType = p_i2104_7_; BiomeGenBase biomegenbase = chunkManagerIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), BiomeGenBase.field_180279_ad); this.inDesert = biomegenbase == BiomeGenBase.desert || biomegenbase == BiomeGenBase.desertHills; this.func_175846_a(this.inDesert); }
@Override public void registerWorldChunkManager() { if (this.getWorldChunkManagerClass() == null) { super.registerWorldChunkManager(); } else { try { Class<? extends WorldChunkManager> chunkManagerClass = this.getWorldChunkManagerClass(); Constructor<?>[] constructors = chunkManagerClass.getConstructors(); for (Constructor<?> constr : constructors) { if (Arrays.equals(constr.getParameterTypes(), new Object[] { World.class })) { this.worldChunkMgr = (WorldChunkManager) constr.newInstance(this.worldObj); } else if (constr.getParameterTypes().length == 0) { this.worldChunkMgr = (WorldChunkManager) constr.newInstance(); } } } catch (Exception e) { e.printStackTrace(); } } }
public StructureComponentVillageStartPiece(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, ArrayList<StructureVillagePieceWeightMoon> par6ArrayList, int par7) { super((StructureComponentVillageStartPiece) null, 0, par3Random, par4, par5); this.worldChunkMngr = par1WorldChunkManager; this.structureVillageWeightedPieceList = par6ArrayList; this.terrainType = par7; this.startPiece = this; }
public VillageStructureComponentStartPiece(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, ArrayList<VillageStructurePieceWeight> par6ArrayList, int par7) { super((VillageStructureComponentStartPiece) null, 0, par3Random, par4, par5); this.worldChunkMngr = par1WorldChunkManager; this.structureVillageWeightedPieceList = par6ArrayList; this.terrainType = par7; this.startPiece = this; }
public static void addSpawnBiome(BiomeGenBase biome) { if (!WorldChunkManager.allowedBiomes.contains(biome)) { WorldChunkManager.allowedBiomes.add(biome); } }
public static void removeSpawnBiome(BiomeGenBase biome) { if (WorldChunkManager.allowedBiomes.contains(biome)) { WorldChunkManager.allowedBiomes.remove(biome); } }
public Start(WorldChunkManager p_i2104_1_, int p_i2104_2_, Random p_i2104_3_, int p_i2104_4_, int p_i2104_5_, List p_i2104_6_, int p_i2104_7_) { super((StructureVillagePieces.Start)null, 0, p_i2104_3_, p_i2104_4_, p_i2104_5_); this.worldChunkMngr = p_i2104_1_; this.structureVillageWeightedPieceList = p_i2104_6_; this.terrainType = p_i2104_7_; BiomeGenBase biomegenbase = p_i2104_1_.getBiomeGenAt(p_i2104_4_, p_i2104_5_); this.inDesert = biomegenbase == BiomeGenBase.desert || biomegenbase == BiomeGenBase.desertHills; this.biome = biomegenbase; }
public TileableChunkProvider(World worldIn, long seed, boolean someFlag, String settings) { super(worldIn, seed, someFlag, getChunkProviderGenerateSettingsAndSetConfig(settings, worldIn)); int size = Config.loopBits(worldIn.provider.getDimensionId()); Config.setSizeBits(worldIn.provider.getDimensionId(), size); WorldChunkManager wcm = worldIn.provider.getWorldChunkManager(); List<GenLayer> genLayers = ReflectionUtil.getValuesByType(GenLayer.class, WorldChunkManager.class, wcm, false); WorldGenUtil.setLayerSize(genLayers, size); }
@Override public WorldChunkManager getChunkManager(World world) { if (this == FLAT) { return new WorldChunkManagerFlatVC(world); } return new WorldChunkManagerVC(world); }
/** * creates a new world chunk manager for WorldProvider */ protected void registerWorldChunkManager() { if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT) { FlatGeneratorInfo var1 = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions()); this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.func_150568_d(var1.getBiome()), 0.5F); } else { this.worldChunkMgr = new WorldChunkManager(this.worldObj); } }
/** * This method retrieves the biome at a set of coordinates */ public BiomeGenBase getBiomeGenForWorldCoords(int par1, int par2, WorldChunkManager par3WorldChunkManager) { int var4 = this.blockBiomeArray[par2 << 4 | par1] & 255; if (var4 == 255) { BiomeGenBase var5 = par3WorldChunkManager.getBiomeGenAt((this.xPosition << 4) + par1, (this.zPosition << 4) + par2); var4 = var5.biomeID; this.blockBiomeArray[par2 << 4 | par1] = (byte)(var4 & 255); } return BiomeGenBase.func_150568_d(var4) == null ? BiomeGenBase.plains : BiomeGenBase.func_150568_d(var4); }
private void convertFile(File par1File, Iterable par2Iterable, WorldChunkManager par3WorldChunkManager, int par4, int par5, IProgressUpdate par6IProgressUpdate) { Iterator var7 = par2Iterable.iterator(); while (var7.hasNext()) { File var8 = (File)var7.next(); this.convertChunks(par1File, var8, par3WorldChunkManager, par4, par5, par6IProgressUpdate); ++par4; int var9 = (int)Math.round(100.0D * (double)par4 / (double)par5); par6IProgressUpdate.setLoadingProgress(var9); } }
public Start(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, List par6List, int par7) { super((StructureVillagePieces.Start)null, 0, par3Random, par4, par5); this.worldChunkMngr = par1WorldChunkManager; this.structureVillageWeightedPieceList = par6List; this.terrainType = par7; BiomeGenBase var8 = par1WorldChunkManager.getBiomeGenAt(par4, par5); this.inDesert = var8 == BiomeGenBase.desert || var8 == BiomeGenBase.desertHills; }
public StructureComponentVenusVillageStartPiece(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, ArrayList<StructureVillagePieceWeightVenus> par6ArrayList, int par7) { super((StructureComponentVenusVillageStartPiece) null, 0, par3Random, par4, par5); this.worldChunkMngr = par1WorldChunkManager; this.structureVillageWeightedPieceList = par6ArrayList; this.terrainType = par7; this.startPiece = this; }
public VCraftWorld(long seed, WorldChunkManager wcm) { this.seed = seed; this.wcm = (ClimateGenWorldChunkManager)wcm; grassspeckle = new PseudoNumberGen(1); grassspeckle.initWorldGenSeed(seed); }
public WorldChunkManagerIG(World world) { super(); GenLayer[] agenlayer = GenLayerBiomeIG.initializeAllBiomeGenerators(world.getSeed(), world.getWorldInfo().getTerrainType()); agenlayer = getModdedBiomeGenerators(world.getWorldInfo().getTerrainType(), world.getSeed(), agenlayer); ObfuscationReflectionHelper.setPrivateValue(WorldChunkManager.class, this, agenlayer[0], "genBiomes", "field_76944_d"); ObfuscationReflectionHelper.setPrivateValue(WorldChunkManager.class, this, agenlayer[1], "biomeIndexLayer", "field_76945_e"); }
public BiomeGenBase getBiomeGenForWorldCoords(int p_76591_1_, int p_76591_2_, WorldChunkManager p_76591_3_) { int k = this.blockBiomeArray[p_76591_2_ << 4 | p_76591_1_] & 255; if (k == 255) { BiomeGenBase biomegenbase = p_76591_3_.getBiomeGenAt((this.xPosition << 4) + p_76591_1_, (this.zPosition << 4) + p_76591_2_); k = biomegenbase.biomeID; this.blockBiomeArray[p_76591_2_ << 4 | p_76591_1_] = (byte)(k & 255); } return BiomeGenBase.getBiome(k) == null ? BiomeGenBase.plains : BiomeGenBase.getBiome(k); }