本文整理汇总了Java中net.minecraft.world.gen.ChunkProviderHell类的典型用法代码示例。如果您正苦于以下问题:Java ChunkProviderHell类的具体用法?Java ChunkProviderHell怎么用?Java ChunkProviderHell使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChunkProviderHell类属于net.minecraft.world.gen包,在下文中一共展示了ChunkProviderHell类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generate
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的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);
}
}
示例2: generate
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的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);
}
}
}
示例3: isOreGeneratedInWorld
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的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;
}
示例4: generate
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的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);
}
}
示例5: generate
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
if (chunkGenerator instanceof ChunkProviderGenerate)
{
mod.generateSurface(world, random, chunkX << 4, chunkZ << 4);
}
else if (chunkGenerator instanceof ChunkProviderHell)
{
mod.generateNether(world, random, chunkX << 4, chunkZ << 4);
}
}
示例6: createChunkGenerator
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
/**
* Returns a new chunk provider which generates chunks for this world
*/
public IChunkProvider createChunkGenerator()
{
return new ChunkProviderHell(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.worldObj.getSeed());
}
示例7: createChunkGenerator
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
public IChunkGenerator createChunkGenerator()
{
return new ChunkProviderHell(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.worldObj.getSeed());
}
示例8: createChunkGeneration
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
public IChunkProvider createChunkGeneration() {
return new ChunkProviderHell(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.worldObj.getSeed());
}
示例9: setTarget
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
public void setTarget(String target, int type) {
this.timeToLive = TimeUtil.secsToTicks(10);
this.spiritType = type;
try {
if(target.equals("Village")) {
IChunkProvider ex;
for(ex = super.worldObj.getChunkProvider(); ex != null && ex instanceof ChunkProviderServer; ex = ((ChunkProviderServer)ex).currentChunkProvider) {
;
}
if(ex != null) {
if(ex instanceof ChunkProviderFlat) {
if(fieldStructureGenerators == null) {
fieldStructureGenerators = ReflectionHelper.findField(ChunkProviderFlat.class, new String[]{"structureGenerators", "field_82696_f", "f"});
}
Iterator iterator = ((List)fieldStructureGenerators.get((ChunkProviderFlat)ex)).iterator();
while(iterator.hasNext()) {
if(this.setWaypointTo(iterator.next(), MapGenVillage.class)) {
return;
}
}
} else if(ex instanceof ChunkProviderGenerate) {
if(fieldVillageGenerator == null) {
fieldVillageGenerator = ReflectionHelper.findField(ChunkProviderGenerate.class, new String[]{"villageGenerator", "field_73224_v", "v"});
}
if(fieldVillageGenerator != null) {
this.setWaypointTo(fieldVillageGenerator.get((ChunkProviderGenerate)ex), MapGenVillage.class);
}
} else if(ex instanceof ChunkProviderHell) {
this.setWaypointTo(((ChunkProviderHell)ex).genNetherBridge);
}
}
}
} catch (IllegalAccessException var5) {
;
}
}
示例10: createChunkGenerator
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
/**
* Returns a new chunk provider which generates chunks for this world
*/
public IChunkProvider createChunkGenerator()
{
return new ChunkProviderHell(this.worldObj, this.worldObj.getSeed());
}
示例11: createChunkGenerator
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
public IChunkProvider createChunkGenerator()
{
return new ChunkProviderHell(this.worldObj, this.worldObj.getSeed());
}
示例12: func_76555_c
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
public IChunkProvider func_76555_c() {
return new ChunkProviderHell(this.field_76579_a, this.field_76579_a.func_72905_C());
}
示例13: populateWorldProperties
import net.minecraft.world.gen.ChunkProviderHell; //导入依赖的package包/类
private static void populateWorldProperties(Map<String,Object> properties, World world, WorldInfo worldInfo)
{
properties.put("world", worldInfo == null ? "" : worldInfo.getWorldName());
properties.put("world.seed", worldInfo == null ? 0L : worldInfo.getSeed());
properties.put("world.version", worldInfo == null ? 0 : worldInfo.getSaveVersion());
properties.put("world.isHardcore", worldInfo == null ? false : worldInfo.isHardcoreModeEnabled());
properties.put("world.hasFeatures", worldInfo == null ? false : worldInfo.isMapFeaturesEnabled());
properties.put("world.hasCheats", worldInfo == null ? false : worldInfo.areCommandsAllowed());
properties.put("world.gameMode", worldInfo == null ? "" : worldInfo.getGameType().getName());
properties.put("world.gameMode.id", worldInfo == null ? 0 : worldInfo.getGameType().getID());
properties.put("world.type", worldInfo == null ? "" : worldInfo.getTerrainType().getName());
properties.put("world.type.version", worldInfo == null ? 0 : worldInfo.getTerrainType().getGeneratorVersion());
String genName = "RandomLevelSource";
String genClass = "ChunkProviderOverworld";
if (world != null)
{
IChunkGenerator chunkGenerator = world.provider.createChunkGenerator();
genName = chunkGenerator.toString();
genClass = chunkGenerator.getClass().getSimpleName();
if (chunkGenerator instanceof ChunkProviderOverworld)
{
genClass = "ChunkProviderOverworld";
}
else if (chunkGenerator instanceof ChunkProviderFlat)
{
genClass = "ChunkProviderFlat";
}
else if (chunkGenerator instanceof ChunkProviderHell)
{
genClass = "ChunkProviderHell";
}
else if (chunkGenerator instanceof ChunkProviderEnd)
{
genName = "EndRandomLevelSource";
genClass = "ChunkProviderEnd";
}
}
properties.put("dimension.generator", genName);
properties.put("dimension.generator.class", genClass);
properties.put("dimension", world == null ? "" : world.provider.getDimensionType().getName());
properties.put("dimension.id", world == null ? 0 : world.provider.getDimension());
properties.put("dimension.isSurface", world == null ? false : world.provider.isSurfaceWorld());
properties.put("dimension.hasNoSky", world == null ? false : world.provider.hasNoSky());
properties.put("dimension.groundLevel", world == null ? 0 : world.provider.getAverageGroundLevel());
properties.put("dimension.actualHeight", world == null ? 0 : world.getActualHeight());
properties.put("dimension.height", world == null ? 0 : world.getHeight());
properties.put("age", false);
}