Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ChC support and make TC Magic Forest bigger #16

Merged
merged 27 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/rwg/config/ConfigRWG.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class ConfigRWG {
public static boolean generateVillages = true;
public static boolean generateUndergroundLakes = true;
public static boolean generateUndergroundLavaLakes = true;
public static boolean suptcbig = true;
KuroPeach marked this conversation as resolved.
Show resolved Hide resolved

public static void init(FMLPreInitializationEvent event) {
config = new Configuration(event.getSuggestedConfigurationFile());
Expand Down Expand Up @@ -59,6 +60,7 @@ public static void init(FMLPreInitializationEvent event) {
generateVillages = config.getBoolean("Generate Villages", "Settings", true, "");
generateUndergroundLakes = config.getBoolean("Generate Underground Lakes", "Settings", true, "");
generateUndergroundLavaLakes = config.getBoolean("Generate Underground Lava Lakes", "Settings", true, "");
suptcbig = config.getBoolean("Support TC Biome big", "Settings", true, "");
KuroPeach marked this conversation as resolved.
Show resolved Hide resolved

} catch (Exception e) {
for (int c = 0; c < biomeIDs.length; c++) {
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/rwg/support/Support.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import cpw.mods.fml.common.Loader;
import rwg.biomes.realistic.RealisticBiomeBase;
import rwg.config.ConfigRWG;

public class Support {

Expand Down Expand Up @@ -39,9 +40,18 @@ public static void init() {
SupportEBXL.init();
}

if (Loader.isModLoaded("Thaumcraft")) {
SupportTC.init();
if (ConfigRWG.suptcbig) {
if (Loader.isModLoaded("Thaumcraft")) {
SupportTC.init();
}
} else if (Loader.isModLoaded("Thaumcraft")) {
SupportTC1.init();
}

KuroPeach marked this conversation as resolved.
Show resolved Hide resolved
if (Loader.isModLoaded("ChromatiCraft")) {
SupportCC.init();
}
/** ChromatiCraft is non-supported content. if this ever errors out in some way feel free to remove this. */
}

public static void addBiome(RealisticBiomeSupport b, BiomeCategory cat) {
Expand Down
52 changes: 52 additions & 0 deletions src/main/java/rwg/support/SupportCC.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package rwg.support;

import net.minecraft.init.Blocks;
import net.minecraft.world.biome.BiomeGenBase;

import rwg.api.RWGBiomes;
import rwg.support.Support.BiomeCategory;
import rwg.surface.SurfaceGrassland;
import rwg.terrain.TerrainHighland;
import rwg.terrain.TerrainHilly;

public class SupportCC {
/*
* ChromatiCraft BIOMES 46: "Ender Forest" 47: "Rainbow Forest" 48: "Luminous Cliffs" 49: "Luminous Cliffs Edge"
*/

public static void init() {
BiomeGenBase[] b = BiomeGenBase.getBiomeGenArray();

for (int i = 0; i < 256; i++) {
if (b[i] != null) {
if (b[i].biomeName == "Ender Forest" || b[i].biomeName == "Rainbow Forest") {
Support.addBiome(
new RealisticBiomeSupport(
b[i],
RWGBiomes.baseTemperateForest,
new TerrainHighland(6f, 120f, 65f, 150f),
new SurfaceGrassland(
b[i].topBlock,
b[i].fillerBlock,
Blocks.stone,
Blocks.cobblestone)),
BiomeCategory.HOT);
}

if (b[i].biomeName == "Luminous Cliffs" || b[i].biomeName == "Luminous Cliffs Shores") {
Support.addBiome(
new RealisticBiomeSupport(
b[i],
RWGBiomes.baseOceanTemperate,
new TerrainHilly(100f, 120f, 0f),
new SurfaceGrassland(
b[i].topBlock,
b[i].fillerBlock,
Blocks.stone,
Blocks.cobblestone)),
BiomeCategory.HOT);
}
}
}
}
}
17 changes: 16 additions & 1 deletion src/main/java/rwg/support/SupportTC.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import rwg.api.RWGBiomes;
import rwg.support.Support.BiomeCategory;
import rwg.surface.SurfaceGrassland;
import rwg.terrain.TerrainHighland;
import rwg.terrain.TerrainSmallSupport;

public class SupportTC {
Expand All @@ -18,7 +19,7 @@ public static void init() {

for (int i = 0; i < 256; i++) {
if (b[i] != null) {
if (b[i].biomeName == "Tainted Land" || b[i].biomeName == "Magical Forest") {
if (b[i].biomeName == "Tainted Land") {
Support.addBiome(
new RealisticBiomeSupport(
b[i],
Expand All @@ -31,6 +32,20 @@ public static void init() {
Blocks.cobblestone)),
BiomeCategory.SMALL);
}

if (b[i].biomeName == "Magical Forest") {
Support.addBiome(
new RealisticBiomeSupport(
b[i],
RWGBiomes.baseTemperateForest,
new TerrainHighland(6f, 120f, 65f, 150f),
new SurfaceGrassland(
b[i].topBlock,
b[i].fillerBlock,
Blocks.stone,
Blocks.cobblestone)),
BiomeCategory.WET);
KuroPeach marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/rwg/support/SupportTC1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package rwg.support;
Dream-Master marked this conversation as resolved.
Show resolved Hide resolved

import net.minecraft.init.Blocks;
import net.minecraft.world.biome.BiomeGenBase;

import rwg.api.RWGBiomes;
import rwg.support.Support.BiomeCategory;
import rwg.surface.SurfaceGrassland;
import rwg.terrain.TerrainSmallSupport;

public class SupportTC1 {
/*
* THAUMCRAFT BIOMES 118: "Tainted Land" 119: "Magical Forest"
*/

public static void init() {
BiomeGenBase[] b = BiomeGenBase.getBiomeGenArray();

for (int i = 0; i < 256; i++) {
if (b[i] != null) {
if (b[i].biomeName == "Tainted Land" || b[i].biomeName == "Magical Forest") {
Support.addBiome(
new RealisticBiomeSupport(
b[i],
RWGBiomes.baseRiverTemperate,
new TerrainSmallSupport(),
new SurfaceGrassland(
b[i].topBlock,
b[i].fillerBlock,
Blocks.stone,
Blocks.cobblestone)),
BiomeCategory.SMALL);
}
}
}
}
}