diff options
| author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
|---|---|---|
| committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
| commit | 55f64675b42ac8d3c557cc850f78664bee006f6f (patch) | |
| tree | 2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/everglades | |
| parent | 0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff) | |
| download | GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2 GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip | |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/everglades')
27 files changed, 1360 insertions, 1122 deletions
diff --git a/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java b/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java index bc137390b6..ac3665e855 100644 --- a/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java +++ b/src/main/java/gtPlusPlus/everglades/GTplusplus_Everglades.java @@ -1,5 +1,12 @@ package gtPlusPlus.everglades; +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; + import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -23,19 +30,13 @@ 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 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 = Everglades.MODID, name = Everglades.NAME, version = Everglades.VERSION, - dependencies = - "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") + dependencies = "required-after:Forge; after:dreamcraft; after:IC2; after:ihl; required-after:gregtech; required-after:miscutils;") public class GTplusplus_Everglades implements ActionListener { // Mod Instance @@ -64,8 +65,9 @@ public class GTplusplus_Everglades implements ActionListener { 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"))); + HANDLER_GT.sCustomWorldgenFile = new GTPP_Config( + new Configuration( + new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg"))); } @EventHandler @@ -128,14 +130,19 @@ public class GTplusplus_Everglades implements ActionListener { // Custom Ores if (LoadedMods.Big_Reactors) { MaterialGenerator.generateOreMaterial( - ELEMENT.getInstance().YELLORIUM, false, false, true, new short[] {255, 242, 10}); + ELEMENT.getInstance().YELLORIUM, + false, + false, + true, + new short[] { 255, 242, 10 }); } } 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"))); + 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(); @@ -159,33 +166,19 @@ public class GTplusplus_Everglades implements ActionListener { 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); - } - - }*/ + /* + * @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) { diff --git a/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java b/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java index f443a6560d..2ea16a553a 100644 --- a/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java +++ b/src/main/java/gtPlusPlus/everglades/biome/BiomeGenerator_Custom.java @@ -3,9 +3,8 @@ package gtPlusPlus.everglades.biome; import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*; import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*; -import gtPlusPlus.everglades.gen.WorldGenDeadLilly; -import gtPlusPlus.everglades.gen.WorldGenMinable_Custom; import java.util.Random; + import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -18,6 +17,9 @@ import net.minecraftforge.event.terraingen.DecorateBiomeEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.terraingen.TerrainGen; +import gtPlusPlus.everglades.gen.WorldGenDeadLilly; +import gtPlusPlus.everglades.gen.WorldGenMinable_Custom; + public class BiomeGenerator_Custom extends BiomeDecorator { public WorldGenerator fluoriteGen; @@ -57,8 +59,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator { } @Override - public void decorateChunk( - World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) { + 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 { @@ -85,7 +87,11 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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); + this.currentWorld, + this.randomGenerator, + j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), + k); } doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); @@ -93,7 +99,11 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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); + this.currentWorld, + this.randomGenerator, + j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), + k); } doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); @@ -101,7 +111,11 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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); + this.currentWorld, + this.randomGenerator, + j, + this.currentWorld.getTopSolidOrLiquidBlock(j, k), + k); } i = this.treesPerChunk; @@ -130,8 +144,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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); + this.bigMushroomGen + .generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); } doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); @@ -170,9 +184,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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) { + for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 + && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) { ; } @@ -252,8 +265,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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); + 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); } @@ -282,8 +295,7 @@ public class BiomeGenerator_Custom extends BiomeDecorator { 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_) + 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); diff --git a/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java b/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java index 918393bb8f..940c7b5a34 100644 --- a/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java +++ b/src/main/java/gtPlusPlus/everglades/biome/Biome_Everglades.java @@ -1,17 +1,8 @@ package gtPlusPlus.everglades.biome; -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 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 java.lang.reflect.Field; import java.util.Random; + import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.entity.passive.EntityBat; import net.minecraft.entity.passive.EntitySquid; @@ -21,6 +12,17 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeManager; +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 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; + public class Biome_Everglades { public static BiomeGenEverglades biome = new BiomeGenEverglades(); @@ -49,6 +51,7 @@ public class Biome_Everglades { public void preInit(FMLPreInitializationEvent event) {} static class BiomeGenEverglades extends BiomeGenBase { + @SuppressWarnings("unchecked") public BiomeGenEverglades() { super(CORE.EVERGLADESBIOME_ID); @@ -115,7 +118,7 @@ public class Biome_Everglades { return 0xF67A14; } - @SuppressWarnings({"unchecked", "unused"}) + @SuppressWarnings({ "unchecked", "unused" }) private boolean addToMonsterSpawnLists(Class<?> 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)); diff --git a/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java index 9a84d6cc99..93c8404bb6 100644 --- a/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java +++ b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java @@ -6,9 +6,7 @@ import net.minecraft.world.gen.layer.IntCache; public class GenLayerBiomes extends GenLayer { - protected BiomeGenBase[] allowedBiomes = { - Biome_Everglades.biome, - }; + protected BiomeGenBase[] allowedBiomes = { Biome_Everglades.biome, }; public GenLayerBiomes(long seed) { super(seed); diff --git a/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java b/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java index 59b4924355..dec0ed1429 100644 --- a/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java +++ b/src/main/java/gtPlusPlus/everglades/biome/GenLayerEverglades.java @@ -22,7 +22,7 @@ public class GenLayerEverglades extends GenLayer { GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes); biomes.initWorldGenSeed(seed); genlayervoronoizoom.initWorldGenSeed(seed); - return new GenLayer[] {biomes, genlayervoronoizoom}; + return new GenLayer[] { biomes, genlayervoronoizoom }; } @Override diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java index 85154ef1fb..72ab766652 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldGround.java @@ -1,9 +1,10 @@ package gtPlusPlus.everglades.block; +import net.minecraft.block.BlockGrass; + import cpw.mods.fml.common.registry.LanguageRegistry; import gtPlusPlus.api.interfaces.ITileTooltip; import gtPlusPlus.core.creative.AddToCreativeTab; -import net.minecraft.block.BlockGrass; public class BlockDarkWorldGround extends BlockGrass implements ITileTooltip { diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java index 043f632804..8d74fdd087 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPollutedDirt.java @@ -1,13 +1,14 @@ package gtPlusPlus.everglades.block; +import net.minecraft.block.BlockDirt; +import net.minecraft.world.ColorizerGrass; +import net.minecraft.world.IBlockAccess; + import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gtPlusPlus.api.interfaces.ITileTooltip; import gtPlusPlus.core.creative.AddToCreativeTab; -import net.minecraft.block.BlockDirt; -import net.minecraft.world.ColorizerGrass; -import net.minecraft.world.IBlockAccess; public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileTooltip { @@ -49,8 +50,7 @@ public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileToolti 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) + 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; diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java index 96f32be8a1..e9cf49b447 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldPortalFrame.java @@ -1,11 +1,12 @@ package gtPlusPlus.everglades.block; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; + import cpw.mods.fml.common.registry.LanguageRegistry; import gtPlusPlus.api.interfaces.ITileTooltip; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.lib.CORE; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip { diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java index 155319deaa..e3ee1b91df 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockDarkWorldSludgeFluid.java @@ -48,29 +48,13 @@ public class BlockDarkWorldSludgeFluid extends Fluid { 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 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; @@ -81,11 +65,8 @@ public class BlockDarkWorldSludgeFluid extends Fluid { return material; } - /*@Override - public boolean doesVaporize(FluidStack fluidStack) - { - if (block == null) - return false; - return block.getDefaultState().getMaterial() == getMaterial(); - }*/ + /* + * @Override public boolean doesVaporize(FluidStack fluidStack) { if (block == null) return false; return + * block.getDefaultState().getMaterial() == getMaterial(); } + */ } diff --git a/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java b/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java index d4385bc701..d90027ea60 100644 --- a/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java +++ b/src/main/java/gtPlusPlus/everglades/block/BlockEvergladesPortal.java @@ -1,15 +1,7 @@ package gtPlusPlus.everglades.block; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -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; import java.util.Random; + import net.minecraft.block.Block; import net.minecraft.block.BlockBreakable; import net.minecraft.block.material.Material; @@ -24,7 +16,18 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +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() { @@ -82,8 +85,8 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * 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) + * 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) { @@ -91,8 +94,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * Updates the blocks bounds based on its current state. Args: world, x, - * y, z + * 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) { @@ -111,10 +113,8 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * 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. + * 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() { @@ -122,8 +122,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * If this block doesn't render as an ordinary block it will return - * False (examples: signs, buttons, stairs, etc) + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) */ @Override public boolean renderAsNormalBlock() { @@ -131,8 +130,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * Checks to see if this location is valid to create a portal and will - * return True if it does. Args: world, x, y, z + * 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; @@ -165,8 +163,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } } /* - * else if (j1 != 0 && j1 != - * Main.TutorialFire.blockID) { return false; } + * else if (j1 != 0 && j1 != Main.TutorialFire.blockID) { return false; } */ } } @@ -181,9 +178,8 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti } /** - * 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 + * 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; @@ -226,7 +222,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti 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) != this) && (par1World.getBlock(x - b0, y, z - b1) != Dimension_Everglades.blockPortalFrame || par1World.getBlock(x + b0, y, z + b1) != this)) { par1World.setBlockToAir(x, y, z); @@ -244,11 +240,11 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti 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 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) @@ -270,8 +266,7 @@ public class BlockEvergladesPortal extends BlockBreakable implements ITileToolti && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this; boolean flag4 = flag || flag1; boolean flag5 = flag2 || flag3; - return flag4 && par5 == 4 - ? true + return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && |
