Skip to content

Commit

Permalink
Merge pull request #864 from Team-RTG/1.7.10-dev
Browse files Browse the repository at this point in the history
Merge dev into master (1.7.10-1.1.0).
  • Loading branch information
whichonespink44 authored Jul 25, 2016
2 parents 66ef580 + 30fb38d commit 3f8375c
Show file tree
Hide file tree
Showing 35 changed files with 1,100 additions and 890 deletions.
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,13 @@ def parseprops(File cfg) {
return (new ConfigSlurper().parse(prop))
}
}

// run 'gradle -DEBUG [runClient|runServer]' for a debug session
allprojects {
tasks.withType(JavaExec) {
jvmArgs "-Xms2G", "-Xmx4G"
if (System.getProperty('EBUG', 'false') == 'true') {
jvmArgs '-agentlib:jdwp=transport=dt_socket,address=localhost:5005,server=y,suspend=y'
}
}
}
43 changes: 22 additions & 21 deletions 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.0.1
mod_version=1.1.0
mc_version=1.7.10
mod_url=https://github.com/Team-RTG/Realistic-Terrain-Generation
mod_author="Team RTG"
Expand All @@ -14,23 +14,24 @@ mcf_version=10.13.4.1558
run_dir=run
package_base=org.teamrtg
mod_deps=after:abyssalcraft@[1.9.1.2,);\
after:arsmagica2@[1.4.0.008,);\
after:ATG@[0.10.0,);\
after:BiomesOPlenty@[2.1.0,);\
after:BuildCraft|Core@[7.1.7,);\
after:enhancedbiomes@2.5 for MC 1.7.10;\
after:enviromine@[1.3.119,);\
after:ExtrabiomesXL@[3.16.2,);\
after:ForgottenNature@[1.6.11,);\
after:Growthcraft|Bamboo@[1.7.10-2.5.0,);\
after:Highlands@[2.2.3,);\
after:ICMod@[1.5.0,);\
after:lom@[1.7.10-3.2.0,);\
after:Mariculture@[1.7.10-1.2.4.2a-5,);\
after:mod_IDT;\
after:Railcraft@[9.7.0.0,);\
after:RidiculousWorld@[0.1,);\
after:sushicraft@[14.4,);\
after:Thaumcraft@[4.2.3.4,);\
after:TofuCraft@2.1.6-MC1.7.10;\
after:vampirism@[0.7.8.5,)
after:arsmagica2@[1.4.0.008,);\
after:ATG@[0.10.0,);\
after:BiomesOPlenty@[2.1.0,);\
after:BuildCraft|Core@[7.1.7,);\
after:enhancedbiomes@2.5 for MC 1.7.10;\
after:enviromine@[1.3.119,);\
after:ExtrabiomesXL@[3.16.2,);\
after:flowercraftmod@[1.9,);\
after:ForgottenNature@[1.6.11,);\
after:Growthcraft|Bamboo@[1.7.10-2.5.0,);\
after:Highlands@[2.2.3,);\
after:ICMod@[1.5.0,);\
after:lom@[1.7.10-3.2.0,);\
after:Mariculture@[1.7.10-1.2.4.2a-5,);\
after:mod_IDT;\
after:Railcraft@[9.7.0.0,);\
after:RidiculousWorld@[0.1,);\
after:sushicraft@[14.4,);\
after:Thaumcraft@[4.2.3.4,);\
after:TofuCraft@2.1.6-MC1.7.10;\
after:vampirism@[0.7.8.5,)
61 changes: 61 additions & 0 deletions etc/config/RTG/biomes/flowercraft.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Configuration file

biome {

flowercraft {

phantasia {
# [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: ]
S:"RTG Surface: Filler Block"=

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

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

# [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

# [default: true]
B:"Use RTG Decorations"=true

# [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
}

}

}


55 changes: 35 additions & 20 deletions src/main/java/rtg/RTG.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

import java.util.ArrayList;

import net.minecraft.world.gen.structure.MapGenStructureIO;

import net.minecraftforge.common.MinecraftForge;

import rtg.api.event.BiomeConfigEvent;
import rtg.config.BiomeConfigManager;
import rtg.config.ConfigManager;
import rtg.event.EventManagerRTG;
import rtg.event.WorldTypeMessageEventHandler;
import rtg.reference.ModInfo;
import rtg.util.Logger;
import rtg.util.RealisticBiomePresenceTester;
import rtg.world.WorldTypeRTG;
import rtg.world.biome.realistic.abyssalcraft.RealisticBiomeACBase;
Expand All @@ -18,6 +23,7 @@
import rtg.world.biome.realistic.chromaticraft.RealisticBiomeCCBase;
import rtg.world.biome.realistic.enhancedbiomes.RealisticBiomeEBBase;
import rtg.world.biome.realistic.extrabiomes.RealisticBiomeEBXLBase;
import rtg.world.biome.realistic.flowercraft.RealisticBiomeFCBase;
import rtg.world.biome.realistic.forgottennature.RealisticBiomeFNBase;
import rtg.world.biome.realistic.growthcraft.RealisticBiomeGCBase;
import rtg.world.biome.realistic.highlands.RealisticBiomeHLBase;
Expand All @@ -29,14 +35,17 @@
import rtg.world.biome.realistic.tofucraft.RealisticBiomeTOFUBase;
import rtg.world.biome.realistic.vampirism.RealisticBiomeVAMPBase;
import rtg.world.biome.realistic.vanilla.RealisticBiomeVanillaBase;
import rtg.world.gen.structure.MapGenScatteredFeatureRTG;
import rtg.world.gen.structure.MapGenVillageRTG;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStoppedEvent;


