Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/1.7.10-dev' into 1.…
Browse files Browse the repository at this point in the history
…7.10-master
  • Loading branch information
whichonespink44 committed Jul 2, 2017
2 parents 6a282ac + 418d73e commit b2394cc
Show file tree
Hide file tree
Showing 14 changed files with 547 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
mod_id=RTG
mod_name=Realistic Terrain Generation
mod_desc=Adds a new world type which generates realistic terrain for Overworld biomes.
mod_version=1.1.1.5
mod_version=1.1.1.6
mc_version=1.7.10
mod_url=https://github.com/Team-RTG/Realistic-Terrain-Generation
mod_author="Team RTG"
Expand All @@ -28,6 +28,7 @@ mod_deps=after:abyssalcraft@[1.9.1.2,);\
after:hot_water;\
after:ICMod@[1.5.0,);\
after:InTheDarkness;\
after:kegare.sugiforest;\
after:lom@[1.7.10-3.2.0,);\
after:Mariculture@[1.7.10-1.2.4.2a-5,);\
after:mod_ebm;\
Expand Down
102 changes: 102 additions & 0 deletions etc/config/RTG/biomes/sugiforest.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Configuration file

biome {

sugiforest {

sugiforest {
# [default: true]
B:"Allow Villages"=true

# [default: false]
B:"Allow Volcanoes"=false

# This setting controls the size of caves.
# HIGHER values = BIGGER caves & MORE lag. (14 = vanilla cave density)
# Set to -1 to use global setting. Set to 0 to disable caves for this biome.
# [range: -1 ~ 40, default: -1]
I:"Cave Density"=-1

# This setting controls the number of caves that generate.
# LOWER values = MORE caves & MORE lag. (6 = vanilla cave frequency)
# Set to -1 to use global setting. Set to 0 to disable caves for this biome.
# [range: -1 ~ 40, default: -1]
I:"Cave Frequency"=-1

# [default: true]
B:"RTG Decoration: Logs"=true

# Cliff blocks are the blocks that are used on the cliffs of mountains (usually a blend of stone & cobblestone).
# If you want to change this biome's cliff cobble block, enter a valid block ID here (e.g. minecraft:cobblestone).
# For more info, visit http://minecraft.gamepedia.com/Data_values#Block_IDs [default: ]
S:"RTG Surface: Cliff Cobble Block"=

# If you're using a custom cliff cobble block, enter its numeric data value here.
# For example, if you want to use red wool for this biome's cliff cobble block, you would enter minecraft:wool for the Cliff Cobble Block ID,
# and you would enter 6 here, because red wool has a data value of 6. (For most blocks, this value will be 0.)
# For more info, visit http://minecraft.gamepedia.com/Data_values [default: ]
S:"RTG Surface: Cliff Cobble Block Meta"=

# Cliff blocks are the blocks that are used on the cliffs of mountains (usually a blend of stone & cobblestone).
# If you want to change this biome's cliff stone block, enter a valid block ID here (e.g. minecraft:stone).
# For more info, visit http://minecraft.gamepedia.com/Data_values#Block_IDs [default: ]
S:"RTG Surface: Cliff Stone Block"=

# If you're using a custom cliff stone block, enter its numeric data value here.
# For example, if you want to use red wool for this biome's cliff stone block, you would enter minecraft:wool for the Cliff Stone Block ID,
# and you would enter 6 here, because red wool has a data value of 6. (For most blocks, this value will be 0.)
# For more info, visit http://minecraft.gamepedia.com/Data_values [default: ]
S:"RTG Surface: Cliff Stone Block Meta"=

# If you want to change this biome's filler block (the block underneath the top block), enter a valid block ID here (e.g. minecraft:dirt).
# For more info, visit http://minecraft.gamepedia.com/Data_values#Block_IDs [default: ]
S:"RTG Surface: Filler Block"=

# If you're using a custom filler block, enter its numeric data value here.
# For example, if you want to use red wool for this biome's filler block, you would enter minecraft:wool for the Filler Block ID,
# and you would enter 6 here, because red wool has a data value of 6. (For most blocks, this value will be 0.)
# For more info, visit http://minecraft.gamepedia.com/Data_values [default: ]
S:"RTG Surface: Filler Block Meta"=

# [default: ]
S:"RTG Surface: Mix Block"=

# [default: ]
S:"RTG Surface: Mix Block Meta"=

# If you want to change this biome's top block, enter a valid block ID here (e.g. minecraft:grass).
# For more info, visit http://minecraft.gamepedia.com/Data_values#Block_IDs [default: ]
S:"RTG Surface: Top Block"=

# If you're using a custom top block, enter its numeric data value here.
# For example, if you want to use red wool for this biome's top block, you would enter minecraft:wool for the Top Block ID,
# and you would enter 6 here, because red wool has a data value of 6. (For most blocks, this value will be 0.)
# For more info, visit http://minecraft.gamepedia.com/Data_values [default: ]
S:"RTG Surface: Top Block Meta"=

# This setting controls the number of ravines that generate.
# LOWER values = MORE ravines & MORE lag. (50 = vanilla ravine frequency)
# Set to -1 to use global setting. Set to 0 to disable ravines for this biome.
# [range: -1 ~ 100, default: -1]
I:"Ravine Frequency"=-1

# If FALSE, no RTG decorations will generate in this biome. Instead, only vanilla decorations will generate.
# RTG decorations include custom trees, shrubs, boulders, etc. [default: true]
B:"Use RTG Decorations"=true

# If FALSE, no RTG surfaces will be used in this biome. Instead, only vanilla surfaces will be used.
# RTG surfaces include custom top & filler blocks, and 'mix' blocks like podzol in Forests. [default: true]
B:"Use RTG Surfaces"=true

# 1/x chance that a volcano will generate if this biome has volcanoes enabled.
# 1 = Always generate if possible; 2 = 50% chance; 4 = 25% chance
# Set to -1 to use global setting. Set to 0 to disable volcanoes for this biome.
# [range: -1 ~ 2147483647, default: -1]
I:"Volcano Chance"=-1
}

}

}


