當前位置: 首頁>>代碼示例>>Java>>正文


Java WorldChunkManager類代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:22,代碼來源:WorldProvider.java

示例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;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:17,代碼來源:Chunk.java

示例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());
    }
}
 
開發者ID:nailed,項目名稱:nailed,代碼行數:21,代碼來源:DelegatingWorldProvider.java

示例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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:11,代碼來源:AnvilSaveConverter.java

示例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);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:11,代碼來源:StructureVillagePieces.java

示例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();
        }
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:33,代碼來源:WorldProviderSpace.java

示例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;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:9,代碼來源:StructureComponentVillageStartPiece.java

示例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;
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:8,代碼來源:VillageStructureComponentStartPiece.java

示例9: addSpawnBiome

import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
public static void addSpawnBiome(BiomeGenBase biome)
{
    if (!WorldChunkManager.allowedBiomes.contains(biome))
    {
        WorldChunkManager.allowedBiomes.add(biome);
    }
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:8,代碼來源:BiomeManager.java

示例10: removeSpawnBiome

import net.minecraft.world.biome.WorldChunkManager; //導入依賴的package包/類
public static void removeSpawnBiome(BiomeGenBase biome)
{
    if (WorldChunkManager.allowedBiomes.contains(biome))
    {
        WorldChunkManager.allowedBiomes.remove(biome);
    }
}
 
開發者ID:SchrodingersSpy,項目名稱:TRHS_Club_Mod_2016,代碼行數:8,代碼來源:BiomeManager.java

示例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;
}
 
開發者ID:jtrent238,項目名稱:PopularMMOS-EpicProportions-Mod,代碼行數:11,代碼來源:StructureVillagePieces.java

示例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);
}
 
開發者ID:Barteks2x,項目名稱:McWorldGenLoop,代碼行數:10,代碼來源:TileableChunkProvider.java

示例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);
}
 
開發者ID:tyronx,項目名稱:vintagetg,代碼行數:8,代碼來源:WorldTypeVC.java

示例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);
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:16,代碼來源:WorldProvider.java

示例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);
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:17,代碼來源:Chunk.java


注:本文中的net.minecraft.world.biome.WorldChunkManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。