From 311ab89f93558233a40079f7cb16605b141b5346 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 12 Dec 2021 19:38:06 +0100 Subject: Move sources and resources --- .../everglades/GTplusplus_Everglades.java | 235 ---------- .../everglades/biome/BiomeGenerator_Custom.java | 351 -------------- .../everglades/biome/Biome_Everglades.java | 150 ------ .../everglades/biome/GenLayerBiomes.java | 31 -- .../everglades/biome/GenLayerEverglades.java | 32 -- .../everglades/block/BlockDarkWorldGround.java | 25 - .../block/BlockDarkWorldPollutedDirt.java | 74 --- .../block/BlockDarkWorldPortalFrame.java | 30 -- .../block/BlockDarkWorldSludgeFluid.java | 101 ---- .../everglades/block/BlockEvergladesPortal.java | 403 ---------------- .../everglades/block/DarkWorldContentLoader.java | 71 --- .../everglades/chunk/ChunkProviderModded.java | 510 -------------------- .../everglades/dimension/Dimension_Everglades.java | 30 -- .../everglades/gen/WorldGenDeadLilly.java | 28 -- .../everglades/gen/WorldGenMinable_Custom.java | 90 ---- .../gtPlusPlus/everglades/gen/gt/WorldGen_GT.java | 49 -- .../everglades/gen/gt/WorldGen_GT_Base.java | 471 ------------------- .../everglades/gen/gt/WorldGen_GT_Ore_Layer.java | 514 --------------------- .../everglades/gen/gt/WorldGen_Ores.java | 97 ---- .../everglades/item/ItemBlockToxicEverglades.java | 42 -- .../item/ItemEvergladesPortalTrigger.java | 101 ---- .../gtPlusPlus/everglades/object/BoxedQuad.java | 56 --- .../everglades/world/CustomWorldType.java | 59 --- .../everglades/world/EvergladesPortalPosition.java | 14 - .../everglades/world/TeleporterDimensionMod.java | 471 ------------------- .../everglades/world/WorldChunkManagerCustom.java | 263 ----------- .../everglades/world/WorldProviderMod.java | 71 --- 27 files changed, 4369 deletions(-) delete mode 100644 src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java delete mode 100644 src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java delete mode 100644 src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java delete mode 100644 src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java delete mode 100644 src/Java/gtPlusPlus/everglades/dimension/Dimension_Everglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/WorldGenMinable_Custom.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Base.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_GT_Ore_Layer.java delete mode 100644 src/Java/gtPlusPlus/everglades/gen/gt/WorldGen_Ores.java delete mode 100644 src/Java/gtPlusPlus/everglades/item/ItemBlockToxicEverglades.java delete mode 100644 src/Java/gtPlusPlus/everglades/item/ItemEvergladesPortalTrigger.java delete mode 100644 src/Java/gtPlusPlus/everglades/object/BoxedQuad.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/CustomWorldType.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/EvergladesPortalPosition.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/TeleporterDimensionMod.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/WorldChunkManagerCustom.java delete mode 100644 src/Java/gtPlusPlus/everglades/world/WorldProviderMod.java (limited to 'src/Java/gtPlusPlus/everglades') diff --git a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java b/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java deleted file mode 100644 index 0709f0b1ff..0000000000 --- a/src/Java/gtPlusPlus/everglades/GTplusplus_Everglades.java +++ /dev/null @@ -1,235 +0,0 @@ -package gtPlusPlus.everglades; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.File; - -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.core.lib.CORE; -import gtPlusPlus.core.lib.CORE.Everglades; -import gtPlusPlus.core.lib.LoadedMods; -import gtPlusPlus.core.material.ELEMENT; -import gtPlusPlus.core.material.MaterialGenerator; -import gtPlusPlus.core.material.ORES; -import gtPlusPlus.everglades.biome.Biome_Everglades; -import gtPlusPlus.everglades.block.DarkWorldContentLoader; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.everglades.gen.gt.WorldGen_GT_Base; -import gtPlusPlus.everglades.gen.gt.WorldGen_Ores; -import gtPlusPlus.preloader.CORE_Preloader; -import gtPlusPlus.xmod.gregtech.HANDLER_GT; -import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.config.Configuration; - -@MCVersion(value = "1.7.10") -@Mod(modid = Everglades.MODID, name = Everglades.NAME, version = Everglades.VERSION, dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") -public class GTplusplus_Everglades implements ActionListener { - - //Mod Instance - @Mod.Instance(Everglades.MODID) - public static GTplusplus_Everglades instance; - - // Dark World Handler - protected static volatile Biome_Everglades Everglades_Biome; - protected static volatile Dimension_Everglades Everglades_Dimension; - public static int globalEvergladesPortalSpawnTimer = 0; - - // Pre-Init - @Mod.EventHandler - public void preInit(final FMLPreInitializationEvent event) { - Logger.INFO("Loading " + Everglades.MODID + " V" + Everglades.VERSION); - - //Setup - setVars(event); - - setEvergladesBiome(new Biome_Everglades()); - Everglades_Dimension = new Dimension_Everglades(); - - // Load Dark World - getEvergladesBiome().instance = instance; - Everglades_Dimension.instance = instance; - getEvergladesBiome().preInit(event); - - //Load/Set Custom Ore Gen - HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); - - } - - @EventHandler - public void load(final FMLInitializationEvent e) { - Logger.INFO("Begin resource allocation for " + Everglades.MODID + " V" +Everglades.VERSION); - - //Load World and Biome - GameRegistry.registerWorldGenerator(new WorldGen_GT_Base(), Short.MAX_VALUE); - getEvergladesBiome().load(); - Everglades_Dimension.load(); - - } - - public static synchronized void GenerateOreMaterials() { - MaterialGenerator.generateOreMaterial(ORES.CROCROITE); - MaterialGenerator.generateOreMaterial(ORES.GEIKIELITE); - MaterialGenerator.generateOreMaterial(ORES.NICHROMITE); - MaterialGenerator.generateOreMaterial(ORES.TITANITE); - MaterialGenerator.generateOreMaterial(ORES.ZIMBABWEITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCONILITE); - MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_CE); - MaterialGenerator.generateOreMaterial(ORES.GADOLINITE_Y); - MaterialGenerator.generateOreMaterial(ORES.LEPERSONNITE); - MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_Y); - MaterialGenerator.generateOreMaterial(ORES.SAMARSKITE_YB); - MaterialGenerator.generateOreMaterial(ORES.XENOTIME); - MaterialGenerator.generateOreMaterial(ORES.YTTRIAITE); - MaterialGenerator.generateOreMaterial(ORES.YTTRIALITE); - MaterialGenerator.generateOreMaterial(ORES.YTTROCERITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCON); - MaterialGenerator.generateOreMaterial(ORES.POLYCRASE); - MaterialGenerator.generateOreMaterial(ORES.ZIRCOPHYLLITE); - MaterialGenerator.generateOreMaterial(ORES.ZIRKELITE); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_LA); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_CE); - MaterialGenerator.generateOreMaterial(ORES.LANTHANITE_ND); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_Y); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_CD); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_LA); - MaterialGenerator.generateOreMaterial(ORES.AGARDITE_ND); - MaterialGenerator.generateOreMaterial(ORES.HIBONITE); - MaterialGenerator.generateOreMaterial(ORES.CERITE); - MaterialGenerator.generateOreMaterial(ORES.FLUORCAPHITE); - MaterialGenerator.generateOreMaterial(ORES.FLORENCITE); - MaterialGenerator.generateOreMaterial(ORES.CRYOLITE); - - MaterialGenerator.generateOreMaterial(ORES.LAUTARITE); - MaterialGenerator.generateOreMaterial(ORES.LAFOSSAITE); - MaterialGenerator.generateOreMaterial(ORES.DEMICHELEITE_BR); - MaterialGenerator.generateOreMaterial(ORES.COMANCHEITE); - MaterialGenerator.generateOreMaterial(ORES.PERROUDITE); - MaterialGenerator.generateOreMaterial(ORES.HONEAITE); - MaterialGenerator.generateOreMaterial(ORES.ALBURNITE); - MaterialGenerator.generateOreMaterial(ORES.MIESSIITE); - MaterialGenerator.generateOreMaterial(ORES.KASHINITE); - MaterialGenerator.generateOreMaterial(ORES.IRARSITE); - MaterialGenerator.generateOreMaterial(ORES.GREENOCKITE); - MaterialGenerator.generateOreMaterial(ORES.RADIOBARITE); - MaterialGenerator.generateOreMaterial(ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT); - - //Custom Ores - if (LoadedMods.Big_Reactors) { - MaterialGenerator.generateOreMaterial(ELEMENT.getInstance().YELLORIUM, false, false, true, new short[] {255, 242, 10}); - } - - if (!CORE.GTNH) { - MaterialGenerator.generateOreMaterial( - ELEMENT.getInstance().TRINIUM, - true, - false, - false, - ELEMENT.getInstance().TRINIUM_REFINED.getRGBA()); - } - - - - /* - * OSRS Materials - */ - - MaterialGenerator.generateOreMaterial( - ELEMENT.STANDALONE.GRANITE, - true, - false, - false, - ELEMENT.STANDALONE.GRANITE.getRGBA()); - MaterialGenerator.generateOreMaterial( - ELEMENT.STANDALONE.RUNITE, - true, - false, - false, - ELEMENT.STANDALONE.RUNITE.getRGBA()); - - - - } - - protected synchronized void setVars(FMLPreInitializationEvent event){ - //Init WorldGen config. - HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); - - if (DimensionManager.isDimensionRegistered(Dimension_Everglades.DIMID)){ - Dimension_Everglades.DIMID = DimensionManager.getNextFreeDimId(); - } - - /* - * Set World Generation Values - */ - WorldGen_Ores.generateValidOreVeins(); - WorldGen_GT_Base.oreveinPercentage = 64; - WorldGen_GT_Base.oreveinAttempts = 16; - WorldGen_GT_Base.oreveinMaxPlacementAttempts = 4; - if (CORE_Preloader.DEBUG_MODE || CORE.DEVENV){ - WorldGen_GT_Base.debugWorldGen = true; - } - DarkWorldContentLoader.run(); - } - - @EventHandler - public void serverLoad(FMLServerStartingEvent event) { - getEvergladesBiome().serverLoad(event); - } - - /*@Override - public int getBurnTime(ItemStack fuel) { - if (DarkWorld_Biome.addFuel(fuel) != 0) - return DarkWorld_Biome.addFuel(fuel); - if (DarkWorld_Dimension.addFuel(fuel) != 0) - return DarkWorld_Dimension.addFuel(fuel); - return 0; - }*/ - - /*@Override - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { - chunkX = chunkX * 16; - chunkZ = chunkZ * 16; - - if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) { - DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); - } - - //What does this even do? - if (world.provider.dimensionId == -1) { - DarkWorld_Biome.generateNether(world, random, chunkX, chunkZ); - } - if (world.provider.dimensionId == 0) { - DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ); - } - - }*/ - - @EventHandler - public static void postInit(final FMLPostInitializationEvent e) { - Logger.INFO("Finished loading Everglades plugin for GT++."); - } - - public static synchronized Biome_Everglades getEvergladesBiome() { - return Everglades_Biome; - } - - public static synchronized void setEvergladesBiome(Biome_Everglades darkWorld_Biome) { - Everglades_Biome = darkWorld_Biome; - } - - @Override - public void actionPerformed(ActionEvent arg0) { - // TODO Auto-generated method stub - - } - -} diff --git a/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java deleted file mode 100644 index 0f8acd75b4..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java +++ /dev/null @@ -1,351 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; -import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; - -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.*; - -import gtPlusPlus.everglades.gen.WorldGenDeadLilly; -import gtPlusPlus.everglades.gen.WorldGenMinable_Custom; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.DecorateBiomeEvent; -import net.minecraftforge.event.terraingen.OreGenEvent; -import net.minecraftforge.event.terraingen.TerrainGen; - -public class BiomeGenerator_Custom extends BiomeDecorator { - - public WorldGenerator fluoriteGen; - - public BiomeGenerator_Custom(){ - //Basic Blocks - this.sandGen = new WorldGenMinable_Custom(Blocks.sand, 12); - this.gravelAsSandGen = new WorldGenMinable_Custom(Blocks.gravel, 8); - this.dirtGen = new WorldGenMinable_Custom(Blocks.dirt, 32); - this.gravelGen = new WorldGenMinable_Custom(Blocks.gravel, 12); - - - //Oregen - this.coalGen = new WorldGenMinable_Custom(Blocks.coal_ore, 16); - this.ironGen = new WorldGenMinable_Custom(Blocks.iron_ore, 12); - this.goldGen = new WorldGenMinable_Custom(Blocks.gold_ore, 12); - this.redstoneGen = new WorldGenMinable_Custom(Blocks.redstone_ore, 10); - this.diamondGen = new WorldGenMinable_Custom(Blocks.diamond_ore, 12); - this.lapisGen = new WorldGenMinable_Custom(Blocks.lapis_ore, 8); - // this.fluoriteGen = new WorldGenMinable_Custom(ModBlocks.blockOreFluorite, 20); - - //Nature - 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 WorldGenDeadLilly(); - - this.flowersPerChunk = 1; - this.grassPerChunk = 5; - this.sandPerChunk = 3; - this.sandPerChunk2 = 5; - this.clayPerChunk = 7; - - this.generateLakes = true; - } - - @Override - public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) - { - if (this.currentWorld != null) - { - throw new RuntimeException("Already decorating!!"); - } - else - { - this.currentWorld = p_150512_1_; - this.randomGenerator = p_150512_2_; - this.chunk_X = p_150512_4_; - this.chunk_Z = p_150512_5_; - this.genDecorations(p_150512_3_); - this.currentWorld = null; - this.randomGenerator = null; - } - } - - @Override - 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); - } - - if (doGen && this.randomGenerator.nextInt(8) == 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.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); - for (j = 0; doGen && j < this.reedsPerChunk; ++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); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - for (j = 0; doGen && j < 10; ++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); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); - if (doGen && this.randomGenerator.nextInt(32) == 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); - (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); - for (j = 0; doGen && j < this.cactiPerChunk; ++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); - this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); - if (doGen && this.generateLakes) - { - for (j = 0; j < 50; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - - for (j = 0; j < 20; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - } - - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - /** - * Standard ore generation helper. Generates most ores. - */ - @Override - protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_) - { - for (int l = 0; l < p_76795_1_; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76795_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Standard ore generation helper. Generates Lapis Lazuli. - */ - @Override - protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) - { - for (int l = 0; l < p_76793_1_; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + (p_76793_3_ - p_76793_4_); - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } - - /** - * Generates ores in the current chunk - */ - @Override - protected void generateOres() - { - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) - this.genStandardOre1(20, this.dirtGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) - this.genStandardOre1(10, this.gravelGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) - this.genStandardOre1(20, this.coalGen, 0, 128); - if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) - this.genStandardOre1(20, this.ironGen, 0, 64); - if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) - this.genStandardOre1(2, this.goldGen, 0, 32); - if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) - this.genStandardOre1(8, this.redstoneGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) - this.genStandardOre1(1, this.diamondGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) - this.genStandardOre2(1, this.lapisGen, 16, 16); - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } - - private int nextInt(int i) { - if (i <= 1) - return 0; - return this.randomGenerator.nextInt(i); - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java b/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java deleted file mode 100644 index b31f6d034e..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/Biome_Everglades.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import java.lang.reflect.Field; -import java.util.Random; - -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.event.FMLServerStartingEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.monster.EntityPigZombie; -import net.minecraft.entity.passive.EntityBat; -import net.minecraft.entity.passive.EntitySquid; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.entity.monster.EntitySickBlaze; -import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeManager; - -public class Biome_Everglades { - - public static BiomeGenEverglades biome = new BiomeGenEverglades(); - - public Object instance; - - public Biome_Everglades() { - } - - public void load() { - BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD); - BiomeManager.addSpawnBiome(biome); - } - - public void generateNether(World world, Random random, int chunkX, int chunkZ) { - } - - public void generateSurface(World world, Random random, int chunkX, int chunkZ) { - } - - public void registerRenderers() { - } - - public int addFuel(ItemStack fuel) { - return 0; - } - - public void serverLoad(FMLServerStartingEvent event) { - } - - public void preInit(FMLPreInitializationEvent event) { - } - - static class BiomeGenEverglades extends BiomeGenBase { - @SuppressWarnings("unchecked") - public BiomeGenEverglades() { - super(CORE.EVERGLADESBIOME_ID); - //this.setBiomeID(); - this.theBiomeDecorator = new BiomeGenerator_Custom(); - this.theBiomeDecorator.treesPerChunk = 10; - //Logger.INFO("Dark World Temperature Category: "+getTempCategory()); - this.setBiomeName("Toxic Everglades"); - this.topBlock = Dimension_Everglades.blockTopLayer; - this.fillerBlock = Dimension_Everglades.blockSecondLayer; - this.enableRain = true; - this.enableSnow = false; - this.rainfall = 0.7F; - this.setHeight(new BiomeGenBase.Height(0.3F, 0.5F)); - this.heightVariation = 0.4F; - this.waterColorMultiplier = 0x17290A; - this.rootHeight = -0.25f; //Ground level - - this.spawnableMonsterList.clear(); - this.spawnableCreatureList.clear(); - this.spawnableWaterCreatureList.clear(); - this.spawnableCaveCreatureList.clear(); - - //Enemies - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16)); - this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2)); - - //Animals - this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6)); - this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); - - } - - private synchronized boolean setBiomeID() { - try { - Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList"); - Field mClone = mInternalBiomeList; - BiomeGenBase[] mOriginalList = (BiomeGenBase[]) mInternalBiomeList.get(null); - BiomeGenBase[] mTempList = new BiomeGenBase[mOriginalList.length]; - for (int index=0;index EntityClass, int a, int b, int c){ - //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c)); - this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c)); - return true; - } - - } - -} diff --git a/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java deleted file mode 100644 index b69a8ea555..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java +++ /dev/null @@ -1,31 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; - -public class GenLayerBiomes extends GenLayer { - - protected BiomeGenBase[] allowedBiomes = { Biome_Everglades.biome, }; - - public GenLayerBiomes(long seed) { - super(seed); - } - - public GenLayerBiomes(long seed, GenLayer genlayer) { - super(seed); - this.parent = genlayer; - } - - @Override - public int[] getInts(int x, int z, int width, int depth) { - int[] dest = IntCache.getIntCache(width * depth); - for (int dz = 0; dz < depth; dz++) { - for (int dx = 0; dx < width; dx++) { - this.initChunkSeed(dx + x, dz + z); - dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; - } - } - return dest; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java b/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java deleted file mode 100644 index 8034921dce..0000000000 --- a/src/Java/gtPlusPlus/everglades/biome/GenLayerEverglades.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.everglades.biome; - -import net.minecraft.world.WorldType; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.GenLayerVoronoiZoom; -import net.minecraft.world.gen.layer.GenLayerZoom; - -public class GenLayerEverglades extends GenLayer { - - public GenLayerEverglades(long seed) { - super(seed); - } - - public static GenLayer[] makeTheWorld(long seed, WorldType type) { - GenLayer biomes = new GenLayerBiomes(1L); - biomes = new GenLayerZoom(1000L, biomes); - biomes = new GenLayerZoom(1001L, biomes); - biomes = new GenLayerZoom(1002L, biomes); - biomes = new GenLayerZoom(1003L, biomes); - biomes = new GenLayerZoom(1004L, biomes); - biomes = new GenLayerZoom(1005L, biomes); - GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); - biomes.initWorldGenSeed(seed); - genlayervoronoizoom.initWorldGenSeed(seed); - return new GenLayer[] { biomes, genlayervoronoizoom }; - } - - @Override - public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) { - return new int[] {}; - } -} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java deleted file mode 100644 index f68c97b3c5..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java +++ /dev/null @@ -1,25 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.BlockGrass; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockDarkWorldGround extends BlockGrass implements ITileTooltip{ - - public BlockDarkWorldGround() { - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldGround"); - this.setHardness(1.0F); - this.setBlockTextureName("minecraft" + ":" + "grass"); - LanguageRegistry.addName(this, "Unstable Earth"); - } - - @Override - public int getTooltipID() { - return 2; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java deleted file mode 100644 index a1fcc588b5..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java +++ /dev/null @@ -1,74 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.BlockDirt; -import net.minecraft.world.ColorizerGrass; -import net.minecraft.world.IBlockAccess; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; - -public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileTooltip{ - - public BlockDarkWorldPollutedDirt() { - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldGround2"); - this.setHardness(0.5F); - this.setBlockTextureName("minecraft" + ":" + "dirt"); - LanguageRegistry.addName(this, "Polluted Soil"); - } - - @Override - @SideOnly(Side.CLIENT) - public int getBlockColor() - { - double d0 = 0.5D; - double d1 = 1.0D; - return ColorizerGrass.getGrassColor(d0, d1); - } - - /** - * Returns the color this block should be rendered. Used by leaves. - */ - @Override - @SideOnly(Side.CLIENT) - public int getRenderColor(int p_149741_1_) - { - return this.getBlockColor(); - } - - /** - * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called - * when first determining what to render. - */ - @Override - @SideOnly(Side.CLIENT) - public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_) - { - int l = 0; - int i1 = 0; - int j1 = 0; - - for (int k1 = -1; k1 <= 1; ++k1) - { - for (int l1 = -1; l1 <= 1; ++l1) - { - int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1); - l += (i2 & 16711680) >> 16; - i1 += (i2 & 65280) >> 8; - j1 += i2 & 255; - } - } - - return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255; - } - - @Override - public int getTooltipID() { - return 3; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java deleted file mode 100644 index 09dea46ab1..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.everglades.block; - -import cpw.mods.fml.common.registry.LanguageRegistry; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.lib.CORE; - -public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{ - - public BlockDarkWorldPortalFrame() { - super(Material.iron); - this.setCreativeTab(AddToCreativeTab.tabBOP); - this.setBlockName("blockDarkWorldPortalFrame"); - this.setHardness(3.0F); - this.setLightLevel(0.5F); - this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A"); - LanguageRegistry.addName(this, "Containment Frame"); - - } - - @Override - public int getTooltipID() { - return 0; - } - -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java b/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java deleted file mode 100644 index 3c0445c86d..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java +++ /dev/null @@ -1,101 +0,0 @@ -package gtPlusPlus.everglades.block; - -import net.minecraft.block.material.MapColor; -import net.minecraft.block.material.Material; -import net.minecraft.block.material.MaterialLiquid; - -import net.minecraftforge.fluids.Fluid; - -public class BlockDarkWorldSludgeFluid extends Fluid { - - - public static final Material SLUDGE = new MaterialLiquid(MapColor.dirtColor); - - protected static int mapColor = 0xFFFFFFFF; - protected static float overlayAlpha = 0.2F; - //protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY; - //protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL; - protected static Material material = SLUDGE; - - - public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour) { - this(fluidName, rgbColour, null); - } - - public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour, Float overlayAlpha) { - super(fluidName); - setColor(rgbColour); - if (overlayAlpha != null){ - setAlpha(overlayAlpha.floatValue()); - } - else { - setAlpha(0); - } - } - - @Override - public int getColor() - { - return mapColor; - } - - public BlockDarkWorldSludgeFluid setColor(int parColor) - { - mapColor = parColor; - return this; - } - - public float getAlpha() - { - return overlayAlpha; - } - - public BlockDarkWorldSludgeFluid setAlpha(float parOverlayAlpha) - { - overlayAlpha = parOverlayAlpha; - return this; - } - - /*public blockDarkWorldSludgeFluid setEmptySound(SoundEvent parSound) - { - emptySound = parSound; - return this; - } - - public SoundEvent getEmptySound() - { - return emptySound; - } - - @Override - public blockDarkWorldSludgeFluid setFillSound(SoundEvent parSound) - { - fillSound = parSound; - return this; - } - - @Override - public SoundEvent getFillSound() - { - return fillSound; - }*/ - - public BlockDarkWorldSludgeFluid setMaterial(Material parMaterial) - { - material = parMaterial; - return this; - } - - public Material getMaterial() - { - return material; - } - - /*@Override - public boolean doesVaporize(FluidStack fluidStack) - { - if (block == null) - return false; - return block.getDefaultState().getMaterial() == getMaterial(); - }*/ -} diff --git a/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java b/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java deleted file mode 100644 index e64968888d..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java +++ /dev/null @@ -1,403 +0,0 @@ -package gtPlusPlus.everglades.block; - -import java.util.Random; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockBreakable; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import gtPlusPlus.api.interfaces.ITileTooltip; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.minecraft.BlockPos; -import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import gtPlusPlus.everglades.world.TeleporterDimensionMod; - -public class BlockEvergladesPortal extends BlockBreakable implements ITileTooltip{ - IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null; - - public BlockEvergladesPortal() { - super("portal", Material.portal, false); - this.setTickRandomly(true); - this.setHardness(-1.0F); - this.setLightLevel(0.75F); - this.setCreativeTab(CreativeTabs.tabBlock); - this.setBlockName("blockDarkWorldPortal"); - - } - - @SideOnly(Side.CLIENT) - @Override - public IIcon getIcon(int i, int par2) { - - if (i == 0) - return gor; - - else if (i == 1) - return dol; - - else if (i == 2) - return st1; - - else if (i == 3) - return st2; - - else if (i == 4) - return st4; - - else if (i == 5) - return st3; - - else - return gor; - - } - - @SideOnly(Side.CLIENT) - @Override - public void registerBlockIcons(IIconRegister reg) { - this.gor = reg.registerIcon("portal"); - this.dol = reg.registerIcon("portal"); - this.st1 = reg.registerIcon("portal"); - this.st2 = reg.registerIcon("portal"); - this.st3 = reg.registerIcon("portal"); - this.st4 = reg.registerIcon("portal"); - } - - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(World par1World, int x, int y, int z, Random par5Random) { - super.updateTick(par1World, x, y, z, par5Random); - - int blockCount = 0; - BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId); - - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - } - - } - - /** - * Returns a bounding box from the pool of bounding boxes (this means - * this box can change after the pool has been cleared to be reused) - */ - @Override - public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { - return null; - } - - /** - * Updates the blocks bounds based on its current state. Args: world, x, - * y, z - */ - @Override - public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { - float f; - float f1; - if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) { - f = 0.125F; - f1 = 0.5F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } else { - f = 0.5F; - f1 = 0.125F; - this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1); - } - } - - /** - * Is this block (a) opaque and (B) a full 1m cube? This determines - * whether or not to render the shared face of two adjacent blocks and - * also whether the player can attach torches, redstone wire, etc to - * this block. - */ - @Override - public boolean isOpaqueCube() { - return false; - } - - /** - * If this block doesn't render as an ordinary block it will return - * False (examples: signs, buttons, stairs, etc) - */ - @Override - public boolean renderAsNormalBlock() { - return false; - } - - /** - * Checks to see if this location is valid to create a portal and will - * return True if it does. Args: world, x, y, z - */ - public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) { - byte b0 = 0; - byte b1 = 0; - if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_Everglades.blockPortalFrame - || par1World.getBlock(par2 + 1, par3, par4) == Dimension_Everglades.blockPortalFrame) { - b0 = 1; - } - if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_Everglades.blockPortalFrame - || par1World.getBlock(par2, par3, par4 + 1) == Dimension_Everglades.blockPortalFrame) { - b1 = 1; - } - if (b0 == b1) { - return false; - } else { - if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) { - par2 -= b0; - par4 -= b1; - } - int l; - int i1; - for (l = -1; l <= 2; ++l) { - for (i1 = -1; i1 <= 3; ++i1) { - boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; - if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { - Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); - if (flag) { - if (j1 != Dimension_Everglades.blockPortalFrame) { - return false; - } - } - /* - * else if (j1 != 0 && j1 != - * Main.TutorialFire.blockID) { return false; } - */ - } - } - } - for (l = 0; l < 2; ++l) { - for (i1 = 0; i1 < 3; ++i1) { - par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2); - } - } - return true; - } - } - - /** - * Lets the block know when one of its neighbor changes. Doesn't know - * which neighbor changed (coordinates passed are their own) Args: x, y, - * z, neighbor blockID - */ - public void onNeighborBlockChange(BlockPos pos) { - int x = pos.xPos, y = pos.yPos, z = pos.zPos; - Logger.INFO("Trigger"); - int blockCount = 0; - BlockPos portal = pos; - World par1World = portal.world; - for (BlockPos side : portal.getSurroundingBlocks()) { - Block b = side.getBlockAtPos(); - if (b == Dimension_Everglades.blockPortalFrame || b == Dimension_Everglades.portalBlock) { - blockCount++; - } - } - if (blockCount < 4) { - par1World.setBlockToAir(x, y, z); - par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0); - } - - - - byte b0 = 0; - byte b1 = 1; - if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) { - b0 = 1; - b1 = 0; - } - int i1; - for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) { - ; - } - if (par1World.getBlock(x, i1 - 1, z) != Dimension_Everglades.blockPortalFrame) { - par1World.setBlockToAir(x, y, z); - } else { - int j1; - for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) { - ; - } - if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_Everglades.blockPortalFrame) { - boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this; - boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this; - if (flag && flag1) { - par1World.setBlockToAir(x, y, z); - } else { - if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_Everglades.blockPortalFrame || par1World - .getBlock(x - b0, y, z - b1) != this) - && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Everglades.blockPortalFrame || par1World.getBlock(x + b0, y, - z + b1) != this)) { - par1World.setBlockToAir(x, y, z); - } - } - } else { - par1World.setBlockToAir(x, y, z); - } - } - } - - @Override - public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { - onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId)); - super.onNeighborBlockChange(world, x, y, z, block); - } - - /*@Override - public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) { - onNeighborBlockChange(new BlockPos(x, y, z, world.)); - super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ); - }*/ - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given - * coordinates. Args: blockAccess, x, y, z, side - */ - public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { - if (par1IBlockAccess.getBlock(par2, par3, par4) == this) { - return false; - } else { - boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this; - boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this; - boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this; - boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; - boolean flag4 = flag || flag1; - boolean flag5 = flag2 || flag3; - return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3)); - } - } - - /** - * Returns the quantity of items to drop on block destruction. - */ - @Override - public int quantityDropped(Random par1Random) { - return 0; - } - - /** - * Triggered whenever an entity collides with this block (enters into - * the block). Args: world, x, y, z, entity - */ - @Override - public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { - if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { - EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity; - if (thePlayer.timeUntilPortal > 0) { - thePlayer.timeUntilPortal = 100; - } else if (thePlayer.dimension != Dimension_Everglades.DIMID) { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_Everglades.DIMID, - new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_Everglades.DIMID))); - } else { - thePlayer.timeUntilPortal = 100; - thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0, - new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0))); - } - } - } - - @Override - @SideOnly(Side.CLIENT) - /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha - */ - public int getRenderBlockPass() { - return 1; - } - - @Override - @SideOnly(Side.CLIENT) - /** - * A randomly called display update to be able to add particles or other items for display - */ - public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { - if (CORE.RANDOM.nextInt(100) == 0) { - par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F, - CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false); - } - for (int l = 0; l < 4; ++l) { - double d0 = par2 + CORE.RANDOM.nextFloat(); - double d1 = par3 + CORE.RANDOM.nextFloat(); - double d2 = par4 + CORE.RANDOM.nextFloat(); - double d3 = 0.0D; - double d4 = 0.0D; - double d5 = 0.0D; - int i1 = CORE.RANDOM.nextInt(2) * 2 - 1; - d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D; - if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) { - d0 = par2 + 0.5D + 0.25D * i1; - d3 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } else { - d2 = par4 + 0.5D + 0.25D * i1; - d5 = CORE.RANDOM.nextFloat() * 2.0F * i1; - } - par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5); - par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0); - - Random R = new Random(); - - if (R.nextInt(10) == 0){ - par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0); - } - else if (R.nextInt(5)==1){ - par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0); - } - } - } - - @SideOnly(Side.CLIENT) - /** - * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) - */ - public int idPicked(World par1World, int par2, int par3, int par4) { - return 0; - } - - @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public int getRenderColor(final int aMeta) { - return Utils.rgbtoHexValue(0, 255, 0); - } - - @Override - public String getLocalizedName() { - return EnumChatFormatting.OBFUSCATED+super.getLocalizedName(); - } - - @Override - public int getTooltipID() { - return 1; - } -} - - diff --git a/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java b/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java deleted file mode 100644 index 9d0e425e3a..0000000000 --- a/src/Java/gtPlusPlus/everglades/block/DarkWorldContentLoader.java +++ /dev/null @@ -1,71 +0,0 @@ -package gtPlusPlus.everglades.block; - -import static gtPlusPlus.everglades.dimension.Dimension_Everglades.*; - -import cpw.mods.fml.common.registry.GameRegistry; - -import net.minecraft.init.Blocks; - -import gtPlusPlus.core.block.base.BlockBaseFluid; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.everglades.item.ItemBlockToxicEverglades; -import gtPlusPlus.everglades.item.ItemEvergladesPortalTrigger; -import net.minecraftforge.fluids.FluidRegistry; - -public class DarkWorldContentLoader { - - //Static Vars - public static BlockDarkWorldSludgeFluid SLUDGE; - - - public synchronized static void run() { - initMisc(); - initItems(); - initBlocks(); - } - - public synchronized static boolean initMisc(){ - - //Fluids - SLUDGE = (BlockDarkWorldSludgeFluid) new BlockDarkWorldSludgeFluid( - "sludge", - Utils.rgbtoHexValue(30, 130, 30)) - .setDensity(1800) - .setGaseous(false) - .setLuminosity(2) - .setViscosity(25000) - .setTemperature(300); - FluidRegistry.registerFluid(SLUDGE); - - return true; - } - - public synchronized static boolean initItems(){ - portalItem = (ItemEvergladesPortalTrigger) (new ItemEvergladesPortalTrigger().setUnlocalizedName("everglades.trigger")); - GameRegistry.registerItem(portalItem, "everglades.trigger"); - return true; - } - - public synchronized static boolean initBlocks(){ - - //Create Block Instances - blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, BlockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("fluidSludge"); - portalBlock = new BlockEvergladesPortal(); - blockTopLayer = new BlockDarkWorldGround(); - blockSecondLayer = new BlockDarkWorldPollutedDirt(); - blockPortalFrame = new BlockDarkWorldPortalFrame(); - - //Registry - GameRegistry.registerBlock(portalBlock, ItemBlockToxicEverglades.class, "dimensionDarkWorld_portal"); - GameRegistry.registerBlock(blockTopLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround"); - GameRegistry.registerBlock(blockSecondLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround2"); - GameRegistry.registerBlock(blockPortalFrame, ItemBlockToxicEverglades.class, "blockDarkWorldPortalFrame"); - - //Make Flammable - Blocks.fire.setFireInfo(blockTopLayer, 30, 20); - - return true; - } - - -} diff --git a/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java b/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java deleted file mode 100644 index 0ff265a4ae..0000000000 --- a/src/Java/gtPlusPlus/everglades/chunk/ChunkProviderModded.java +++ /dev/null @@ -1,510 +0,0 @@ -package gtPlusPlus.everglades.chunk; - -import java.util.List; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockFalling; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.init.Blocks; -import net.minecraft.util.IProgressUpdate; -import net.minecraft.util.MathHelper; -import net.minecraft.world.*; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.chunk.IChunkProvider; -import net.minecraft.world.gen.*; -import net.minecraft.world.gen.feature.WorldGenLakes; -import net.minecraft.world.gen.structure.MapGenMineshaft; -import net.minecraft.world.gen.structure.MapGenScatteredFeature; -import net.minecraft.world.gen.structure.MapGenVillage; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.everglades.dimension.Dimension_Everglades; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.terraingen.ChunkProviderEvent; -import net.minecraftforge.event.terraingen.PopulateChunkEvent; -import net.minecraftforge.event.terraingen.TerrainGen; - -public class ChunkProviderModded implements IChunkProvider { - private Random rand; - private NoiseGeneratorOctaves field_147431_j; - private NoiseGeneratorOctaves field_147432_k; - private NoiseGeneratorOctaves field_147429_l; - private NoiseGeneratorPerlin field_147430_m; - /** - * A NoiseGeneratorOctaves used in generating terrain - */ - public NoiseGeneratorOctaves noiseGen5; - /** - * A NoiseGeneratorOctaves used in generating terrain - */ - public NoiseGeneratorOctaves noiseGen6; - public NoiseGeneratorOctaves mobSpawnerNoise; - /** - * Reference to the World object. - */ - private World worldObj; - private WorldType field_147435_p; - private final double[] field_147434_q; - private final float[] parabolicField; - private double[] stoneNoise = new double[256]; - private MapGenBase caveGenerator = new MapGenCaves(); - /** - * Holds Stronghold Generator - */ - // private MapGenStronghold strongholdGenerator = new - // MapGenStronghold(); - /** - * Holds Village Generator - */ - private MapGenVillage villageGenerator = new MapGenVillage(); - /** - * Holds Mineshaft Generator - */ - private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); - private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); - /** - * Holds ravine generator - */ - private MapGenBase ravineGenerator = new MapGenRavine(); - /** - * The biomes that are used to generate the chunk - */ - private BiomeGenBase[] biomesForGeneration; - double[] field_147427_d; - double[] field_147428_e; - double[] field_147425_f; - double[] field_147426_g; - int[][] field_73219_j = new int[32][32]; - { - caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE); - /* - * strongholdGenerator = (MapGenStronghold) - * TerrainGen.getModdedMapGen(strongholdGenerator, - * net.minecraftforge.event.terraingen.InitMapGenEvent.EventType. - * STRONGHOLD); - */ - villageGenerator = (MapGenVillage) TerrainGen.getModdedMapGen(villageGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE); - mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT); - scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE); - ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, - net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);