当前位置: 首页>>代码示例>>Java>>正文


Java ChunkProviderEnd类代码示例

本文整理汇总了Java中net.minecraft.world.gen.ChunkProviderEnd的典型用法代码示例。如果您正苦于以下问题:Java ChunkProviderEnd类的具体用法?Java ChunkProviderEnd怎么用?Java ChunkProviderEnd使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ChunkProviderEnd类属于net.minecraft.world.gen包,在下文中一共展示了ChunkProviderEnd类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
private void create(World worldIn, ChunkProviderEnd chunkProvider, Random rnd, int chunkX, int chunkZ)
{
    Random random = new Random((long)(chunkX + chunkZ * 10387313));
    Rotation rotation = Rotation.values()[random.nextInt(Rotation.values().length)];
    int i = MapGenEndCity.func_191070_b(chunkX, chunkZ, chunkProvider);

    if (i < 60)
    {
        this.isSizeable = false;
    }
    else
    {
        BlockPos blockpos = new BlockPos(chunkX * 16 + 8, i, chunkZ * 16 + 8);
        StructureEndCityPieces.func_191087_a(worldIn.getSaveHandler().getStructureTemplateManager(), blockpos, rotation, this.components, rnd);
        this.updateBoundingBox();
        this.isSizeable = true;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:MapGenEndCity.java

示例2: getGroundLevel

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
public static int getGroundLevel(World worldin, int xpos, int zpos) {
    int chunkX = xpos >> 4;
    int chunkZ = zpos >> 4;
    IChunkProvider provider = worldin.getChunkProvider();
    ChunkPrimer primer = new ChunkPrimer();
    if (chunkX == cachedChunkX && chunkZ == cachedChunkZ && cachedChunk != null) {
        primer = cachedChunk;
    } else {
        if (provider instanceof ChunkProviderOverworld) {
            ((ChunkProviderOverworld)provider).setBlocksInChunk(chunkX, chunkZ, primer);
        } else if (provider instanceof ChunkProviderEnd) {
            ((ChunkProviderEnd) provider).setBlocksInChunk(chunkX, chunkZ, primer);
        } else if (provider instanceof ChunkProviderFlat) {
            return worldin.getSeaLevel();
        } else {
            return -1; // unhandled dimension.
        }
        cachedChunk = primer;
        cachedChunkX = chunkX;
        cachedChunkZ = chunkZ;
    }
    return primer.findGroundBlockIdx(xpos & 15, zpos & 15);
}
 
开发者ID:MinimumContent,项目名称:muon,代码行数:24,代码来源:MuonUtils.java

示例3: Setup_Vanilla

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
/**
 * Vanilla MC (End Asteroids)
 */
private ModContainer Setup_Vanilla()
{
    // --- Mod Vanilla (Heh, "mod")
    ModContainer modMCVanilla = new ModContainer("Vanilla");

    // If you happen to have an asteroid dim, just skip the blocklist, and setDimensionType() to DimensionType.Asteroid
    // also don't forget to add at least one asteroid type, or nothing will generate!
    ModDimensionDef dimEndAsteroids = new ModDimensionDef("EndAsteroids", ChunkProviderEnd.class, Enums.DimensionType.Asteroid);

    dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.Netherrack));
    dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.RedGranite));
    dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.BlackGranite));
    dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.EndStone));

    // These Blocks will randomly be generated
    dimEndAsteroids.addSpecialAsteroidBlock(new SpecialBlockComb(Blocks.glowstone));
    dimEndAsteroids.addSpecialAsteroidBlock(new SpecialBlockComb(Blocks.lava, Enums.AllowedBlockPosition.AsteroidCore));

    modMCVanilla.addDimensionDef(dimEndAsteroids);

    return modMCVanilla;
}
 
开发者ID:GTNewHorizons,项目名称:NewHorizonsCoreMod,代码行数:26,代码来源:SpaceDimRegisterer.java