//@Mod(modid = "RTG", name = "Realistic Terrain Generaton", version = "0.8.0d", dependencies = "required-after:Forge@[10.13.4.1448,)", acceptableRemoteVersions = "*")
@Mod(modid = ModInfo.MOD_ID, name = ModInfo.MOD_NAME, version = ModInfo.MOD_VERSION, dependencies = "required-after:Forge@[" + ModInfo.FORGE_DEP + ",)" + ModInfo.MOD_DEPS, acceptableRemoteVersions = "*")
public class RTG {
Expand All @@ -54,15 +63,18 @@ public ConfigManager configManager(int dimension) {
}

@EventHandler
public void fmlLifeCycleEvent(FMLPreInitializationEvent event)
public void preInit(FMLPreInitializationEvent event)
{
instance = this;

MapGenStructureIO.registerStructure(MapGenScatteredFeatureRTG.Start.class, "rtg_MapGenScatteredFeatureRTG");
MapGenStructureIO.registerStructure(MapGenVillageRTG.Start.class, "rtg_MapGenVillageRTG");

Logger.info("[FMLPreInitializationEvent] Creating RTG's EventManager");
eventMgr = new EventManagerRTG();
MinecraftForge.EVENT_BUS.register(eventMgr);
MinecraftForge.ORE_GEN_BUS.register(eventMgr);
MinecraftForge.TERRAIN_GEN_BUS.register(eventMgr);


MinecraftForge.EVENT_BUS.register(WorldTypeMessageEventHandler.instance);

MinecraftForge.EVENT_BUS.post(new BiomeConfigEvent.Pre());

// This MUST get called before the config is initialised.
Expand All @@ -76,14 +88,10 @@ public void fmlLifeCycleEvent(FMLPreInitializationEvent event)
worldtype = new WorldTypeRTG("RTG");
}

@EventHandler
public void fmlLifeCycleEvent(FMLInitializationEvent event)
{
// @EventHandler public void init(FMLInitializationEvent event) {}

}

@EventHandler
public void fmlLifeCycle(FMLPostInitializationEvent event)
public void postInit(FMLPostInitializationEvent event)
{

RealisticBiomeVanillaBase.addBiomes();
Expand All @@ -106,22 +114,23 @@ public void fmlLifeCycle(FMLPostInitializationEvent event)
RealisticBiomeFNBase.addBiomes();
RealisticBiomeICBase.addBiomes();
RealisticBiomeIDTBase.addBiomes();
RealisticBiomeFCBase.addBiomes();

RealisticBiomePresenceTester.doBiomeCheck();
}

/* FIXME: Why are we subscribing to events we don't do anything with? -srs_bsns
/*
@EventHandler
public void fmlLifeCycle(FMLServerAboutToStartEvent event) {}
public void serverAboutToStart(FMLServerAboutToStartEvent event) {}
@EventHandler
public void fmlLifeCycle(FMLServerStartingEvent event) {}
public void serverStarting(FMLServerStartingEvent event) {}
@EventHandler
public void fmlLifeCycle(FMLServerStartedEvent event) {}
public void serverStarted(FMLServerStartedEvent event) {}
@EventHandler
public void fmlLifeCycle(FMLServerStoppingEvent event) {}
public void serverStopping(FMLServerStoppingEvent event) {}
*/


Expand All @@ -133,10 +142,10 @@ public void runOnNextServerCloseOnly(Runnable action) {
serverCloseActions.add(action);
}

private ArrayList<Runnable> oneShotServerCloseActions = new ArrayList<Runnable>();
private ArrayList<Runnable> serverCloseActions = new ArrayList<Runnable>();
private ArrayList<Runnable> oneShotServerCloseActions = new ArrayList<>();
private ArrayList<Runnable> serverCloseActions = new ArrayList<>();
@EventHandler
public void fmlLifeCycle(FMLServerStoppedEvent event)
public void serverStopped(FMLServerStoppedEvent event)
{
for (Runnable action: serverCloseActions) {
action.run();
Expand All @@ -146,5 +155,11 @@ public void fmlLifeCycle(FMLServerStoppedEvent event)
}
oneShotServerCloseActions.clear();

if (eventMgr.isRegistered()) {
Logger.info("Unregistering RTG's Terrain Event Handlers...");
RTG.eventMgr.unRegisterEventHandlers();
if (!eventMgr.isRegistered()) Logger.info("RTG's Terrain Event Handlers have been unregistered successfully.");
}

}
}
17 changes: 17 additions & 0 deletions src/main/java/rtg/api/biome/flowercraft/config/BiomeConfigFC.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package rtg.api.biome.flowercraft.config;

import rtg.api.biome.BiomeConfig;

public class BiomeConfigFC {

public static BiomeConfig biomeConfigFCPhantasia;

public static BiomeConfig[] getBiomeConfigs() {

BiomeConfig[] biomeConfigs = new BiomeConfig[]{
biomeConfigFCPhantasia
};

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

import rtg.api.biome.BiomeConfig;

public class BiomeConfigFCBase extends BiomeConfig {

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


public class BiomeConfigFCPhantasia extends BiomeConfigFCBase {
public BiomeConfigFCPhantasia() {
super("phantasia");
}
}
Loading

0 comments on commit 3f8375c

Please sign in to comment.