本文整理汇总了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
}
示例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;
}
示例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);
}
}
}
}
示例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);
}
示例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];
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}