示例4: generate

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
	// chunkX <<= 4;
	// chunkZ <<= 4;
	BlockPos pos = new BlockPos(chunkX, 1, chunkZ);
	if (chunkGenerator instanceof ChunkProviderGenerate
			|| chunkGenerator.getClass().toString().contains("ChunkProviderRTG"))
	{
		this.generateOverworld(world, random, chunkX, chunkZ);
		if (Config.genBiomeStones == true)
		{
			this.genBiomeStone(world, chunkX, chunkZ, random);
		}
	}
	else if (chunkGenerator instanceof ChunkProviderHell)
	{
		this.generateNether(world, random, chunkX, chunkZ);
	}
	else if (chunkGenerator instanceof ChunkProviderEnd)
	{
		this.generateEnd(world, random, chunkX, chunkZ);
	}
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:25,代码来源:MGenHandler.java

示例5: generate

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
    if(!(chunkGenerator instanceof ChunkProviderHell) && !(chunkGenerator instanceof ChunkProviderEnd))
    {
        for(int i = 0; i < ConfigurationHandler.leadOrePerChunk; i++)
        {
            int randPosX = (chunkX*16) + random.nextInt(16);
            int randPosY = random.nextInt(60);
            int randPosZ = (chunkZ*16) + random.nextInt(16);
            new WorldGenMinable(ModBlocks.leadOre, 10, Blocks.stone).generate(world, random, randPosX, randPosY, randPosZ);
        }


    }
}
 
开发者ID:JWStrube,项目名称:Aftermath,代码行数:17,代码来源:OreGenHandler.java

示例6: Setup_Vanilla

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
/**
 * Vanilla MC (End Asteroids)
 */
private ModContainer Setup_Vanilla()
{
	// --- Mod Vanilla (Heh, "mod")
	ModContainer modMCVanilla = new ModContainer("Vanilla");

	// If you happen to have an asteroid dim, just skip the blocklist, and setDimensionType() to DimensionType.Asteroid
	// also don't forget to add at least one asteroid type, or nothing will generate!
	ModDimensionDef dimEndAsteroids = new ModDimensionDef("EndAsteroids", ChunkProviderEnd.class, DimensionType.Asteroid);
	
	dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.Netherrack)); 
	dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.RedGranite)); 
	dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.BlackGranite));
	dimEndAsteroids.addAsteroidMaterial(new AsteroidBlockComb(GTOreTypes.EndStone));
	
	// These Blocks will randomly be generated
	dimEndAsteroids.addSpecialAsteroidBlock(new SpecialBlockComb(Blocks.glowstone));
	dimEndAsteroids.addSpecialAsteroidBlock(new SpecialBlockComb(Blocks.lava, AllowedBlockPosition.AsteroidCore));
	
	modMCVanilla.addDimensionDef(dimEndAsteroids);
	
	return modMCVanilla;
}
 
开发者ID:GTNewHorizons,项目名称:GalacticGregGT5,代码行数:26,代码来源:ModRegisterer.java

示例7: isOreGeneratedInWorld

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
@Override
public boolean isOreGeneratedInWorld(World world, IChunkProvider chunkGenerator)
{
	if (!this.shouldGenerate)
	{
		return false;
	}
	if (this.ignoreSurface && chunkGenerator instanceof ChunkProviderGenerate)
	{
		return false;
	}
	if (this.ignoreNether && chunkGenerator instanceof ChunkProviderHell)
	{
		return false;
	}
	if (this.ignoreEnd && chunkGenerator instanceof ChunkProviderEnd)
	{
		return false;
	}
	return true;
}
 
开发者ID:tterrag1098,项目名称:SimpleTransmutations,代码行数:22,代码来源:OreGenReplace.java

