Java 类net.minecraft.world.gen.layer.GenLayerBiome 实例源码

项目:Geographicraft    文件:LockGenLayers.java   
private Filter<GenLayer> isBiomeLayer() {
    return new Filter<GenLayer>() {
        public boolean accepts(GenLayer tested) {
            if (tested == null) return false;
            //LockGenLayer.logger.info(tested.getClass().getCanonicalName());
            //if (tested.getClass().getCanonicalName().contains("GenLayerBiome")) return true; BiomeLayerBiomes
            if (tested instanceof GenLayerBiome) return true;
            if (tested instanceof GenLayerBiomeByClimate) return true;
            if (tested instanceof GenLayerBiomeByTaggedClimate) return true;
            if (tested instanceof GenLayerRandomBiomes) return true;
            if (tested instanceof GenLayerOneSixBiome) return true;
            if (tested.getClass().getCanonicalName().contains("BiomeLayerBiomes")) return true;
            if (tested.getClass().getCanonicalName().contains("GenLayerBiomeEdgeHL")) return true;
            if (tested.getClass().getCanonicalName().contains("GenLayerBiomeByTaggedClimate")) return true;
            return false;
        }

    };
}
项目:McWorldGenLoop    文件:BiomeTileable.java   
public BiomeTileable(GenLayerBiome originalLayer) {
    super(0, null, null, null);
    ReflectionUtil.copyNonStaticFieldsByType(GenLayer.class, long.class, originalLayer, this);
    ReflectionUtil.copyNonStaticFieldsByType(GenLayer.class, GenLayer.class, originalLayer, this);
    ReflectionUtil.copyNonStaticFieldsByType(GenLayerBiome.class, List[].class, originalLayer, this);
    ReflectionUtil.copyNonStaticFieldsByType(GenLayerBiome.class, ChunkProviderSettings.class, originalLayer, this);
    this.parent = GenLayerTileableUtil.getTileableLayer(this.parent);
}
项目:N-API    文件:BiomeRegistry.java   
/**
 * Registers all of the biomes added by mods to vanilla.
 */
@Internal
public static final void registerAllBiomes(GenLayerBiome biomeGenLayer)
{
    BiomeGenBase[] hotBiomes = ReflectionManipulateValues.getValue(GenLayerBiome.class, biomeGenLayer, "field_151623_c");
    BiomeGenBase[] temperateBiomes = ReflectionManipulateValues.getValue(GenLayerBiome.class, biomeGenLayer, "field_151621_d");
    BiomeGenBase[] chillyBiomes = ReflectionManipulateValues.getValue(GenLayerBiome.class, biomeGenLayer, "field_151622_e");
    BiomeGenBase[] coldBiomes = ReflectionManipulateValues.getValue(GenLayerBiome.class, biomeGenLayer, "field_151620_f");

    for (int i = 0; i == hotBiomes.length; i++)
    {
        hotBiomes[hotBiomes.length] = newHotBiomes.get(i);
    }

    for (int i = 0; i == temperateBiomes.length; i++)
    {
        temperateBiomes[temperateBiomes.length] = newTemperateBiomes.get(i);
    }

    for (int i = 0; i == chillyBiomes.length; i++)
    {
        chillyBiomes[chillyBiomes.length] = newChillyBiomes.get(i);
    }

    for (int i = 0; i == coldBiomes.length; i++)
    {
        coldBiomes[coldBiomes.length] = newColdBiomes.get(i);
    }

    ReflectionManipulateValues.setValue(GenLayerBiome.class, biomeGenLayer, "field_151620_f", coldBiomes);
    ReflectionManipulateValues.setValue(GenLayerBiome.class, biomeGenLayer, "field_151622_e", chillyBiomes);
    ReflectionManipulateValues.setValue(GenLayerBiome.class, biomeGenLayer, "field_151621_d", temperateBiomes);
    ReflectionManipulateValues.setValue(GenLayerBiome.class, biomeGenLayer, "field_151623_c", hotBiomes);
}
项目:McWorldGenLoop    文件:GenLayerTileableUtil.java   
public static GenLayer getTileableLayer(GenLayer layer) {
    Class<?> cl = layer.getClass();

    if (cl == GenLayerVoronoiZoom.class) {
        return new VoronoiZoomTileable((GenLayerVoronoiZoom) layer);
    }
    if (cl == GenLayerRiverMix.class) {
        return new RiverMixTileable((GenLayerRiverMix) layer);
    }
    if (cl == GenLayerSmooth.class) {
        return new SmoothTileable((GenLayerSmooth) layer);
    }
    if (cl == GenLayerZoom.class) {
        return new ZoomTileable((GenLayerZoom) layer);
    }
    if (cl == GenLayerShore.class) {
        return new ShoreTileable((GenLayerShore) layer);
    }
    if (cl == GenLayerAddIsland.class) {
        return new AddForestIslandTileable((GenLayerAddIsland) layer);
    }
    if (cl == GenLayerRareBiome.class) {
        return new MutatedPlainsTileable((GenLayerRareBiome) layer);
    }
    if (cl == GenLayerHills.class) {
        return new HillsAndMutatedTileable((GenLayerHills) layer);
    }
    if (cl == GenLayerBiomeEdge.class) {
        return new BiomeEdgeTileable((GenLayerBiomeEdge) layer);
    }
    if (cl == GenLayerBiome.class) {
        return new BiomeTileable((GenLayerBiome) layer);
    }
    if (cl == GenLayerDeepOcean.class) {
        return new DeepOceanTileable((GenLayerDeepOcean) layer);
    }
    if (cl == GenLayerAddMushroomIsland.class) {
        return new AddMushroomIslandTileable((GenLayerAddMushroomIsland) layer);
    }
    if (cl == GenLayerEdge.class) {
        return new EdgeTemperaturesTileable((GenLayerEdge) layer);
    }
    if (cl == GenLayerAddSnow.class) {
        return new AddSnowTileable((GenLayerAddSnow) layer);
    }
    if (cl == GenLayerRemoveTooMuchOcean.class) {
        return new RemoveTooMuchOceanTileable((GenLayerRemoveTooMuchOcean) layer);
    }
    if (cl == GenLayerFuzzyZoom.class) {
        return new FuzzyZoomTileable((GenLayerFuzzyZoom) layer);
    }
    if (cl == GenLayerIsland.class) {
        return new PlainsIslandTileable((GenLayerIsland) layer);
    }
    if (cl == GenLayerRiverInit.class) {
        return new RiverInitTileable((GenLayerRiverInit) layer);
    }
    if (cl == GenLayerRiver.class) {
        return new RiverTileable((GenLayerRiver) layer);
    }
    throw new UnknownGenLayerException(layer);
}