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

项目:Geographicraft    文件:AbstractWorldGenerator.java   
public GenLayerRiverMix vanillaExpansion(long worldSeed, WorldType par2WorldType,
    GenLayer genlayer3,ClimateControlSettings settings){
    if (settings.oneSixCompatibility.value()) {
        return this.oneSixExpansion(worldSeed, par2WorldType, genlayer3, settings);
    } else {
        return this.oneSevenExpansion(worldSeed, par2WorldType, genlayer3, settings);
    }
}
项目:Geographicraft    文件:GenLayerRiverMixWrapper.java   
public void setRedirection(GenLayerRiverMix target) {
    if (locked()) {
        logger.info("already locked prior to "+target.toString());
        return;
    }
    logger.info("redirecting to "+target.toString());
    redirect = new LockableRiverMix(target);
    logger.info("redirected");
}
项目:Geographicraft    文件:GenLayerRiverMixWrapper.java   
public GenLayer forLocking() throws Unlockable {
    if (generator instanceof GenLayerLowlandRiverMix) {
        return ((GenLayerLowlandRiverMix)generator).forLocking();
    }
    if (generator instanceof GenLayerRiverMix) {
       return riverMixBiome.get((GenLayerRiverMix)generator);
    }
    try {

    } catch (java.lang.NoClassDefFoundError e){
    }
    throw new Unlockable();
}
项目:McWorldGenLoop    文件:RiverMixTileable.java   
public RiverMixTileable(GenLayerRiverMix original) {
    super(0, null, null);
    copyNonStaticFieldsByType(GenLayer.class, long.class, original, this);
    copyNonStaticFieldsByType(GenLayerRiverMix.class, GenLayer.class, original, this);

    List<Field> genLayers = ReflectionUtil.getFieldsByType(GenLayer.class, GenLayerRiverMix.class, false);
    assert genLayers.size() == layers.length;
    int i = 0;
    for (Field field : genLayers) {
        GenLayer layer = getValue(field, this, GenLayer.class);
        GenLayer newLayer = GenLayerTileableUtil.getTileableLayer(layer);
        setValue(field, this, newLayer);
        layers[i++] = (TileableGenLayer) newLayer;
    }
}
项目:Geographicraft    文件:OneSixCompatibleGenerator.java   
@Override
public GenLayerRiverMix fromSeed(long worldSeed, WorldType worldType) {
    return strictVanilla(worldSeed);
}
项目:Geographicraft    文件:VanillaCompatibleGenerator.java   
@Override
public GenLayerRiverMix fromSeed(long worldSeed, WorldType worldType) {
    return likeVanilla(worldSeed,worldType);
}
项目:Geographicraft    文件:AbstractWorldGenerator.java   
public GenLayerRiverMix oneSixExpansion(long worldSeed, WorldType par2WorldType,
        GenLayer genlayeraddmushroomisland,ClimateControlSettings settings){


    byte b0 = settings().biomeSize.value().byteValue();

    GenLayer genlayer = GenLayerZoom.magnify(1000L, genlayeraddmushroomisland, 0);
    GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, genlayer);
    genlayer = GenLayerZoom.magnify(1000L, genlayerriverinit, b0 + 2);
    GenLayerRiver genlayerriver = new GenLayerRiver(1L, genlayer);
    GenLayerSmooth genlayersmooth = new GenLayerSmooth(1000L, genlayerriver);
    GenLayer genlayer1 = GenLayerZoom.magnify(1000L, genlayeraddmushroomisland, 0);
    GenLayer genlayerbiome = new GenLayerOneSixBiome(200L, genlayer1, WorldType.DEFAULT);
    genlayer1 = GenLayerZoom.magnify(1000L, genlayerbiome, 2);
    Object object = new GenLayerHillsOneSix(1000L, genlayer1);

    for (int j = 0; j < b0; ++j)
    {
        object = new GenLayerZoom((long)(1000 + j), (GenLayer)object);

        if (j == 0)
        {
            object = new GenLayerAddIsland(3L, (GenLayer)object);
        }

        if (j == 1)
        {
            object = new GenLayerShoreCC(1000L, (GenLayer)object,this.rules);
        }

        if (j == 1)
        {
            object = new GenLayerSwampRivers(1000L, (GenLayer)object);
        }
    }

    GenLayerSmooth genlayersmooth1 = new GenLayerSmooth(1000L, (GenLayer)object);
    GenLayerRiverMix genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth);
    GenLayerVoronoiZoom genlayervoronoizoom = new GenLayerVoronoiZoom(10L, genlayerrivermix);
    genlayerrivermix.initWorldGenSeed(worldSeed);
    genlayervoronoizoom.initWorldGenSeed(worldSeed);
    return genlayerrivermix;
}
项目:Geographicraft    文件:DimensionManager.java   
public void onBiomeGenInit(WorldTypeEvent.InitBiomeGens event) {
    // skip if ignoring

    ClimateControlSettings generationSettings = defaultSettings(true);
    // this only gets used for new worlds,
    //when WorldServer is initializing and there are no spawn chunks yet
    generationSettings.onNewWorld();
    if (this.ignore(event.getWorldType(),this.newSettings)){
        return;
    }
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
    if (server== null) {
        original = event.getOriginalBiomeGens()[0];
        riverLayerWrapper(0).setOriginal(event.getOriginalBiomeGens()[0]);
        riverLayerWrapper(0).useOriginal();
    }

    // get overworld dimension;
    boolean newWorld = true;
    for (WorldServer worldServer: server.worldServers){
        if (worldServer.getTotalWorldTime()>0 ) newWorld = false;
    }
    //logger.info(worldType.getTranslateName());
    //logger.info(event.originalBiomeGens[0].toString());
    // if not a recognized world type ignore
    //logBiomes();
    //this.activeRiverMix = (GenLayerRiverMix)(event.originalBiomeGens[0]);

    original = event.getOriginalBiomeGens()[0];
    riverLayerWrapper(0).setOriginal(event.getOriginalBiomeGens()[0]);

    if (generationSettings.noGenerationChanges.value()) {
        event.setNewBiomeGens(riverLayerWrapper(0).modifiedGenerators()) ;
        riverLayerWrapper(0).useOriginal();
        return;
    } else {
        // continue below
    }
    if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
        GenLayerRiverMix patched = patchedGenLayer(generationSettings, event.getWorldType(), event.getSeed());
        riverLayerWrapper(0).setRedirection(patched);
        event.setNewBiomeGens(riverLayerWrapper(0).modifiedGenerators());
        event.setResult(WorldTypeEvent.Result.ALLOW);
    } else {
        //riverLayerWrapper(0).useOriginal();
        //event.newBiomeGens = modifiedGenerators(event.seed);
    }
}
项目: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);
}
项目:Geographicraft    文件:AbstractWorldGenerator.java   
abstract GenLayerRiverMix fromSeed(long worldSeed, WorldType worldType);