-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/1.7.10-dev' into 1.…
…7.10-master
- Loading branch information
Showing
14 changed files
with
547 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/rtg/api/biome/sugiforest/config/BiomeConfigSF.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/rtg/api/biome/sugiforest/config/BiomeConfigSFBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/rtg/api/biome/sugiforest/config/BiomeConfigSFSugiForest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, "", "")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/rtg/world/biome/realistic/sugiforest/RealisticBiomeSFBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.