diff options
| author | Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> | 2023-01-23 16:23:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-23 16:23:02 +0000 |
| commit | dce9e27a012290d5d06eb081aaf0b711076b3297 (patch) | |
| tree | dd2c9552f725045bab7f0f674ab2b1b08a985784 /src/main | |
| parent | 6b3d66f0d27eaeb2a8e9d6aa9f291ede934dd08b (diff) | |
| download | GT5-Unofficial-dce9e27a012290d5d06eb081aaf0b711076b3297.tar.gz GT5-Unofficial-dce9e27a012290d5d06eb081aaf0b711076b3297.tar.bz2 GT5-Unofficial-dce9e27a012290d5d06eb081aaf0b711076b3297.zip | |
Remove Australia dimension and associated world gen, mobs etc. (#516)
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Diffstat (limited to 'src/main')
61 files changed, 19 insertions, 11594 deletions
diff --git a/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java b/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java deleted file mode 100644 index 16b54138e2..0000000000 --- a/src/main/java/gtPlusPlus/australia/GTplusplus_Australia.java +++ /dev/null @@ -1,159 +0,0 @@ -package gtPlusPlus.australia; - -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -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.FMLServerStartingEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.biome.type.Biome_AustralianDesert_Ex; -import gtPlusPlus.australia.biome.type.Biome_AustralianForest; -import gtPlusPlus.australia.biome.type.Biome_AustralianOcean; -import gtPlusPlus.australia.biome.type.Biome_AustralianOutback; -import gtPlusPlus.australia.biome.type.Biome_AustralianPlains; -import gtPlusPlus.australia.block.AustraliaContentLoader; -import gtPlusPlus.australia.dimension.Dimension_Australia; -import gtPlusPlus.australia.gen.gt.WorldGen_Australia_Ores; -import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia_Base; -import gtPlusPlus.australia.gen.map.structure.StructureManager; -import gtPlusPlus.australia.world.AustraliaWorldGenerator; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.Australia; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.config.Configuration; - -@MCVersion(value = "1.7.10") -@Mod( - modid = Australia.MODID, - name = Australia.NAME, - version = Australia.VERSION, - dependencies = - "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") -public class GTplusplus_Australia implements ActionListener { - - // Mod Instance - @Mod.Instance(Australia.MODID) - public static GTplusplus_Australia instance; - - public static GTPP_Config sCustomWorldgenFile = null; - - // Dark World Handler - // protected static volatile Biome_AustralianDesert Australian_Desert_Biome_1; - // protected static volatile Biome_AustralianDesert2 Australian_Desert_Biome_2; - - public static volatile Biome_AustralianDesert_Ex Australian_Desert_Biome_3; - public static volatile Biome_AustralianForest Australian_Forest_Biome; - public static volatile Biome_AustralianOcean Australian_Ocean_Biome; - public static volatile Biome_AustralianOutback Australian_Outback_Biome; - public static volatile Biome_AustralianPlains Australian_Plains_Biome; - - public static volatile Dimension_Australia Australia_Dimension; - public static AustraliaWorldGenerator Australia_World_Generator; - public static int globalAustraliaPortalSpawnTimer = 0; - - // Pre-Init - @Mod.EventHandler - public void preInit(final FMLPreInitializationEvent event) { - Logger.INFO("Loading " + Australia.MODID + " V" + Australia.VERSION); - - // Setup - setVars(event); - - Australia_Dimension = new Dimension_Australia(); - Australia_Dimension.instance = instance; - - // Australian_Desert_Biome_1 = (new Biome_AustralianDesert()); - // Australian_Desert_Biome_2 = (new Biome_AustralianDesert2()); - // Australian_Desert_Biome_1.instance = instance; - // Australian_Desert_Biome_2.instance = instance; - // Australian_Desert_Biome_1.preInit(event); - // Australian_Desert_Biome_2.preInit(event); - - Australian_Desert_Biome_3 = (Biome_AustralianDesert_Ex.biome); - Australian_Forest_Biome = (Biome_AustralianForest.biome); - Australian_Ocean_Biome = (Biome_AustralianOcean.biome); - Australian_Outback_Biome = (Biome_AustralianOutback.biome); - Australian_Plains_Biome = Biome_AustralianPlains.biome; - - // Load Villages - StructureManager.registerVillageComponents(); - - setupWorldGenerator(); - - // Load/Set Custom Ore Gen - sCustomWorldgenFile = new GTPP_Config(new Configuration( - new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); - } - - @EventHandler - public void load(final FMLInitializationEvent e) { - Logger.INFO("Begin resource allocation for " + Australia.MODID + " V" + Australia.VERSION); - - // Load World and Biome - GameRegistry.registerWorldGenerator(new WorldGen_GT_Australia_Base(), Short.MAX_VALUE); - - // Australian_Desert_Biome_1.load(); - // Australian_Desert_Biome_2.load(); - Australian_Desert_Biome_3.load(); - Australian_Forest_Biome.load(); - Australian_Ocean_Biome.load(); - Australian_Outback_Biome.load(); - Australian_Plains_Biome.load(); - - Australia_Dimension.load(); - } - - public static synchronized void GenerateOreMaterials() {} - - protected synchronized void setVars(FMLPreInitializationEvent event) { - - sCustomWorldgenFile = new GTPP_Config(new Configuration( - new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "Australia.cfg"))); - - if (DimensionManager.isDimensionRegistered(Dimension_Australia.DIMID)) { - Dimension_Australia.DIMID = DimensionManager.getNextFreeDimId(); - } - - /* - * Set World Generation Values - */ - WorldGen_Australia_Ores.generateValidOreVeins(); - WorldGen_GT_Australia_Base.oreveinPercentage = 16; - WorldGen_GT_Australia_Base.oreveinAttempts = 16; - WorldGen_GT_Australia_Base.oreveinMaxPlacementAttempts = 2; - if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV) { - WorldGen_GT_Australia_Base.debugWorldGen = true; - } - AustraliaContentLoader.run(); - } - - @EventHandler - public void serverLoad(FMLServerStartingEvent event) { - Australia_World_Generator.initiate(); - } - - @EventHandler - public static void postInit(final FMLPostInitializationEvent e) { - Logger.INFO("Finished loading Australia plugin for GT++."); - } - - @Override - public void actionPerformed(ActionEvent arg0) { - // TODO Auto-generated method stub - - } - - private void setupWorldGenerator() { - Logger.INFO("Registering World Generator for Australia."); - Australia_World_Generator = new AustraliaWorldGenerator(); - GameRegistry.registerWorldGenerator(Australia_World_Generator, 0); - } -} diff --git a/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java b/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java deleted file mode 100644 index ea6b50a478..0000000000 --- a/src/main/java/gtPlusPlus/australia/biome/CustomDecorator.java +++ /dev/null @@ -1,355 +0,0 @@ -package gtPlusPlus.australia.biome; - -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; -import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.australia.GTplusplus_Australia; -import gtPlusPlus.australia.gen.world.WorldGenAustralianOre; -import java.util.Random; -import net.minecraft.block.BlockFlower; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeDecorator; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenAbstractTree; -import net.minecraft.world.gen.feature.WorldGenBigMushroom; -import net.minecraft.world.gen.feature.WorldGenCactus; -import net.minecraft.world.gen.feature.WorldGenDeadBush; -import net.minecraft.world.gen.feature.WorldGenFlowers; -import net.minecraft.world.gen.feature.WorldGenLiquids; -import net.minecraft.world.gen.feature.WorldGenMinable; -import net.minecraft.world.gen.feature.WorldGenPumpkin; -import net.minecraft.world.gen.feature.WorldGenReed; -import net.minecraft.world.gen.feature.WorldGenSand; -import net.minecraft.world.gen.feature.WorldGenWaterlily; -import net.minecraft.world.gen.feature.WorldGenerator; -import net.minecraftforge.common.*; -import net.minecraftforge.event.terraingen.*; - -public class CustomDecorator extends BiomeDecorator { - - public CustomDecorator() { - this.sandGen = new WorldGenSand(Blocks.sand, 10); - this.gravelAsSandGen = new WorldGenSand(Blocks.gravel, 6); - this.dirtGen = new WorldGenMinable(Blocks.dirt, 16); - this.gravelGen = new WorldGenMinable(Blocks.gravel, 16); - - this.coalGen = new WorldGenAustralianOre(Blocks.coal_ore, 4); - this.ironGen = new WorldGenAustralianOre(Blocks.clay, 4); - this.goldGen = new WorldGenAustralianOre(Blocks.soul_sand, 20); - this.redstoneGen = new WorldGenAustralianOre(Blocks.bedrock, 8); - this.diamondGen = new WorldGenAustralianOre(Blocks.diamond_ore, 1); - this.lapisGen = new WorldGenAustralianOre(Blocks.lava, 16); - - this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); - this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); - this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); - this.bigMushroomGen = new WorldGenBigMushroom(); - this.reedGen = new WorldGenReed(); - this.cactusGen = new WorldGenCactus(); - this.waterlilyGen = new WorldGenWaterlily(); - this.flowersPerChunk = 2; - this.grassPerChunk = 1; - this.sandPerChunk = 1; - this.sandPerChunk2 = 3; - this.clayPerChunk = 2; - this.generateLakes = true; - } - - int mDecoratorTimeout = 0; - - public void decorateChunk(World aWorld, Random aRand, BiomeGenBase aGen, int aX, int aZ) { - if (this.currentWorld != null && this.chunk_X == aX && this.chunk_Z == aZ) { - try { - while (this.currentWorld != null) { - if (mDecoratorTimeout % 1000 == 0) { - Logger.WORLD("Waiting for chunk @ " + aX + ", " + aZ + " to generate. Waited " - + mDecoratorTimeout + "ms already."); - } - if (this.currentWorld == null) { - break; - } - if (mDecoratorTimeout >= 5000) { - throw new RuntimeException("Already decorating!!"); - } - mDecoratorTimeout++; - } - } catch (Throwable t) { - t.printStackTrace(); - throw new RuntimeException("Already decorating!!"); - } - } - if (this.currentWorld == null) { - this.currentWorld = aWorld; - this.randomGenerator = aRand; - this.chunk_X = aX; - this.chunk_Z = aZ; - this.genDecorations(aGen); - this.currentWorld = null; - this.randomGenerator = null; - } - } - - protected void genDecorations(BiomeGenBase p_150513_1_) { - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - this.generateOres(); - int i; - int j; - int k; - - boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); - for (i = 0; doGen && i < this.sandPerChunk2; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.sandGen.generate( - this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); - for (i = 0; doGen && i < this.clayPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.clayGen.generate( - this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); - for (i = 0; doGen && i < this.sandPerChunk; ++i) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.gravelAsSandGen.generate( - this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - i = this.treesPerChunk; - - if (this.randomGenerator.nextInt(10) == 0) { - ++i; - } - - int l; - int i1; - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); - for (j = 0; doGen && j < i; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) { - worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); - for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.bigMushroomGen.generate( - this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); - for (j = 0; doGen && j < this.flowersPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); - String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); - BlockFlower blockflower = BlockFlower.func_149857_e(s); - - if (blockflower.getMaterial() != Material.air) { - this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); - this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); - for (j = 0; doGen && j < this.grassPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); - worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); - for (j = 0; doGen && j < this.deadBushPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); - for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - - for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l); - --i1) { - ; - } - - this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); - for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) { - if (this.randomGenerator.nextInt(4) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - if (this.randomGenerator.nextInt(8) == 0) { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - if (doGen && this.randomGenerator.nextInt(4) == 0) { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } |
