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


Java BiomeCache类代码示例

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


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

示例1: BiomeProviderATG

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public BiomeProviderATG(World world)
{
    this.world = world;
    this.settings = WorldSettings.loadWorldSettings(world).biomeSettings;

    this.noise = new CoreNoise(world.getSeed());

    this.fuzz = new Random();
    this.biomeCache = new BiomeCache(this);
    this.biomesToSpawnIn = Lists.newArrayList(allowedBiomes);

    this.biomeRegistry = new BiomeRegistry();
    this.biomeRegistry.populate(this.settings);

    // TODO: Set things based on the world settings
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:17,代码来源:BiomeProviderATG.java

示例2: getBiomeCacheBlock

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
/**
    * Returns a biome cache block at location specified.
    */
   @Override
public BiomeCache.Block getBiomeCacheBlock(int x, int z)
   {
       x = x >> 4;
       z = z >> 4;
       long i = (long)x & 4294967295L | ((long)z & 4294967295L) << 32;
       BiomeCache.Block biomecache$block = this.cacheMap.get(i);

       if (biomecache$block == null)
       {
           biomecache$block = new BiomeCache.Block(x, z);
           this.cacheMap.put(i, biomecache$block);
           this.cache.add(biomecache$block);
       }

       biomecache$block.lastAccessTime = MinecraftServer.getCurrentTimeMillis();
       return biomecache$block;
   }
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:22,代码来源:WorldTypeExP.java

示例3: cleanupCache

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
/**
    * Removes BiomeCacheBlocks from this cache that haven't been accessed in at least 30 seconds.
    */
   @Override
public void cleanupCache()
   {
       long i = MinecraftServer.getCurrentTimeMillis();
       long j = i - this.lastCleanupTime;

       if (j > 1000L || j < 0L)
       {
           this.lastCleanupTime = i;

           for (int k = 0; k < this.cache.size(); ++k)
           {
               BiomeCache.Block biomecache$block = this.cache.get(k);
               long l = i - biomecache$block.lastAccessTime;

               if (l > 3000L || l < 0L)
               {
                   this.cache.remove(k--);
                   long i1 = (long)biomecache$block.x & 4294967295L | ((long)biomecache$block.z & 4294967295L) << 32;
                   this.cacheMap.remove(i1);
               }
           }
       }
   }
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:28,代码来源:WorldTypeExP.java

示例4: ChunkManagerPlanet

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public ChunkManagerPlanet(long seed, WorldType default1, DimensionProperties properties) {

		this.biomeCache = new BiomeCache(this);//new BiomeCacheExtended(this);
		//TODO: more biomes
		//TODO: remove rivers
		GenLayer[] agenlayer = initializeAllBiomeGenerators(seed, default1, properties);//GenLayer.initializeAllBiomeGenerators(seed, default1); //;
		agenlayer = getModdedBiomeGenerators(default1, seed, agenlayer);
		this.genBiomes = agenlayer[0];
		this.biomeIndexLayer = agenlayer[1];
		
		fBiomeCache = ReflectionHelper.findField(BiomeCache.class, "cache", "field_76841_d");
		fBiomeCache.setAccessible(true);
		
		fBiomeCacheMap = ReflectionHelper.findField(BiomeCache.class, "cacheMap", "field_76843_c");
		fBiomeCacheMap.setAccessible(true);
	}
 
开发者ID:zmaster587,项目名称:AdvancedRocketry,代码行数:17,代码来源:ChunkManagerPlanet.java

示例5: FirmaBiomeProvider

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public FirmaBiomeProvider(long seed, WorldType worldTypeIn, String options) {
	this.biomeCache = new BiomeCache(this);
	FirmaBiome[] allowedBiomesFirma = { FirmaBiome.PLAINS, FirmaBiome.HILLS ,FirmaBiome.SWAMP };
	this.biomesToSpawnIn = Lists.newArrayList(allowedBiomesFirma);
	GenLayer[] agenlayer = FirmaGenLayer.initialize(seed, worldTypeIn);
	this.genBiomes = agenlayer[0];
	this.biomeIndexLayer = agenlayer[1];
}
 
开发者ID:trigg,项目名称:Firma,代码行数:9,代码来源:FirmaBiomeProvider.java

示例6: WorldChunkManagerEpic

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public WorldChunkManagerEpic()
{
	this.biomeCache = new BiomeCache(this);
	this.biomesToSpawnIn = new ArrayList();
	this.biomesToSpawnIn.add(BiomeRegistry.biomePat);
	this.biomesToSpawnIn.add(BiomeRegistry.biomeJen);
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:9,代码来源:WorldChunkManagerEpic.java

示例7: BiomeProviderPaintedBiomes

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public BiomeProviderPaintedBiomes(World world, BiomeProvider biomeProviderParent, ImageHandler imageHandler)
{
    super(world.getWorldInfo());
    this.parent = biomeProviderParent;
    this.imageHandler = imageHandler;
    this.biomeCache = new BiomeCache(this);
}
 
开发者ID:maruohon,项目名称:paintedbiomes,代码行数:8,代码来源:BiomeProviderPaintedBiomes.java

示例8: WorldChunkManagerNowhere

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected WorldChunkManagerNowhere()
{
	this.biomeCache = new BiomeCache(this);
	this.biomesToSpawnIn = new ArrayList<BiomeGenBase>();
	this.biomesToSpawnIn.add(ModBiomes.biomeNowhere);
	
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:9,代码来源:WorldChunkManagerNowhere.java

示例9: WorldChunkManagerCretaceous

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected WorldChunkManagerCretaceous()
{
	this.biomeCache = new BiomeCache(this);
	this.biomesToSpawnIn = new ArrayList<BiomeGenBase>();
	this.biomesToSpawnIn.add(ModBiomes.biomeCretaceousDry);
	
}
 
开发者ID:Alex-the-666,项目名称:It-s-About-Time-Minecraft-Mod,代码行数:9,代码来源:WorldChunkManagerCretaceous.java

示例10: WorldChunkManagerTDE

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public WorldChunkManagerTDE()
{
	this.biomeCache = new BiomeCache(this);
	this.biomesToSpawnIn = new ArrayList();
	this.biomesToSpawnIn.addAll(allowedBiomes);
}
 
开发者ID:TheDarkEra,项目名称:TheDarkEra,代码行数:8,代码来源:WorldChunkManagerTDE.java

示例11: WorldChunkManagerMultiBiome

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
protected WorldChunkManagerMultiBiome(){
this.myBiomeCache = new BiomeCache(this);
this.myBiomesToSpawnIn = new ArrayList<BiomeGenBase>();
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeThunderPlains);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeHighwaste);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeGolmoreJungle);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeCactusIsland);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeCalmLands);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeEvilForest);
this.myBiomesToSpawnIn.add(FCraftBiomes.biomeMarsh);
}
 
