本文整理匯總了Java中net.minecraft.world.biome.WorldChunkManager類的典型用法代碼示例。如果您正苦於以下問題:Java WorldChunkManager類的具體用法?Java WorldChunkManager怎麽用?Java WorldChunkManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WorldChunkManager類屬於net.minecraft.world.biome包,在下文中一共展示了WorldChunkManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: registerWorldChunkManager
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
/**
* 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);
}
}
示例2: getBiome
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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;
}
示例3: registerWorldChunkManager
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
@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());
}
}
示例4: convertFile
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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);
}
}
示例5: Start
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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);
}
示例6: registerWorldChunkManager
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
@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();
}
}
}
示例7: StructureComponentVillageStartPiece
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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;
}
示例8: VillageStructureComponentStartPiece
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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;
}
示例9: addSpawnBiome
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
public static void addSpawnBiome(BiomeGenBase biome)
{
if (!WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.add(biome);
}
}
示例10: removeSpawnBiome
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
public static void removeSpawnBiome(BiomeGenBase biome)
{
if (WorldChunkManager.allowedBiomes.contains(biome))
{
WorldChunkManager.allowedBiomes.remove(biome);
}
}
示例11: Start
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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;
}
示例12: TileableChunkProvider
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
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);
}
示例13: getChunkManager
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
@Override
public WorldChunkManager getChunkManager(World world) {
if (this == FLAT) {
return new WorldChunkManagerFlatVC(world);
}
return new WorldChunkManagerVC(world);
}
示例14: registerWorldChunkManager
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
/**
* 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);
}
}
示例15: getBiomeGenForWorldCoords
import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
/**
* 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);
}