Skip to content

Commit

Permalink
fixed some bugs to prep for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Sep 13, 2013
1 parent 8e41fb6 commit afe2d86
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/tconstruct/TConstruct.java
Expand Up @@ -139,6 +139,9 @@ public void init(FMLInitializationEvent event)
}

content.intermodCommunication();
Tforest.initProps(PHConstruct.cfglocation);
BOP.initProps(PHConstruct.cfglocation);
dimblacklist.getbaddimensions();
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TContent.slimePool.blockID, 0));
}

Expand All @@ -151,10 +154,7 @@ public void postInit(FMLPostInitializationEvent evt)
TContent.modRecipes();
content.createEntities();
content.modRecipes();
Tforest.initProps(PHConstruct.cfglocation);
BOP.initProps(PHConstruct.cfglocation);
dimblacklist.getbaddimensions();
}
}

public static LiquidCasting getTableCasting()
{
Expand Down
3 changes: 2 additions & 1 deletion src/tconstruct/compat/BOP.java
Expand Up @@ -25,7 +25,8 @@ public static void initProps (File location)
/* Load the configuration file */
config.load();

pldimid = config.get("dimension settings", "Promised Land Dimension ID", true).getInt();
pldimid = config.get("dimension settings", "Promised Land Dimension ID", -200).getInt();
System.out.println("[TConstruct]PL Dim ID: " + pldimid);
}
else {
pldimid = -100;
Expand Down
3 changes: 2 additions & 1 deletion src/tconstruct/compat/Tforest.java
Expand Up @@ -25,7 +25,8 @@ public static void initProps (File location)
/* Load the configuration file */
config.load();

tfdimid = config.get("Dimension", "DimensionID", true).getInt();
tfdimid = config.get("dimension", "dimensionID", -100).getInt();
System.out.println("[TConstruct]TF Dim ID: " + tfdimid);
}
else {
tfdimid = -100;
Expand Down
8 changes: 5 additions & 3 deletions src/tconstruct/compat/dimensions/dimblacklist.java
Expand Up @@ -32,16 +32,18 @@ public static boolean isDimInBlacklist(int dim){
for (int len = 0;len< blacklist.size(); len++){
if (blacklist.get(len) == dim)
return false;
//System.out.println("[TConstruct]diminblist +" + blacklist.get(len));
}
return true;

}
public static boolean isDimPoolOnly(int dim){
public static boolean isDimNoPool(int dim){
for (int len = 0;len< nopool.size(); len++){
if (nopool.get(len) == dim)
return false;
//System.out.println("[TConstruct]DimNoPool "+ nopool.get(len));
return true;
}
return true;
return false;

}
}
6 changes: 3 additions & 3 deletions src/tconstruct/worldgen/SlimeIslandGen.java
Expand Up @@ -133,8 +133,9 @@ public void generateIsland (World world, Random rand, int xChunk, int zChunk)
}

//Decorate
if(!dimblacklist.isDimNoPool(world.provider.dimensionId)){
generateSlimePool(world, rand, xChunk + xRange / 2, yCenter + initialHeight, zChunk + zRange / 2);

}
PlantGen tallGrass = new PlantGen(TContent.slimeTallGrass.blockID, 0, 128, xRange, 1, zRange, false);
tallGrass.generate(world, rand, xChunk, yCenter + initialHeight + 1, zChunk);
for (int i = 0; i < 3; i++)
Expand All @@ -145,9 +146,8 @@ public void generateIsland (World world, Random rand, int xChunk, int zChunk)

public void generateSlimePool (World world, Random rand, int x, int y, int z)
{
if(dimblacklist.isDimPoolOnly(world.provider.dimensionId)){
this.generate(world, rand, x, y, z);
}

}

public boolean generate (World world, Random rand, int x, int y, int z) //WorldGenerator version
Expand Down

0 comments on commit afe2d86

Please sign in to comment.