开发者ID:Unrelentless,项目名称:FantasyCraft-Mod,代码行数:12,代码来源:WorldChunkManagerMultiBiome.java

示例12: BiomeProviderDreadlands

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public BiomeProviderDreadlands()
{
	biomeCache = new BiomeCache(this);
	biomesToSpawnIn = new ArrayList<Biome>();
	biomesToSpawnIn.add(ACBiomes.dreadlands);
	biomesToSpawnIn.add(ACBiomes.purified_dreadlands);
	biomesToSpawnIn.add(ACBiomes.dreadlands_forest);
	biomesToSpawnIn.add(ACBiomes.dreadlands_mountains);
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:10,代码来源:BiomeProviderDreadlands.java

示例13: WorldChunkManager

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
protected WorldChunkManager() {
   this.field_76942_f = new BiomeCache(this);
   this.field_76943_g = new ArrayList();
   this.field_76943_g.add(BiomeGenBase.field_76767_f);
   this.field_76943_g.add(BiomeGenBase.field_76772_c);
   this.field_76943_g.add(BiomeGenBase.field_76768_g);
   this.field_76943_g.add(BiomeGenBase.field_76784_u);
   this.field_76943_g.add(BiomeGenBase.field_76785_t);
   this.field_76943_g.add(BiomeGenBase.field_76782_w);
   this.field_76943_g.add(BiomeGenBase.field_76792_x);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:WorldChunkManager.java

示例14: BiomeCacheBlock

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
public BiomeCacheBlock(BiomeCache p_i1972_1_, int p_i1972_2_, int p_i1972_3_) {
   this.field_76887_g = p_i1972_1_;
   this.field_76892_a = new float[256];
   this.field_76890_b = new float[256];
   this.field_76891_c = new BiomeGenBase[256];
   this.field_76888_d = p_i1972_2_;
   this.field_76889_e = p_i1972_3_;
   BiomeCache.func_76836_a(p_i1972_1_).func_76934_b(this.field_76892_a, p_i1972_2_ << 4, p_i1972_3_ << 4, 16, 16);
   BiomeCache.func_76836_a(p_i1972_1_).func_76936_a(this.field_76890_b, p_i1972_2_ << 4, p_i1972_3_ << 4, 16, 16);
   BiomeCache.func_76836_a(p_i1972_1_).func_76931_a(this.field_76891_c, p_i1972_2_ << 4, p_i1972_3_ << 4, 16, 16, false);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:BiomeCacheBlock.java

示例15: WorldChunkManagerEI

import net.minecraft.world.biome.BiomeCache; //导入依赖的package包/类
protected WorldChunkManagerEI() {
	this.myBiomeCache = new BiomeCache(this);
	this.myBiomesToSpawnIn = new ArrayList<BiomeGenBase>();
	this.myBiomesToSpawnIn.add(ModBiomes.ancientBioluminescentForest);
	this.myBiomesToSpawnIn.add(ModBiomes.ancientBioluminescentJungle);
	this.myBiomesToSpawnIn.add(ModBiomes.ancientBioluminescentPlains);
	this.myBiomesToSpawnIn.add(ModBiomes.ancientBioluminescentSwamp);
}
 
开发者ID:ChistaMisuto,项目名称:Eldritch-Infusion,代码行数:9,代码来源:WorldChunkManagerEI.java


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