2 changes: 2 additions & 0 deletions src/main/java/rtg/RTG.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import rtg.world.biome.realistic.itd.RealisticBiomeITDBase;
import rtg.world.biome.realistic.lotsomobs.RealisticBiomeLOMBase;
import rtg.world.biome.realistic.ridiculousworld.RealisticBiomeRWBase;
import rtg.world.biome.realistic.sugiforest.RealisticBiomeSFBase;
import rtg.world.biome.realistic.thaumcraft.RealisticBiomeTCBase;
import rtg.world.biome.realistic.tofucraft.RealisticBiomeTOFUBase;
import rtg.world.biome.realistic.vampirism.RealisticBiomeVAMPBase;
Expand Down Expand Up @@ -127,6 +128,7 @@ public void postInit(FMLPostInitializationEvent event)
RealisticBiomeITDBase.addBiomes();
RealisticBiomeFCBase.addBiomes();
RealisticBiomeHWMBase.addBiomes();
RealisticBiomeSFBase.addBiomes();

RealisticBiomePresenceTester.doBiomeCheck();
}
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/rtg/api/biome/sugiforest/config/BiomeConfigSF.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package rtg.api.biome.sugiforest.config;

import rtg.api.biome.BiomeConfig;


public class BiomeConfigSF
{
public static BiomeConfig biomeConfigSFSugiForest;

public static BiomeConfig[] getBiomeConfigs()
{
BiomeConfig[] biomeConfigs = new BiomeConfig[]{
biomeConfigSFSugiForest
};

return biomeConfigs;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package rtg.api.biome.sugiforest.config;

import rtg.api.biome.BiomeConfig;

public class BiomeConfigSFBase extends BiomeConfig
{

public BiomeConfigSFBase(String biomeSlug)
{
super("sugiforest", biomeSlug);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package rtg.api.biome.sugiforest.config;


import rtg.api.biome.BiomeConfigProperty;

public class BiomeConfigSFSugiForest extends BiomeConfigSFBase
{
public static final String decorationLogsId = "decorationLogs";
public static final String decorationLogsName = "RTG Decoration: Logs";

public static final String surfaceMixBlockId = "surfaceMixBlock";
public static final String surfaceMixBlockName = "RTG Surface: Mix Block";

public static final String surfaceMixBlockMetaId = "surfaceMixBlockMeta";
public static final String surfaceMixBlockMetaName = "RTG Surface: Mix Block Meta";

public BiomeConfigSFSugiForest()
{
super("sugiforest");

this.addProperty(new BiomeConfigProperty(decorationLogsId, BiomeConfigProperty.Type.BOOLEAN, decorationLogsName, "", true));

this.addProperty(new BiomeConfigProperty(surfaceMixBlockId, BiomeConfigProperty.Type.STRING, surfaceMixBlockName, "", ""));
this.addProperty(new BiomeConfigProperty(surfaceMixBlockMetaId, BiomeConfigProperty.Type.STRING, surfaceMixBlockMetaName, "", ""));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BiomeConfigVanillaForest extends BiomeConfigVanillaBase
public static final String surfaceMixBlockName = "RTG Surface: Mix Block";

public static final String surfaceMixBlockMetaId = "surfaceMixBlockMeta";
public static final String surfaceMixBlockMetaName = "RTG Surface: Mix Block Meta";
public static final String surfaceMixBlockMetaName = "RTG Surface: Mix Block Meta";

public BiomeConfigVanillaForest()
{
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/rtg/config/BiomeConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import rtg.api.biome.lotsomobs.config.BiomeConfigLOMAntartica;
import rtg.api.biome.lotsomobs.config.BiomeConfigLOMTropicalBeach;
import rtg.api.biome.ridiculousworld.config.*;
import rtg.api.biome.sugiforest.config.BiomeConfigSF;
import rtg.api.biome.sugiforest.config.BiomeConfigSFSugiForest;
import rtg.api.biome.thaumcraft.config.BiomeConfigTC;
import rtg.api.biome.thaumcraft.config.BiomeConfigTCEerie;
import rtg.api.biome.thaumcraft.config.BiomeConfigTCMagicalForest;
Expand Down Expand Up @@ -71,6 +73,7 @@ public static void initBiomeConfigs()
initBiomeConfigsIDT();
initBiomeConfigsITD();
initBiomeConfigsRW();
initBiomeConfigsSF();
initBiomeConfigsTC();
initBiomeConfigsVAMP();
initBiomeConfigsLOM();
Expand Down Expand Up @@ -437,6 +440,11 @@ public static void initBiomeConfigsRW()
BiomeConfigRW.biomeConfigRWSpookyForest = new BiomeConfigRWSpookyForest();
}

public static void initBiomeConfigsSF()
{
BiomeConfigSF.biomeConfigSFSugiForest = new BiomeConfigSFSugiForest();
}

public static void initBiomeConfigsTC()
{
BiomeConfigTC.biomeConfigTCEerie = new BiomeConfigTCEerie();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/rtg/config/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import rtg.config.itd.ConfigITD;
import rtg.config.ridiculousworld.ConfigRW;
import rtg.config.rtg.ConfigRTG;
import rtg.config.sugiforest.ConfigSF;
import rtg.config.thaumcraft.ConfigTC;
import rtg.config.tofucraft.ConfigTOFU;
import rtg.config.vampirism.ConfigVAMP;
Expand Down Expand Up @@ -52,6 +53,7 @@ public class ConfigManager
public static File idtConfigFile;
public static File itdConfigFile;
public static File fcConfigFile;
public static File sfConfigFile;

private ConfigRTG configRTG = new ConfigRTG();
public ConfigRTG rtg() {
Expand Down Expand Up @@ -84,6 +86,7 @@ public static void init(String configpath)
idtConfigFile = new File(configpath + "biomes/industrialtechnologies.cfg");
itdConfigFile = new File(configpath + "biomes/inthedarkness.cfg");
fcConfigFile = new File(configpath + "biomes/flowercraft.cfg");
sfConfigFile = new File(configpath + "biomes/sugiforest.cfg");

ConfigRTG.init(rtgConfigFile);

Expand All @@ -110,5 +113,6 @@ public static void init(String configpath)
ConfigIDT.init(idtConfigFile);
ConfigITD.init(itdConfigFile);
ConfigFC.init(fcConfigFile);
ConfigSF.init(sfConfigFile);
}
}
38 changes: 38 additions & 0 deletions src/main/java/rtg/config/sugiforest/ConfigSF.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package rtg.config.sugiforest;

import java.io.File;

import net.minecraftforge.common.config.Configuration;

import rtg.api.biome.sugiforest.config.BiomeConfigSF;
import rtg.config.BiomeConfigManager;
import rtg.util.Logger;

public class ConfigSF
{

public static Configuration config;

public static void init(File configFile)
{

config = new Configuration(configFile);

try
{
config.load();

BiomeConfigManager.setBiomeConfigsFromUserConfigs(BiomeConfigSF.getBiomeConfigs(), config);

} catch (Exception e)
{
Logger.error("RTG had a problem loading SugiForest configuration.");
} finally
{
if (config.hasChanged())
{
config.save();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package rtg.world.biome.realistic.sugiforest;

import net.minecraft.world.biome.BiomeGenBase;

import cpw.mods.fml.common.Loader;

import rtg.api.biome.BiomeConfig;
import rtg.api.biome.sugiforest.config.BiomeConfigSF;
import rtg.util.Logger;
import rtg.world.biome.realistic.RealisticBiomeBase;
import rtg.world.gen.surface.SurfaceBase;
import rtg.world.gen.terrain.TerrainBase;

public class RealisticBiomeSFBase extends RealisticBiomeBase
{
public static RealisticBiomeBase sfSugiForest;

public RealisticBiomeSFBase(BiomeConfig config, BiomeGenBase b, BiomeGenBase riverbiome, TerrainBase t, SurfaceBase s)
{

super(config, b, riverbiome, t, s);

this.waterSurfaceLakeChance = 0;
this.lavaSurfaceLakeChance = 0;
}

public static void addBiomes()
{

if (Loader.isModLoaded("kegare.sugiforest"))
{
BiomeGenBase[] b = BiomeGenBase.getBiomeGenArray();

for (int i = 0; i < 256; i++)
{
if (b[i] != null)
{
if (b[i].biomeName == null) {
Logger.warn("Biome ID %d has no name.", b[i].biomeID);
continue;
}

BiomeGenBase sfBiome = b[i];
String biomeName = b[i].biomeName;
String biomeClass = b[i].getBiomeClass().getName();

if (biomeName.equals("Sugi Forest") && biomeClass.equals("com.kegare.sugiforest.world.BiomeGenSugiForest")) {
sfSugiForest = new RealisticBiomeSFSugiForest(sfBiome, BiomeConfigSF.biomeConfigSFSugiForest);
}
}
}
}
}
}
Loading

0 comments on commit b2394cc

Please sign in to comment.