示例8: func_191070_b

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
private static int func_191070_b(int p_191070_0_, int p_191070_1_, ChunkProviderEnd p_191070_2_)
{
    Random random = new Random((long)(p_191070_0_ + p_191070_1_ * 10387313));
    Rotation rotation = Rotation.values()[random.nextInt(Rotation.values().length)];
    ChunkPrimer chunkprimer = new ChunkPrimer();
    p_191070_2_.setBlocksInChunk(p_191070_0_, p_191070_1_, chunkprimer);
    int i = 5;
    int j = 5;

    if (rotation == Rotation.CLOCKWISE_90)
    {
        i = -5;
    }
    else if (rotation == Rotation.CLOCKWISE_180)
    {
        i = -5;
        j = -5;
    }
    else if (rotation == Rotation.COUNTERCLOCKWISE_90)
    {
        j = -5;
    }

    int k = chunkprimer.findGroundBlockIdx(7, 7);
    int l = chunkprimer.findGroundBlockIdx(7, 7 + j);
    int i1 = chunkprimer.findGroundBlockIdx(7 + i, 7);
    int j1 = chunkprimer.findGroundBlockIdx(7 + i, 7 + j);
    int k1 = Math.min(Math.min(k, l), Math.min(i1, j1));
    return k1;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:31,代码来源:MapGenEndCity.java

示例9: create

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
private void create(World worldIn, ChunkProviderEnd chunkProvider, Random rnd, int chunkX, int chunkZ)
{
    Rotation rotation = Rotation.values()[rnd.nextInt(Rotation.values().length)];
    ChunkPrimer chunkprimer = new ChunkPrimer();
    chunkProvider.setBlocksInChunk(chunkX, chunkZ, chunkprimer);
    int i = 5;
    int j = 5;

    if (rotation == Rotation.CLOCKWISE_90)
    {
        i = -5;
    }
    else if (rotation == Rotation.CLOCKWISE_180)
    {
        i = -5;
        j = -5;
    }
    else if (rotation == Rotation.COUNTERCLOCKWISE_90)
    {
        j = -5;
    }

    int k = chunkprimer.findGroundBlockIdx(7, 7);
    int l = chunkprimer.findGroundBlockIdx(7, 7 + j);
    int i1 = chunkprimer.findGroundBlockIdx(7 + i, 7);
    int j1 = chunkprimer.findGroundBlockIdx(7 + i, 7 + j);
    int k1 = Math.min(Math.min(k, l), Math.min(i1, j1));

    if (k1 < 60)
    {
        this.isSizeable = false;
    }
    else
    {
        BlockPos blockpos = new BlockPos(chunkX * 16 + 8, k1, chunkZ * 16 + 8);
        StructureEndCityPieces.beginHouseTower(blockpos, rotation, this.components, rnd);
        this.updateBoundingBox();
        this.isSizeable = true;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:41,代码来源:MapGenEndCity.java

示例10: generate

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
    if (!(chunkGenerator instanceof ChunkProviderHell) && !(chunkGenerator instanceof ChunkProviderEnd)) {
        generateSurface(world, random, chunkX * 16, chunkZ * 16);
    } else if (chunkGenerator instanceof ChunkProviderHell) {
        generateNether(world, random, chunkX * 16, chunkZ * 16);
    } else {
        generateEnd(world, random, chunkX * 16, chunkZ * 16);
    }
}
 
开发者ID:MagiciansArtificeTeam,项目名称:Magicians-Artifice,代码行数:11,代码来源:GenerationHandler.java

示例11: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
/**
 * Returns a new chunk provider which generates chunks for this world
 */
public IChunkProvider createChunkGenerator()
{
    return new ChunkProviderEnd(this.worldObj, this.worldObj.getSeed());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:WorldProviderEnd.java

示例12: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
public IChunkGenerator createChunkGenerator()
{
    return new ChunkProviderEnd(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.worldObj.getSeed(), this.getSpawnCoordinate());
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:WorldProviderEnd.java

示例13: MapGenEndCity

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
public MapGenEndCity(ChunkProviderEnd p_i46665_1_)
{
    this.endProvider = p_i46665_1_;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:MapGenEndCity.java

示例14: Start

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
public Start(World worldIn, ChunkProviderEnd chunkProvider, Random random, int chunkX, int chunkZ)
{
    super(chunkX, chunkZ);
    this.create(worldIn, chunkProvider, random, chunkX, chunkZ);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:MapGenEndCity.java

示例15: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderEnd; //导入依赖的package包/类
public IChunkGenerator createChunkGenerator()
{
    return new ChunkProviderEnd(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.worldObj.getSeed());
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:WorldProviderEnd.java


注:本文中的net.minecraft.world.gen.ChunkProviderEnd类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。