/**
* 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);
}
}
java类net.minecraft.world.biome.WorldChunkManager的实例源码
WorldProvider.java 文件源码
项目:DecompiledMinecraft
阅读 29
收藏 0
点赞 0
评论 0
Chunk.java 文件源码
项目:DecompiledMinecraft
阅读 32
收藏 0
点赞 0
评论 0
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;
}
WorldProvider.java 文件源码
项目:DecompiledMinecraft
阅读 21
收藏 0
点赞 0
评论 0
/**
* 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);
}
}
Chunk.java 文件源码
项目:DecompiledMinecraft
阅读 21
收藏 0
点赞 0
评论 0
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;
}
WorldProvider.java 文件源码
项目:BaseClient
阅读 22
收藏 0
点赞 0
评论 0
/**
* 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);
}
}
Chunk.java 文件源码
项目:BaseClient
阅读 21
收藏 0
点赞 0
评论 0
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;
}
WorldProvider.java 文件源码
项目:BaseClient
阅读 19
收藏 0
点赞 0
评论 0
/**
* 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);
}
}
Chunk.java 文件源码
项目:BaseClient
阅读 27
收藏 0
点赞 0
评论 0
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;
}
DelegatingWorldProvider.java 文件源码
项目:nailed
阅读 22
收藏 0
点赞 0
评论 0
@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());
}
}
AnvilSaveConverter.java 文件源码
项目:DecompiledMinecraft
阅读 26
收藏 0
点赞 0
评论 0
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);
}
}
StructureVillagePieces.java 文件源码
项目:DecompiledMinecraft
阅读 22
收藏 0
点赞 0
评论 0
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);
}
AnvilSaveConverter.java 文件源码
项目:DecompiledMinecraft
阅读 24
收藏 0
点赞 0
评论 0
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);
}
}
StructureVillagePieces.java 文件源码
项目:DecompiledMinecraft
阅读 24
收藏 0
点赞 0
评论 0
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);
}
AnvilSaveConverter.java 文件源码
项目:BaseClient
阅读 19
收藏 0
点赞 0
评论 0
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);
}
}
StructureVillagePieces.java 文件源码
项目:BaseClient
阅读 24
收藏 0
点赞 0
评论 0
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);
}
AnvilSaveConverter.java 文件源码
项目:BaseClient
阅读 26
收藏 0
点赞 0
评论 0
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);
}
}
StructureVillagePieces.java 文件源码
项目:BaseClient
阅读 25
收藏 0
点赞 0
评论 0
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);
}
WorldProviderSpace.java 文件源码
项目:4Space-5
阅读 18
收藏 0
点赞 0
评论 0
@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();
}
}
}
StructureComponentVillageStartPiece.java 文件源码
项目:4Space-5
阅读 20
收藏 0
点赞 0
评论 0
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;
}
VillageStructureComponentStartPiece.java 文件源码
项目:4Space-5
阅读 16
收藏 0
点赞 0
评论 0
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;
}
BiomeManager.java 文件源码
项目:TRHS_Club_Mod_2016
阅读 23
收藏 0
点赞 0
评论 0
public static void addSpawnBiome(BiomeGenBase biome)
{
if (!WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.add(biome);
}
}
BiomeManager.java 文件源码
项目:TRHS_Club_Mod_2016
阅读 22
收藏 0
点赞 0
评论 0
public static void removeSpawnBiome(BiomeGenBase biome)
{
if (WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.remove(biome);
}
}
StructureVillagePieces.java 文件源码
项目:PopularMMOS-EpicProportions-Mod
阅读 24
收藏 0
点赞 0
评论 0
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;
}
TileableChunkProvider.java 文件源码
项目:McWorldGenLoop
阅读 24
收藏 0
点赞 0
评论 0
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);
}
WorldTypeVC.java 文件源码
项目:vintagetg
阅读 26
收藏 0
点赞 0
评论 0
@Override
public WorldChunkManager getChunkManager(World world) {
if (this == FLAT) {
return new WorldChunkManagerFlatVC(world);
}
return new WorldChunkManagerVC(world);
}
BiomeManager.java 文件源码
项目:CauldronGit
阅读 26
收藏 0
点赞 0
评论 0
public static void addSpawnBiome(BiomeGenBase biome)
{
if (!WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.add(biome);
}
}
BiomeManager.java 文件源码
项目:CauldronGit
阅读 21
收藏 0
点赞 0
评论 0
public static void removeSpawnBiome(BiomeGenBase biome)
{
if (WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.remove(biome);
}
}
WorldProvider.java 文件源码
项目:Resilience-Client-Source
阅读 17
收藏 0
点赞 0
评论 0
/**
* 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);
}
}
Chunk.java 文件源码
项目:Resilience-Client-Source
阅读 22
收藏 0
点赞 0
评论 0
/**
* 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);
}
AnvilSaveConverter.java 文件源码
项目:Resilience-Client-Source
阅读 25
收藏 0
点赞 0
评论 0
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);
}
}