diff --git a/assets/ihl/lang/en_US.lang b/assets/ihl/lang/en_US.lang index 641ea06..9f6d3ec 100644 --- a/assets/ihl/lang/en_US.lang +++ b/assets/ihl/lang/en_US.lang @@ -2,6 +2,7 @@ language.name=HAYO language.region=US language.code=en_US +ihl.solarEvaporator=Solar evaporator ihl.achesonFurnace=Acheson furnace ihl.chemicalReactor=Chemical reactor ihl.crucible=Crucible @@ -56,9 +57,10 @@ dustSodiumFormate.name=Sodium formate dustMercuryChloride.name=Mercury chloride dustMercuryFulminate.name=Mercury fulminate dustCalciumAcetate.name=Calcium acetate -itemCellMethanol=Methanol cell -itemCellNitroGlycerin=Nitro glycerin cell - +itemCellMethanol.name=Methanol cell +itemCellNitroGlycerin.name=Nitro glycerin cell +itemCellAmmonia.name=Ammonia cell +itemCellGlycerol.name=Glycerol item.skull.name=Wailer remains item.guidebook.name=IHL manual item.handpump.name=IHL handpump @@ -70,6 +72,7 @@ item.handpump_discharged.name=IHL handpump tile.boneBlock.name=Bone pillar entity.LostHead.name=Wailer tile.ihlExplosive.name=Explosive pack +tile.solarEvaporator.name=Solar evaporator tile.evaporatorBlock.name=Evaporator tile.electricEvaporatorBlock.name=Electric evaporator tile.sackBlock.name=Rubber tree sap gathering sack diff --git a/assets/ihl/textures/blocks/fluidMethanolFlowing.xcf b/assets/ihl/textures/blocks/fluidMethanolFlowing.xcf deleted file mode 100644 index d3ca048..0000000 Binary files a/assets/ihl/textures/blocks/fluidMethanolFlowing.xcf and /dev/null differ diff --git a/assets/ihl/textures/blocks/solarEvaporatorSide.png b/assets/ihl/textures/blocks/solarEvaporatorSide.png new file mode 100644 index 0000000..32b5e32 Binary files /dev/null and b/assets/ihl/textures/blocks/solarEvaporatorSide.png differ diff --git a/assets/ihl/textures/gui/GUISolarEvaporator.png b/assets/ihl/textures/gui/GUISolarEvaporator.png new file mode 100644 index 0000000..4754742 Binary files /dev/null and b/assets/ihl/textures/gui/GUISolarEvaporator.png differ diff --git a/assets/ihl/textures/items/itemCellAmmonia.png b/assets/ihl/textures/items/itemCellAmmonia.png new file mode 100644 index 0000000..e72842a Binary files /dev/null and b/assets/ihl/textures/items/itemCellAmmonia.png differ diff --git a/ihl/ClientProxy.java b/ihl/ClientProxy.java index 2f58e9c..12bccbe 100644 --- a/ihl/ClientProxy.java +++ b/ihl/ClientProxy.java @@ -7,6 +7,15 @@ import javax.xml.parsers.ParserConfigurationException; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.network.internal.FMLProxyPacket; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.crop_harvestors.BlobEntityFX; import ihl.crop_harvestors.BlobEntityFX.FluidType; import ihl.crop_harvestors.BlobRenderFX; @@ -24,8 +33,8 @@ import ihl.flexible_cable.BatterySwitchUnitModel; import ihl.flexible_cable.BatterySwitchUnitTileEntity; import ihl.flexible_cable.BlastEntityFX; -import ihl.flexible_cable.IronWorkbenchTileEntity; import ihl.flexible_cable.IronWorkbenchRender; +import ihl.flexible_cable.IronWorkbenchTileEntity; import ihl.flexible_cable.NodeEntity; import ihl.flexible_cable.NodeRender; import ihl.flexible_cable.RectifierTransformerUnitTileEntity; @@ -34,8 +43,16 @@ import ihl.items_blocks.FlexibleCableItem; import ihl.items_blocks.IHLTool; import ihl.items_blocks.MachineBaseBlock.MachineType; -import ihl.model.*; -import ihl.processing.chemistry.DosingPumpTileEntity; +import ihl.model.CableHolderSelectionBoxSpecialRenderer; +import ihl.model.FlexibleCableItemRender; +import ihl.model.IHLBlockRenderer; +import ihl.model.IHLToolRenderer; +import ihl.model.ImpregnatingMachineBlockRender; +import ihl.model.IronWorkbenchBlockRender; +import ihl.model.RectifierTransformerUnitBlockRender; +import ihl.model.RectifierTransformerUnitSelectionBoxSpecialRenderer; +import ihl.model.RefluxCondenserBlockRender; +import ihl.model.UniversalTileRender; import ihl.processing.chemistry.ElectrolysisBathModel; import ihl.processing.chemistry.ElectrolysisBathTileEntity; import ihl.processing.chemistry.FractionatorBottomModel; @@ -50,6 +67,7 @@ import ihl.processing.chemistry.LoomTileEntity; import ihl.processing.chemistry.RefluxCondenserModel; import ihl.processing.chemistry.RefluxCondenserTileEntity; +import ihl.processing.chemistry.SolarEvaporatorTileEntity; import ihl.processing.metallurgy.CoilerModel; import ihl.processing.metallurgy.CoilerRender; import ihl.processing.metallurgy.CoilerTileEntity; @@ -96,7 +114,6 @@ import net.minecraft.client.renderer.GLAllocation; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -107,15 +124,6 @@ import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.common.MinecraftForge; -import cpw.mods.fml.client.registry.ClientRegistry; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.network.FMLNetworkEvent; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.network.internal.FMLProxyPacket; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value = Side.CLIENT) public class ClientProxy extends ServerProxy { @@ -137,6 +145,7 @@ public void load() throws ParserConfigurationException { this.renderUtils = new IHLRenderUtils(); MinecraftForge.EVENT_BUS.register(this.renderUtils); registerBlockHandler(new ImpregnatingMachineBlockRender(), MachineType.BronzeTub); + registerBlockHandler(new ImpregnatingMachineBlockRender(), MachineType.SolarEvaporator); registerBlockHandler(new RefluxCondenserBlockRender(), MachineType.RefluxCondenser); registerBlockHandler(new RectifierTransformerUnitBlockRender(), MachineType.RectifierTransformerUnit); registerBlockHandler(new IronWorkbenchBlockRender(), MachineType.IronWorkbench); @@ -153,7 +162,9 @@ public void load() throws ParserConfigurationException { ClientRegistry.bindTileEntitySpecialRenderer(LoomTileEntity.class, new UniversalTileRender(new LoomModel(), new ResourceLocation(IHLModInfo.MODID + ":textures/blocks/detonationSprayingMachine.png"))); ClientRegistry.bindTileEntitySpecialRenderer(ImpregnatingMachineTileEntity.class, - new ImpregnatingMachineRender()); + new ImpregnatingMachineRender(900f)); + ClientRegistry.bindTileEntitySpecialRenderer(SolarEvaporatorTileEntity.class, + new ImpregnatingMachineRender(900f)); ClientRegistry.bindTileEntitySpecialRenderer(DetonationSprayingMachineTileEntity.class, new DetonationSprayingMachineRender()); ClientRegistry.bindTileEntitySpecialRenderer(CoilerTileEntity.class, new CoilerRender()); diff --git a/ihl/IHLMod.java b/ihl/IHLMod.java index 3c501dd..073aef9 100644 --- a/ihl/IHLMod.java +++ b/ihl/IHLMod.java @@ -13,6 +13,16 @@ import org.apache.logging.log4j.Logger; import codechicken.nei.NEIModContainer; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.IFuelHandler; +import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.registry.EntityRegistry; +import cpw.mods.fml.common.registry.GameRegistry; import gregapi.data.IL; import gregapi.data.MT; import gregapi.data.OP; @@ -32,6 +42,9 @@ import ic2.api.recipe.Recipes; import ic2.core.Ic2Items; import ic2.core.util.StackUtil; +import ihl.crop_harvestors.RubberTreeBlock; +import ihl.crop_harvestors.SackBlock; +import ihl.crop_harvestors.SackTileEntity; import ihl.enviroment.LaserHitMirrorEventHandler; import ihl.enviroment.MirrorBlock; import ihl.explosion.ChunkAndWorldLoadEventHandler; @@ -85,9 +98,6 @@ import ihl.processing.metallurgy.VulcanizationExtrudingMoldTileEntity; import ihl.processing.metallurgy.WireMillTileEntity; import ihl.processing.metallurgy.WoodenRollingMachinePart1TileEntity; -import ihl.crop_harvestors.RubberTreeBlock; -import ihl.crop_harvestors.SackBlock; -import ihl.crop_harvestors.SackTileEntity; import ihl.recipes.IronWorkbenchRecipe; import ihl.recipes.RecipeInputDetonator; import ihl.recipes.RecipeInputDie; @@ -118,7 +128,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeDictionary.Type; @@ -126,16 +135,6 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.IFuelHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.Mod; -import cpw.mods.fml.common.Mod.EventHandler; -import cpw.mods.fml.common.SidedProxy; -import cpw.mods.fml.common.event.FMLPostInitializationEvent; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import cpw.mods.fml.common.registry.EntityRegistry; -import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = IHLModInfo.MODID, name = IHLModInfo.MODNAME, version = IHLModInfo.MODVERSION, dependencies = "required-after:IC2@[2.2.767-experimental,)") public class IHLMod implements IFuelHandler { @@ -478,7 +477,6 @@ public void postInit(FMLPostInitializationEvent evt) throws IOException { Character.valueOf('R'), IC2Items.getItem("energyCrystal"), Character.valueOf('P'), IC2Items.getItem("powerunitsmall") }); } - ItemStack forestryWaxCapsule = IHLUtils.getOtherModItemStackWithDamage("Forestry", "waxCapsule", 0, 1); ItemStack forestryWaxCast = IHLUtils.getOtherModItemStackWithDamage("Forestry", "waxCast", 0, 1); ItemStack forestryCandle = IHLUtils.getOtherModItemStackWithDamage("Forestry", "candle", 0, 1); @@ -645,6 +643,10 @@ public void postInit(FMLPostInitializationEvent evt) throws IOException { IHLUtils.getThisModItemStack("hackSawSteel") }), Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("barD10Steel") }), Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStackWithSize("tapM10x1Steel", 2) }))); + IronWorkbenchTileEntity.addRecipe(new IronWorkbenchRecipe( + Arrays.asList(new IRecipeInput[] {new RecipeInputOreDict("craftingToolSaw") }), + Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("tubBronze") }), + Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("solarEvaporator") }))); IronWorkbenchTileEntity.addRecipe(new IronWorkbenchRecipe(Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("handDrillBronze"), IHLUtils.getThisModItemStack("hackSawSteel"), IHLUtils.getThisModItemStack("drillSteelHardened"), @@ -804,7 +806,7 @@ public void postInit(FMLPostInitializationEvent evt) throws IOException { IHLUtils.getThisModItemStackWithSize("highPressureVesselSteel", 2), IHLUtils.getThisModItemStackWithSize("nutM10x1Steel", 32), IHLUtils.getThisModItemStackWithSize("boltM10x1Steel", 32), - IHLUtils.getThisModWireItemStackWithLength("pipeVulcanizedRubber", 16) }), + IHLUtils.getThisModItemStack("pipeVulcanizedRubber") }), Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("gasWeldingStation") }))); IronWorkbenchTileEntity.addRecipe(new IronWorkbenchRecipe( Arrays.asList(new ItemStack[] { IHLUtils.getThisModItemStack("setOfFilesSteel"), @@ -2079,7 +2081,7 @@ private void loadGT5Recipes() { new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("foilRubberWithSulfur", 16)), new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("fabric", 8)), new RecipeInputOreDict("dustGraphite"), - IHLUtils.getThisModWireItemStackWithLength("pipeRubberWithSulfur", 16)); + IHLUtils.getThisModItemStack("pipeRubberWithSulfur")); } @SuppressWarnings("deprecation") @@ -2199,6 +2201,9 @@ private void loadGT6Recipes() { Recipe.RecipeMap.sMaceratorRecipes.addRecipe(true, new ItemStack[] { new ItemStack(Items.brick) }, new ItemStack[] { IHLUtils.getOreDictItemStack("dustBrick") }, null, new long[] { 10000 }, new FluidStack[] {}, new FluidStack[] {}, 600, 30, 0); + Recipe.RecipeMap.sShredderRecipes.addRecipe(true, new ItemStack[] { new ItemStack(Items.brick) }, + new ItemStack[] { IHLUtils.getOreDictItemStack("dustBrick") }, null, new long[] { 10000 }, + new FluidStack[] {}, new FluidStack[] {}, 600, 30, 0); Recipe.RecipeMap.sMaceratorRecipes.addRecipe(true, new ItemStack[] { IHLUtils.getOreDictItemStack("stickGraphite") }, new ItemStack[] { IHLUtils.getOreDictItemStack("dustSmallGraphite") }, null, new long[] { 10000 }, @@ -2266,7 +2271,7 @@ private void loadGT6Recipes() { new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("foilRubberWithSulfur", 16)), new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("fabric", 8)), new RecipeInputOreDict("dustGraphite"), - IHLUtils.getThisModWireItemStackWithLength("pipeRubberWithSulfur", 16)); + IHLUtils.getThisModItemStack("pipeRubberWithSulfur")); } private void loadIC2Recipes() { @@ -2311,6 +2316,6 @@ private void loadIC2Recipes() { new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("foilRubberWithSulfur", 16)), new RecipeInputItemStack(IHLUtils.getThisModItemStackWithSize("fabric", 8)), new RecipeInputOreDict("dustGraphite"), - IHLUtils.getThisModWireItemStackWithLength("pipeRubberWithSulfur", 16)); + IHLUtils.getThisModItemStack("pipeRubberWithSulfur")); } } diff --git a/ihl/IHLModConfig.java b/ihl/IHLModConfig.java index ef219bc..979eb23 100644 --- a/ihl/IHLModConfig.java +++ b/ihl/IHLModConfig.java @@ -1,19 +1,5 @@ package ihl; -import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeInputFluidContainer; -import ic2.api.recipe.RecipeInputItemStack; -import ic2.api.recipe.RecipeInputOreDict; -import ihl.flexible_cable.IronWorkbenchTileEntity; -import ihl.recipes.IronWorkbenchRecipe; -import ihl.recipes.RecipeInputDie; -import ihl.recipes.RecipeInputWire; -import ihl.recipes.RecipeOutputItemStack; -import ihl.recipes.UniversalRecipeInput; -import ihl.recipes.UniversalRecipeManager; -import ihl.recipes.UniversalRecipeOutput; -import ihl.utils.IHLUtils; - import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; @@ -28,12 +14,25 @@ import java.util.List; import java.util.Map.Entry; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputFluidContainer; +import ic2.api.recipe.RecipeInputItemStack; +import ic2.api.recipe.RecipeInputOreDict; +import ihl.flexible_cable.IronWorkbenchTileEntity; +import ihl.recipes.IronWorkbenchRecipe; +import ihl.recipes.RecipeInputDie; +import ihl.recipes.RecipeInputWire; +import ihl.recipes.RecipeOutputItemStack; +import ihl.recipes.UniversalRecipeInput; +import ihl.recipes.UniversalRecipeManager; +import ihl.recipes.UniversalRecipeOutput; +import ihl.utils.IHLUtils; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import net.minecraft.nbt.NBTTagCompound; public class IHLModConfig { diff --git a/ihl/IHLModInfo.java b/ihl/IHLModInfo.java index 91cff69..511d772 100644 --- a/ihl/IHLModInfo.java +++ b/ihl/IHLModInfo.java @@ -3,5 +3,5 @@ public class IHLModInfo { public static final String MODID = "ihl"; public static final String MODNAME = "IHL Tools & Machines for IC2V2"; - public static final String MODVERSION = "0.633"; + public static final String MODVERSION = "0.637"; } diff --git a/ihl/crop_harvestors/BlobRenderFX.java b/ihl/crop_harvestors/BlobRenderFX.java index 21fe3a3..ed54869 100644 --- a/ihl/crop_harvestors/BlobRenderFX.java +++ b/ihl/crop_harvestors/BlobRenderFX.java @@ -1,5 +1,7 @@ package ihl.crop_harvestors; +import org.lwjgl.opengl.GL11; + import ihl.IHLModInfo; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.ActiveRenderInfo; @@ -7,7 +9,6 @@ import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class BlobRenderFX extends Render{ private ResourceLocation tex, tex2; diff --git a/ihl/crop_harvestors/SackBlock.java b/ihl/crop_harvestors/SackBlock.java index abf8c46..7972dc1 100644 --- a/ihl/crop_harvestors/SackBlock.java +++ b/ihl/crop_harvestors/SackBlock.java @@ -1,6 +1,7 @@ package ihl.crop_harvestors; import java.util.List; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ihl.IHLCreativeTab; diff --git a/ihl/crop_harvestors/SackRender.java b/ihl/crop_harvestors/SackRender.java index e359e3a..31798b4 100644 --- a/ihl/crop_harvestors/SackRender.java +++ b/ihl/crop_harvestors/SackRender.java @@ -1,12 +1,12 @@ package ihl.crop_harvestors; +import org.lwjgl.opengl.GL11; + +import ihl.IHLModInfo; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.FluidRegistry; -import org.lwjgl.opengl.GL11; -import ihl.IHLModInfo; - public class SackRender extends TileEntitySpecialRenderer{ private SackModel model = new SackModel(); private ResourceLocation tex = new ResourceLocation(IHLModInfo.MODID+":textures/blocks/sack.png"); diff --git a/ihl/crop_harvestors/SackTileEntity.java b/ihl/crop_harvestors/SackTileEntity.java index 69418d8..800b2c5 100644 --- a/ihl/crop_harvestors/SackTileEntity.java +++ b/ihl/crop_harvestors/SackTileEntity.java @@ -3,6 +3,11 @@ import java.util.List; import java.util.Random; +import ic2.core.IC2; +import ic2.core.block.TileEntityInventory; +import ihl.IHLMod; +import ihl.utils.IHLFluidTank; +import ihl.utils.IHLUtils; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; @@ -15,11 +20,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import ic2.core.IC2; -import ic2.core.block.TileEntityInventory; -import ihl.IHLMod; -import ihl.utils.IHLFluidTank; -import ihl.utils.IHLUtils; public class SackTileEntity extends TileEntityInventory implements IFluidHandler { diff --git a/ihl/enviroment/LaserHitMirrorEventHandler.java b/ihl/enviroment/LaserHitMirrorEventHandler.java index 9baee2d..6cd61fc 100644 --- a/ihl/enviroment/LaserHitMirrorEventHandler.java +++ b/ihl/enviroment/LaserHitMirrorEventHandler.java @@ -1,11 +1,11 @@ package ihl.enviroment; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import ic2.api.event.LaserEvent; import ic2.core.item.tool.EntityMiningLaser; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class LaserHitMirrorEventHandler { diff --git a/ihl/enviroment/MirrorBlock.java b/ihl/enviroment/MirrorBlock.java index d7d7473..e996876 100644 --- a/ihl/enviroment/MirrorBlock.java +++ b/ihl/enviroment/MirrorBlock.java @@ -1,10 +1,10 @@ package ihl.enviroment; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; -import ihl.utils.IHLUtils; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; +import ihl.utils.IHLUtils; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; diff --git a/ihl/enviroment/MirrorRender.java b/ihl/enviroment/MirrorRender.java index 2166e7b..60bc501 100644 --- a/ihl/enviroment/MirrorRender.java +++ b/ihl/enviroment/MirrorRender.java @@ -3,17 +3,6 @@ import java.nio.IntBuffer; import java.util.Iterator; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; - import org.lwjgl.BufferUtils; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; @@ -24,6 +13,16 @@ import ihl.IHLMod; import ihl.model.IHLBlockRenderer; import ihl.utils.IHLRenderUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.tileentity.TileEntity; public class MirrorRender extends TileEntitySpecialRenderer{ private int texture=-1; diff --git a/ihl/enviroment/MirrorTileEntity.java b/ihl/enviroment/MirrorTileEntity.java index 1808816..4060e59 100644 --- a/ihl/enviroment/MirrorTileEntity.java +++ b/ihl/enviroment/MirrorTileEntity.java @@ -2,6 +2,11 @@ import java.util.ArrayList; import java.util.List; + +import ic2.core.block.TileEntityBlock; +import ihl.IHLMod; +import ihl.handpump.BlockWithCoordinates; +import ihl.utils.IHLUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.entity.Entity; @@ -15,10 +20,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkCache; import net.minecraftforge.common.util.ForgeDirection; -import ic2.core.block.TileEntityBlock; -import ihl.IHLMod; -import ihl.handpump.BlockWithCoordinates; -import ihl.utils.IHLUtils; public class MirrorTileEntity extends TileEntityBlock { diff --git a/ihl/explosion/ChunkAndWorldLoadEventHandler.java b/ihl/explosion/ChunkAndWorldLoadEventHandler.java index 2f49484..c2f7e0b 100644 --- a/ihl/explosion/ChunkAndWorldLoadEventHandler.java +++ b/ihl/explosion/ChunkAndWorldLoadEventHandler.java @@ -1,13 +1,12 @@ package ihl.explosion; -import ihl.IHLMod; - import java.util.Iterator; import java.util.Set; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import ihl.IHLMod; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.Explosion; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class ChunkAndWorldLoadEventHandler { public static ChunkAndWorldLoadEventHandler instance; diff --git a/ihl/explosion/DetonatorMiniGUI.java b/ihl/explosion/DetonatorMiniGUI.java index 6a6c421..4a93050 100644 --- a/ihl/explosion/DetonatorMiniGUI.java +++ b/ihl/explosion/DetonatorMiniGUI.java @@ -1,16 +1,17 @@ package ihl.explosion; import java.awt.event.KeyEvent; + import org.lwjgl.opengl.GL11; +import ihl.IHLMod; +import ihl.interfaces.ItemMiniGUI; +import ihl.utils.IHLUtils; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Slot; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import ihl.IHLMod; -import ihl.interfaces.ItemMiniGUI; -import ihl.utils.IHLUtils; public class DetonatorMiniGUI extends ItemMiniGUI { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIIronWorkbench.png"); diff --git a/ihl/explosion/ExplosionRenderFX.java b/ihl/explosion/ExplosionRenderFX.java index da42d4e..18bfd4f 100644 --- a/ihl/explosion/ExplosionRenderFX.java +++ b/ihl/explosion/ExplosionRenderFX.java @@ -1,12 +1,13 @@ package ihl.explosion; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class ExplosionRenderFX extends Render{ private ResourceLocation tex; diff --git a/ihl/explosion/ExplosionVectorBlockV2.java b/ihl/explosion/ExplosionVectorBlockV2.java index 1a65aef..e00e19a 100644 --- a/ihl/explosion/ExplosionVectorBlockV2.java +++ b/ihl/explosion/ExplosionVectorBlockV2.java @@ -1,9 +1,5 @@ package ihl.explosion; -import ihl.IHLMod; -import ihl.utils.IHLMathUtils; -import ihl.utils.IHLUtils; - import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -11,11 +7,12 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; - import java.util.Map.Entry; import java.util.Random; +import java.util.Set; +import ihl.IHLMod; +import ihl.utils.IHLUtils; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; diff --git a/ihl/explosion/ExplosiveBlock.java b/ihl/explosion/ExplosiveBlock.java index 5943be2..d6b1c71 100644 --- a/ihl/explosion/ExplosiveBlock.java +++ b/ihl/explosion/ExplosiveBlock.java @@ -1,12 +1,15 @@ package ihl.explosion; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.IC2; import ihl.IHLCreativeTab; import ihl.IHLModInfo; import ihl.items_blocks.IHLItemBlock; import ihl.processing.metallurgy.MuffleFurnanceTileEntity; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -26,9 +29,6 @@ import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ExplosiveBlock extends Block implements ITileEntityProvider{ diff --git a/ihl/explosion/GroundRemoverItem.java b/ihl/explosion/GroundRemoverItem.java index d3d2b80..ddbc884 100644 --- a/ihl/explosion/GroundRemoverItem.java +++ b/ihl/explosion/GroundRemoverItem.java @@ -5,9 +5,11 @@ import java.util.Random; import java.util.Set; -import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLCreativeTab; +import ihl.IHLMod; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; @@ -17,9 +19,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import ihl.IHLCreativeTab; -import ihl.IHLMod; -import ihl.IHLModInfo; public class GroundRemoverItem extends Item{ diff --git a/ihl/explosion/IHLEntityFallingPileRender.java b/ihl/explosion/IHLEntityFallingPileRender.java index e3e0334..02cca5d 100644 --- a/ihl/explosion/IHLEntityFallingPileRender.java +++ b/ihl/explosion/IHLEntityFallingPileRender.java @@ -1,4 +1,9 @@ package ihl.explosion; +import java.util.Random; + +import org.lwjgl.opengl.GL11; + +import ihl.utils.IHLItemRenderer; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; @@ -6,12 +11,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -import java.util.Random; - -import org.lwjgl.opengl.GL11; - -import ihl.utils.IHLItemRenderer; - public class IHLEntityFallingPileRender extends Render{ private final IHLItemRenderer itemRenderer; diff --git a/ihl/explosion/PileTileEntityRender.java b/ihl/explosion/PileTileEntityRender.java index 2141e83..56fc72f 100644 --- a/ihl/explosion/PileTileEntityRender.java +++ b/ihl/explosion/PileTileEntityRender.java @@ -4,6 +4,13 @@ import java.util.Map; import java.util.Random; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL30; +import org.lwjgl.util.glu.GLU; + +import ihl.IHLMod; +import ihl.utils.IHLItemRenderer; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; @@ -16,14 +23,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL30; -import org.lwjgl.util.glu.GLU; - -import ihl.IHLMod; -import ihl.utils.IHLItemRenderer; - public class PileTileEntityRender extends TileEntitySpecialRenderer { private int fb = -1; diff --git a/ihl/flexible_cable/AnchorBlock.java b/ihl/flexible_cable/AnchorBlock.java index 90fcf80..207173e 100644 --- a/ihl/flexible_cable/AnchorBlock.java +++ b/ihl/flexible_cable/AnchorBlock.java @@ -1,9 +1,9 @@ package ihl.flexible_cable; -import ihl.IHLModInfo; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; diff --git a/ihl/flexible_cable/AnchorTileEntity.java b/ihl/flexible_cable/AnchorTileEntity.java index b03a3d9..1262a01 100644 --- a/ihl/flexible_cable/AnchorTileEntity.java +++ b/ihl/flexible_cable/AnchorTileEntity.java @@ -1,5 +1,10 @@ package ihl.flexible_cable; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + import ic2.api.energy.EnergyNet; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; @@ -11,12 +16,6 @@ import ihl.interfaces.IEnergyNetNode; import ihl.interfaces.IMultiPowerCableHolder; import ihl.utils.IHLUtils; - -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/ihl/flexible_cable/BatterySwitchUnitModel.java b/ihl/flexible_cable/BatterySwitchUnitModel.java index 7919950..2d16ed4 100644 --- a/ihl/flexible_cable/BatterySwitchUnitModel.java +++ b/ihl/flexible_cable/BatterySwitchUnitModel.java @@ -1,8 +1,8 @@ package ihl.flexible_cable; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; // Date: 07.04.2015 18:24:15 // Template version 1.1 diff --git a/ihl/flexible_cable/FlexibleCableHolderBaseTileEntity.java b/ihl/flexible_cable/FlexibleCableHolderBaseTileEntity.java index 34455ac..f922e9b 100644 --- a/ihl/flexible_cable/FlexibleCableHolderBaseTileEntity.java +++ b/ihl/flexible_cable/FlexibleCableHolderBaseTileEntity.java @@ -7,8 +7,6 @@ import ic2.core.block.TileEntityInventory; import ihl.IHLMod; -import ihl.flexible_cable.IHLGrid; -import ihl.flexible_cable.NodeEntity; import ihl.interfaces.IEnergyNetNode; import ihl.utils.IHLUtils; import net.minecraft.entity.EntityLivingBase; diff --git a/ihl/flexible_cable/IHLENet.java b/ihl/flexible_cable/IHLENet.java index 32b5ebf..f188937 100644 --- a/ihl/flexible_cable/IHLENet.java +++ b/ihl/flexible_cable/IHLENet.java @@ -1,13 +1,12 @@ package ihl.flexible_cable; -import ihl.IHLMod; -import ihl.interfaces.IEnergyNetNode; - import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; +import ihl.IHLMod; +import ihl.interfaces.IEnergyNetNode; import net.minecraft.nbt.NBTTagCompound; public class IHLENet { diff --git a/ihl/flexible_cable/IHLGrid.java b/ihl/flexible_cable/IHLGrid.java index a47c229..52c50b0 100644 --- a/ihl/flexible_cable/IHLGrid.java +++ b/ihl/flexible_cable/IHLGrid.java @@ -1,9 +1,5 @@ package ihl.flexible_cable; -import ihl.IHLMod; -import ihl.interfaces.IEnergyNetNode; -import ihl.utils.IHLUtils; - import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -12,6 +8,9 @@ import java.util.Map; import java.util.Set; +import ihl.IHLMod; +import ihl.interfaces.IEnergyNetNode; +import ihl.utils.IHLUtils; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; diff --git a/ihl/flexible_cable/InvSlotOutputInProgress.java b/ihl/flexible_cable/InvSlotOutputInProgress.java index 3694aee..da17e0f 100644 --- a/ihl/flexible_cable/InvSlotOutputInProgress.java +++ b/ihl/flexible_cable/InvSlotOutputInProgress.java @@ -82,7 +82,7 @@ public List getRecipeOutputs(int currentSlot) List list = new ArrayList(); for(int i=0;i iconMap = new HashMap(); private static Map nameMap = new HashMap(); @@ -69,19 +68,6 @@ public void addInformation(ItemStack itemStack, EntityPlayer player, List info, info.add("Length " + itemStack.stackTagCompound.getInteger("length") +"m"); } } - - @Override - public String getTag() - { - return "length"; - } - - @Override - public String getTagSecondary() - { - return "fullLength"; - } - @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister register) @@ -118,11 +104,4 @@ public static enum Type public int damage; public String unLocalizedName; } - - - @Override - public boolean isSameWire(ItemStack stack1,ItemStack stack2) - { - return stack1.getItem()==stack2.getItem(); - } } diff --git a/ihl/items_blocks/IHLBucketHandler.java b/ihl/items_blocks/IHLBucketHandler.java index c0a23b6..9f3a7b8 100644 --- a/ihl/items_blocks/IHLBucketHandler.java +++ b/ihl/items_blocks/IHLBucketHandler.java @@ -1,8 +1,8 @@ package ihl.items_blocks; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraftforge.event.entity.player.FillBucketEvent; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class IHLBucketHandler { diff --git a/ihl/items_blocks/IHLFluidBlock.java b/ihl/items_blocks/IHLFluidBlock.java index 29d2d99..7ad7730 100644 --- a/ihl/items_blocks/IHLFluidBlock.java +++ b/ihl/items_blocks/IHLFluidBlock.java @@ -1,9 +1,9 @@ package ihl.items_blocks; -import ihl.IHLModInfo; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/items_blocks/IHLTool.java b/ihl/items_blocks/IHLTool.java index 1479072..150d0ca 100644 --- a/ihl/items_blocks/IHLTool.java +++ b/ihl/items_blocks/IHLTool.java @@ -4,6 +4,17 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.reactor.IReactor; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; +import ihl.flexible_cable.SetOfDiesMiniGUI; +import ihl.interfaces.IHasTemperature; +import ihl.interfaces.IItemHasMiniGUI; +import ihl.interfaces.ItemMiniGUI; +import ihl.utils.IHLUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -29,17 +40,6 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ic2.api.reactor.IReactor; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; -import ihl.flexible_cable.SetOfDiesMiniGUI; -import ihl.interfaces.IHasTemperature; -import ihl.interfaces.IItemHasMiniGUI; -import ihl.interfaces.ItemMiniGUI; -import ihl.utils.IHLUtils; public class IHLTool extends Item implements IItemHasMiniGUI{ private static Map iconMap = new HashMap(); diff --git a/ihl/items_blocks/ItemSubstance.java b/ihl/items_blocks/ItemSubstance.java index 9c55e36..507e65b 100644 --- a/ihl/items_blocks/ItemSubstance.java +++ b/ihl/items_blocks/ItemSubstance.java @@ -1,5 +1,12 @@ package ihl.items_blocks; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.item.IC2Items; import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.Recipes; @@ -10,11 +17,6 @@ import ihl.interfaces.ItemMiniGUI; import ihl.utils.IHLUtils; import ihl.worldgen.ores.IHLFluid.IHLFluidType; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -27,12 +29,9 @@ import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemSubstance extends Item implements IItemHasMiniGUI { diff --git a/ihl/items_blocks/MachineBaseBlock.java b/ihl/items_blocks/MachineBaseBlock.java index 6276e93..aef567c 100644 --- a/ihl/items_blocks/MachineBaseBlock.java +++ b/ihl/items_blocks/MachineBaseBlock.java @@ -1,5 +1,11 @@ package ihl.items_blocks; +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.tile.IWrenchable; import ic2.core.IC2; import ic2.core.IHasGui; @@ -26,6 +32,7 @@ import ihl.processing.chemistry.LoomTileEntity; import ihl.processing.chemistry.PaperMachineTileEntity; import ihl.processing.chemistry.RefluxCondenserTileEntity; +import ihl.processing.chemistry.SolarEvaporatorTileEntity; import ihl.processing.metallurgy.AchesonFurnanceTileEntity; import ihl.processing.metallurgy.CoilerTileEntity; import ihl.processing.metallurgy.DetonationSprayingMachineTileEntity; @@ -42,10 +49,6 @@ import ihl.processing.metallurgy.WoodenRollingMachinePart1TileEntity; import ihl.processing.metallurgy.WoodenRollingMachinePart2TileEntity; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -64,13 +67,10 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class MachineBaseBlock extends Block implements ITileEntityProvider { - MachineType type; + public MachineType type; private static List instances = new ArrayList(); @SideOnly(Side.CLIENT) @@ -80,7 +80,7 @@ public class MachineBaseBlock extends Block implements ITileEntityProvider { textureLeftMachineCasing, textureTopMachineCasing, textureRightMachineCasing, textureFrontMachineCasing, textureFrontPaperMachine, textureBackMachineCasing, bronzeTubTop, bronzeTubSide, steel, redPaint, greenPaint, rubberInsulatedCase, powerPort, dosingPumpBack, dosingPumpLeftSide, dosingPumpRightSide, - dosingPumpTop, dosingPumpFront; + dosingPumpTop, dosingPumpFront, solarEvaporatorSide; public MachineBaseBlock(MachineType type1) { super(Material.iron); @@ -143,17 +143,20 @@ public void onBlockPreDestroy(World world, int x, int y, int z, int meta) { @Override public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list, Entity entity) { + float height = 1f; switch (this.type) { + case SolarEvaporator: + height = 0.5f; case BronzeTub: this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.1F, 1.0F, 1.0F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.1F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.1F); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, height, 0.1F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.9F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + this.setBlockBounds(0.9F, 0.0F, 0.0F, 1.0F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); - this.setBlockBounds(0.0F, 0.0F, 0.9F, 1.0F, 1.0F, 1.0F); + this.setBlockBounds(0.0F, 0.0F, 0.9F, 1.0F, height, 1.0F); super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity); this.setBlockBoundsForItemRender(); break; @@ -165,7 +168,12 @@ public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAligne @Override public void setBlockBoundsForItemRender() { - this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + if(this.type.equals(MachineType.SolarEvaporator)){ + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5f, 1.0F); + } + else { + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } } public static void init() { @@ -239,6 +247,7 @@ public void registerBlockIcons(IIconRegister par1IconRegister) { this.dosingPumpRightSide = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpRight"); this.dosingPumpTop = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpTop"); this.dosingPumpFront = par1IconRegister.registerIcon(IHLModInfo.MODID + ":dosingPumpFront"); + this.solarEvaporatorSide = par1IconRegister.registerIcon(IHLModInfo.MODID + ":solarEvaporatorSide"); } @Override @@ -364,6 +373,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case AchesonFurnace: return this.blockIcon; case MuffleFurnace: @@ -391,6 +402,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -415,6 +428,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -437,6 +452,7 @@ public IIcon getIconFromFacing(int facing, int side) { case 3: switch (this.type) { case BronzeTub: + case SolarEvaporator: return this.bronzeTubTop; case AchesonFurnace: return this.textureTopAchesonFurnance; @@ -465,6 +481,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case WireMill: @@ -488,6 +506,8 @@ public IIcon getIconFromFacing(int facing, int side) { switch (this.type) { case BronzeTub: return this.bronzeTubSide; + case SolarEvaporator: + return this.solarEvaporatorSide; case LeadOven: return this.textureSideGoldFurnace; case CryogenicDistiller: @@ -528,6 +548,7 @@ public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m } public enum MachineType { + SolarEvaporator("solarEvaporator", SolarEvaporatorTileEntity.class, false, true, null), DosingPump("dosingPump", DosingPumpTileEntity.class, true, null), IronWorkbench("ironWorkbench", IronWorkbenchTileEntity.class, false, true, null), ElectrolysisBath("electrolysisBath", ElectrolysisBathTileEntity.class, false, IHLUtils @@ -630,6 +651,8 @@ public boolean renderAsNormalBlock() { @SideOnly(Side.CLIENT) public IIcon getAdditionalIconsForBlockRenderer(int flag) { switch (this.type) { + case SolarEvaporator: + return this.solarEvaporatorSide; case BronzeTub: return this.bronzeTubSide; default: diff --git a/ihl/model/CableHolderSelectionBoxSpecialRenderer.java b/ihl/model/CableHolderSelectionBoxSpecialRenderer.java index d06f050..e878a78 100644 --- a/ihl/model/CableHolderSelectionBoxSpecialRenderer.java +++ b/ihl/model/CableHolderSelectionBoxSpecialRenderer.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.flexible_cable.AnchorTileEntity; import ihl.interfaces.ISelectionBoxSpecialRenderer; import ihl.utils.IHLUtils; @@ -11,11 +15,6 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.MovingObjectPosition; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class CableHolderSelectionBoxSpecialRenderer implements ISelectionBoxSpecialRenderer { diff --git a/ihl/model/FlexibleCableItemRender.java b/ihl/model/FlexibleCableItemRender.java index fab019c..e11a253 100644 --- a/ihl/model/FlexibleCableItemRender.java +++ b/ihl/model/FlexibleCableItemRender.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.items_blocks.FlexibleCableItem; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; @@ -11,11 +15,6 @@ import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class FlexibleCableItemRender implements IItemRenderer { private ModelTube model; diff --git a/ihl/model/FluidRenderer.java b/ihl/model/FluidRenderer.java index 87b1abe..674e4ea 100644 --- a/ihl/model/FluidRenderer.java +++ b/ihl/model/FluidRenderer.java @@ -15,17 +15,17 @@ import java.util.HashMap; import java.util.Map; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.util.IIcon; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.init.Blocks; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; diff --git a/ihl/model/IHLBlockRenderer.java b/ihl/model/IHLBlockRenderer.java index 2244ab7..81efbd9 100644 --- a/ihl/model/IHLBlockRenderer.java +++ b/ihl/model/IHLBlockRenderer.java @@ -1,19 +1,18 @@ package ihl.model; -import ihl.handpump.BlockWithCoordinates; - import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import net.minecraft.client.renderer.GLAllocation; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.handpump.BlockWithCoordinates; +import net.minecraft.client.renderer.GLAllocation; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.ChunkCache; import net.minecraft.world.World; diff --git a/ihl/model/IHLToolRenderer.java b/ihl/model/IHLToolRenderer.java index dd64731..31758b2 100644 --- a/ihl/model/IHLToolRenderer.java +++ b/ihl/model/IHLToolRenderer.java @@ -1,6 +1,5 @@ package ihl.model; -import ihl.items_blocks.IHLTool; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; diff --git a/ihl/model/ImpregnatingMachineBlockRender.java b/ihl/model/ImpregnatingMachineBlockRender.java index b36f3bd..2602fd0 100644 --- a/ihl/model/ImpregnatingMachineBlockRender.java +++ b/ihl/model/ImpregnatingMachineBlockRender.java @@ -1,17 +1,18 @@ package ihl.model; -import ihl.items_blocks.MachineBaseBlock; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ihl.items_blocks.MachineBaseBlock; +import ihl.items_blocks.MachineBaseBlock.MachineType; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class ImpregnatingMachineBlockRender implements ISimpleBlockRenderingHandler @@ -32,6 +33,7 @@ public int getRenderId() @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderblocks) { + MachineBaseBlock blockmb = (MachineBaseBlock) block; Tessellator tessellator = Tessellator.instance; block.setBlockBoundsForItemRender(); renderblocks.setRenderBoundsFromBlock(block); @@ -62,11 +64,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderblocks.getBlockIconFromSideAndMetadata(block, 5, metadata)); tessellator.draw(); float var11 = 0.0625F; - IIcon innerSideIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerSideIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(0); - } + IIcon innerSideIcon = blockmb.getAdditionalIconsForBlockRenderer(0); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1.0F); renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 1.0F - var11, innerSideIcon); @@ -83,13 +81,11 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB tessellator.setNormal(1.0F, 0.0F, 0.0F); renderblocks.renderFaceXPos(block, var11-1.0F, 0.0D, 0.0D, innerSideIcon); tessellator.draw(); - IIcon innerBottomIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerBottomIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(1); - } + IIcon innerBottomIcon = blockmb.getAdditionalIconsForBlockRenderer(1); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); + if(blockmb.type.equals(MachineType.SolarEvaporator)) + var11 = 0.5625f; renderblocks.renderFaceYPos(block, 0.0D, var11-1.0F, 0.0D, innerBottomIcon); tessellator.draw(); GL11.glTranslatef(0.5F, 0.5F, 0.5F); @@ -98,6 +94,7 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB @Override public boolean renderWorldBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta, RenderBlocks blockRenderer) { + MachineBaseBlock blockmb = (MachineBaseBlock) block; blockRenderer.renderStandardBlock(block, x, y, z); Tessellator var5 = Tessellator.instance; var5.setBrightness(block.getMixedBrightnessForBlock(blockAccess, x, y, z)); @@ -107,21 +104,16 @@ public boolean renderWorldBlock(IBlockAccess blockAccess, int x, int y, int z, B float var9 = (var6 & 255) / 255.0F; float var11; var5.setColorOpaque_F(var7, var8, var9); - IIcon innerSideIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerSideIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(0); - } + IIcon innerSideIcon = blockmb.getAdditionalIconsForBlockRenderer(0); var11 = 0.0625F; + blockRenderer.renderFaceXPos(block, x - 1.0F + var11, y, z, innerSideIcon); blockRenderer.renderFaceXNeg(block, x + 1.0F - var11, y, z, innerSideIcon); blockRenderer.renderFaceZPos(block, x, y, z - 1.0F + var11, innerSideIcon); blockRenderer.renderFaceZNeg(block, x, y, z + 1.0F - var11, innerSideIcon); - IIcon innerBottomIcon = block.getBlockTextureFromSide(0); - if(block instanceof MachineBaseBlock) - { - innerBottomIcon = ((MachineBaseBlock)block).getAdditionalIconsForBlockRenderer(1); - } + IIcon innerBottomIcon = blockmb.getAdditionalIconsForBlockRenderer(1); + if(blockmb.type.equals(MachineType.SolarEvaporator)) + var11 = 0.5625f; blockRenderer.renderFaceYPos(block, x, y - 1.0F + var11, z, innerBottomIcon); return true; } diff --git a/ihl/model/IronWorkbenchBlockRender.java b/ihl/model/IronWorkbenchBlockRender.java index 7e986c9..1af81cf 100644 --- a/ihl/model/IronWorkbenchBlockRender.java +++ b/ihl/model/IronWorkbenchBlockRender.java @@ -2,14 +2,14 @@ import org.lwjgl.opengl.GL11; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.world.IBlockAccess; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.world.IBlockAccess; @SideOnly(value=Side.CLIENT) public class IronWorkbenchBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/RectifierTransformerUnitBlockRender.java b/ihl/model/RectifierTransformerUnitBlockRender.java index 567745f..9f45ee4 100644 --- a/ihl/model/RectifierTransformerUnitBlockRender.java +++ b/ihl/model/RectifierTransformerUnitBlockRender.java @@ -1,10 +1,13 @@ package ihl.model; -import ic2.api.tile.IWrenchable; -import ihl.utils.IHLRenderUtils; - import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.tile.IWrenchable; +import ihl.utils.IHLRenderUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; @@ -12,10 +15,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class RectifierTransformerUnitBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java b/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java index f8a5340..4ce866b 100644 --- a/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java +++ b/ihl/model/RectifierTransformerUnitSelectionBoxSpecialRenderer.java @@ -1,5 +1,9 @@ package ihl.model; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.flexible_cable.RectifierTransformerUnitTileEntity; import ihl.interfaces.ISelectionBoxSpecialRenderer; import net.minecraft.client.Minecraft; @@ -9,11 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(value=Side.CLIENT) public class RectifierTransformerUnitSelectionBoxSpecialRenderer implements ISelectionBoxSpecialRenderer { diff --git a/ihl/model/RefluxCondenserBlockRender.java b/ihl/model/RefluxCondenserBlockRender.java index ec70021..c9021b9 100644 --- a/ihl/model/RefluxCondenserBlockRender.java +++ b/ihl/model/RefluxCondenserBlockRender.java @@ -1,10 +1,13 @@ package ihl.model; -import ic2.api.tile.IWrenchable; -import ihl.utils.IHLRenderUtils; - import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.api.tile.IWrenchable; +import ihl.utils.IHLRenderUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; @@ -12,10 +15,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; -import cpw.mods.fml.client.registry.RenderingRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value=Side.CLIENT) public class RefluxCondenserBlockRender implements ISimpleBlockRenderingHandler diff --git a/ihl/model/UniversalTileRender.java b/ihl/model/UniversalTileRender.java index 049d465..d3cb4c6 100644 --- a/ihl/model/UniversalTileRender.java +++ b/ihl/model/UniversalTileRender.java @@ -1,9 +1,4 @@ package ihl.model; -import net.minecraft.client.model.ModelBase; -import net.minecraft.client.model.ModelRenderer; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; @@ -11,6 +6,11 @@ import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; import ihl.flexible_cable.IronWorkbenchModel; +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class UniversalTileRender extends TileEntitySpecialRenderer{ private ModelBase model = new IronWorkbenchModel(); diff --git a/ihl/nei_integration/AchesonFurnaceRecipeHandler.java b/ihl/nei_integration/AchesonFurnaceRecipeHandler.java index 959991e..2ffa450 100644 --- a/ihl/nei_integration/AchesonFurnaceRecipeHandler.java +++ b/ihl/nei_integration/AchesonFurnaceRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class AchesonFurnaceRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/CrucibleRecipeHandler.java b/ihl/nei_integration/CrucibleRecipeHandler.java index acd2849..87bd6a2 100644 --- a/ihl/nei_integration/CrucibleRecipeHandler.java +++ b/ihl/nei_integration/CrucibleRecipeHandler.java @@ -10,7 +10,6 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class CrucibleRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java b/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java index 5280d37..e821bef 100644 --- a/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java +++ b/ihl/nei_integration/DetonationSprayingMachineRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class DetonationSprayingMachineRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java b/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java index 6006aa0..349601a 100644 --- a/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java +++ b/ihl/nei_integration/ElectricEvaporatorRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ElectricEvaporatorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ElectrolysisBathRecipeHandler.java b/ihl/nei_integration/ElectrolysisBathRecipeHandler.java index 381c141..bf91f03 100644 --- a/ihl/nei_integration/ElectrolysisBathRecipeHandler.java +++ b/ihl/nei_integration/ElectrolysisBathRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ElectrolysisBathRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/EvaporatorRecipeHandler.java b/ihl/nei_integration/EvaporatorRecipeHandler.java index 8bf9431..54eb4e9 100644 --- a/ihl/nei_integration/EvaporatorRecipeHandler.java +++ b/ihl/nei_integration/EvaporatorRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class EvaporatorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/ExtruderRecipeHandler.java b/ihl/nei_integration/ExtruderRecipeHandler.java index c00c471..64dd072 100644 --- a/ihl/nei_integration/ExtruderRecipeHandler.java +++ b/ihl/nei_integration/ExtruderRecipeHandler.java @@ -3,13 +3,11 @@ import java.awt.Rectangle; import java.util.Map; -import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; import ihl.processing.metallurgy.ExtruderGui; import ihl.processing.metallurgy.ExtruderTileEntity; import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ExtruderRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java b/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java index 00aef05..2f9c581 100644 --- a/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java +++ b/ihl/nei_integration/FluidizedBedReactorRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class FluidizedBedReactorRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/FractionationColumnRecipeHandler.java b/ihl/nei_integration/FractionationColumnRecipeHandler.java index 399adca..693dce2 100644 --- a/ihl/nei_integration/FractionationColumnRecipeHandler.java +++ b/ihl/nei_integration/FractionationColumnRecipeHandler.java @@ -6,7 +6,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class FractionationColumnRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java b/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java index 8d5a0c4..eef6b75 100644 --- a/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java +++ b/ihl/nei_integration/GasWeldingStationGasRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class GasWeldingStationGasRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/IHLBlockHighlightHandler.java b/ihl/nei_integration/IHLBlockHighlightHandler.java index 4862a9b..1fc3666 100644 --- a/ihl/nei_integration/IHLBlockHighlightHandler.java +++ b/ihl/nei_integration/IHLBlockHighlightHandler.java @@ -1,16 +1,16 @@ package ihl.nei_integration; +import java.util.List; + import codechicken.nei.api.IHighlightHandler; import codechicken.nei.api.ItemInfo; +import ihl.flexible_cable.RectifierTransformerUnitTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import ihl.flexible_cable.RectifierTransformerUnitTileEntity; - -import java.util.List; public class IHLBlockHighlightHandler implements IHighlightHandler { diff --git a/ihl/nei_integration/IHLPositionedStack.java b/ihl/nei_integration/IHLPositionedStack.java index 5c81ba9..f818b17 100644 --- a/ihl/nei_integration/IHLPositionedStack.java +++ b/ihl/nei_integration/IHLPositionedStack.java @@ -1,7 +1,7 @@ package ihl.nei_integration; -import ihl.recipes.RecipeOutputItemStack; import codechicken.nei.PositionedStack; +import ihl.recipes.RecipeOutputItemStack; public class IHLPositionedStack extends PositionedStack { diff --git a/ihl/nei_integration/IHLRecipeHandler.java b/ihl/nei_integration/IHLRecipeHandler.java index a0d7f7f..a263ae8 100644 --- a/ihl/nei_integration/IHLRecipeHandler.java +++ b/ihl/nei_integration/IHLRecipeHandler.java @@ -1,5 +1,14 @@ package ihl.nei_integration; +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -7,14 +16,7 @@ import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeOutput; import ic2.core.util.StackUtil; -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import net.minecraft.item.ItemStack; -import org.lwjgl.opengl.GL11; public abstract class IHLRecipeHandler extends TemplateRecipeHandler { diff --git a/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java b/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java index e749617..9abad4b 100644 --- a/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java +++ b/ihl/nei_integration/ImpregnatingMachineRecipeHandler.java @@ -9,7 +9,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class ImpregnatingMachineRecipeHandler extends MachineRecipeHandler diff --git a/ihl/nei_integration/InjectionMoldRecipeHandler.java b/ihl/nei_integration/InjectionMoldRecipeHandler.java index 97d03d2..e125b54 100644 --- a/ihl/nei_integration/InjectionMoldRecipeHandler.java +++ b/ihl/nei_integration/InjectionMoldRecipeHandler.java @@ -7,7 +7,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class InjectionMoldRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/IronWorkbenchRecipeHandler.java b/ihl/nei_integration/IronWorkbenchRecipeHandler.java index f0de0c5..c060bb7 100644 --- a/ihl/nei_integration/IronWorkbenchRecipeHandler.java +++ b/ihl/nei_integration/IronWorkbenchRecipeHandler.java @@ -1,26 +1,25 @@ package ihl.nei_integration; -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import ic2.api.recipe.IRecipeInput; -import ihl.recipes.IronWorkbenchRecipe; -import ihl.utils.IHLUtils; - import java.awt.Rectangle; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; import org.lwjgl.opengl.GL11; +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.NEIServerUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.TemplateRecipeHandler; +import ic2.api.recipe.IRecipeInput; import ihl.flexible_cable.IronWorkbenchGui; import ihl.flexible_cable.IronWorkbenchTileEntity; import ihl.interfaces.IWire; +import ihl.recipes.IronWorkbenchRecipe; +import ihl.utils.IHLUtils; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; public class IronWorkbenchRecipeHandler extends TemplateRecipeHandler { diff --git a/ihl/nei_integration/LabElectrolyzerRecipeHandler.java b/ihl/nei_integration/LabElectrolyzerRecipeHandler.java index ea705f6..a9df742 100644 --- a/ihl/nei_integration/LabElectrolyzerRecipeHandler.java +++ b/ihl/nei_integration/LabElectrolyzerRecipeHandler.java @@ -11,7 +11,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class LabElectrolyzerRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/LeadOvenRecipeHandler.java b/ihl/nei_integration/LeadOvenRecipeHandler.java index 98861a2..8a7f686 100644 --- a/ihl/nei_integration/LeadOvenRecipeHandler.java +++ b/ihl/nei_integration/LeadOvenRecipeHandler.java @@ -8,7 +8,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.StatCollector; public class LeadOvenRecipeHandler extends MachineRecipeHandler { @Override diff --git a/ihl/nei_integration/MachineRecipeHandler.java b/ihl/nei_integration/MachineRecipeHandler.java index 9373738..f4f9412 100644 --- a/ihl/nei_integration/MachineRecipeHandler.java +++ b/ihl/nei_integration/MachineRecipeHandler.java @@ -1,5 +1,13 @@ package ihl.nei_integration; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.lwjgl.opengl.GL11; + import codechicken.lib.gui.GuiDraw; import codechicken.nei.NEIServerUtils; import codechicken.nei.PositionedStack; @@ -13,13 +21,6 @@ import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -30,8 +31,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import org.lwjgl.opengl.GL11; - public abstract class MachineRecipeHandler extends TemplateRecipeHandler { protected int ticks; diff --git a/ihl/nei_integration/NEIIHLConfig.java b/ihl/nei_integration/NEIIHLConfig.java index 8047b27..c1867a7 100644 --- a/ihl/nei_integration/NEIIHLConfig.java +++ b/ihl/nei_integration/NEIIHLConfig.java @@ -1,5 +1,8 @@ package ihl.nei_integration; +import codechicken.nei.api.API; +import codechicken.nei.api.IConfigureNEI; +import codechicken.nei.api.ItemInfo; import ihl.IHLModInfo; import ihl.processing.chemistry.ChemicalReactorGui; import ihl.processing.chemistry.CryogenicDistillerGui; @@ -19,9 +22,6 @@ import ihl.processing.metallurgy.RollingMachineGui; import ihl.processing.metallurgy.WireMillGui; import ihl.processing.metallurgy.WoodenRollingMachineGui; -import codechicken.nei.api.API; -import codechicken.nei.api.IConfigureNEI; -import codechicken.nei.api.ItemInfo; public class NEIIHLConfig implements IConfigureNEI { diff --git a/ihl/nei_integration/PaperMachineRecipeHandler.java b/ihl/nei_integration/PaperMachineRecipeHandler.java index 141872b..0a5fc90 100644 --- a/ihl/nei_integration/PaperMachineRecipeHandler.java +++ b/ihl/nei_integration/PaperMachineRecipeHandler.java @@ -3,7 +3,6 @@ import java.awt.Rectangle; import java.util.Map; -import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect; import ihl.processing.chemistry.PaperMachineGui; import ihl.processing.chemistry.PaperMachineTileEntity; import ihl.recipes.UniversalRecipeInput; diff --git a/ihl/nei_integration/WireMillRecipeHandler.java b/ihl/nei_integration/WireMillRecipeHandler.java index 6d4ca5f..aebf85e 100644 --- a/ihl/nei_integration/WireMillRecipeHandler.java +++ b/ihl/nei_integration/WireMillRecipeHandler.java @@ -6,7 +6,6 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; - import ihl.processing.metallurgy.WireMillGui; import ihl.processing.metallurgy.WireMillTileEntity; import ihl.recipes.UniversalRecipeInput; diff --git a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java index 84a931b..bfed5c9 100644 --- a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java +++ b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java @@ -1,11 +1,11 @@ package ihl.processing.chemistry; -import ic2.api.recipe.IRecipeInput; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlot; import java.util.ArrayList; import java.util.List; +import ic2.api.recipe.IRecipeInput; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -13,7 +13,7 @@ public class ApparatusProcessableInvSlot extends InvSlot { public ApparatusProcessableInvSlot(TileEntityInventory base1, String name1, int oldStartIndex1, Access access1, int count, int stackSizeLimit1) { - super(base1, name1, oldStartIndex1, access1, count); + super(base1, name1, oldStartIndex1, Access.I, count); this.setStackSizeLimit(stackSizeLimit1); } diff --git a/ihl/processing/chemistry/BatteryItem.java b/ihl/processing/chemistry/BatteryItem.java index 10cd7cd..b9c5435 100644 --- a/ihl/processing/chemistry/BatteryItem.java +++ b/ihl/processing/chemistry/BatteryItem.java @@ -8,7 +8,6 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import ic2.api.item.IItemHudInfo; diff --git a/ihl/processing/chemistry/ChemicalReactorContainer.java b/ihl/processing/chemistry/ChemicalReactorContainer.java index a1cc0b4..a426765 100644 --- a/ihl/processing/chemistry/ChemicalReactorContainer.java +++ b/ihl/processing/chemistry/ChemicalReactorContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class ChemicalReactorContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/ChemicalReactorGui.java b/ihl/processing/chemistry/ChemicalReactorGui.java index 029281b..de22f76 100644 --- a/ihl/processing/chemistry/ChemicalReactorGui.java +++ b/ihl/processing/chemistry/ChemicalReactorGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ChemicalReactorGui extends GuiContainer { diff --git a/ihl/processing/chemistry/ChemicalReactorTileEntity.java b/ihl/processing/chemistry/ChemicalReactorTileEntity.java index 2630ed2..a124265 100644 --- a/ihl/processing/chemistry/ChemicalReactorTileEntity.java +++ b/ihl/processing/chemistry/ChemicalReactorTileEntity.java @@ -3,26 +3,15 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; @@ -31,6 +20,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { @@ -49,7 +48,7 @@ public ChemicalReactorTileEntity() { this.drainInputSlot = new InvSlotConsumableLiquidIHL(this, "drainInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.TOP, InvSlotConsumableLiquid.OpType.Drain); this.fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill); this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 1); - this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.IO, 2, 64); + this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.I, 2, 64); } @Override diff --git a/ihl/processing/chemistry/CryogenicDistillerContainer.java b/ihl/processing/chemistry/CryogenicDistillerContainer.java index d04ec4e..988b844 100644 --- a/ihl/processing/chemistry/CryogenicDistillerContainer.java +++ b/ihl/processing/chemistry/CryogenicDistillerContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class CryogenicDistillerContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java index 9bd11a3..e197088 100644 --- a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java +++ b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlotConsumableLiquid; @@ -25,8 +27,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/DosingPumpGui.java b/ihl/processing/chemistry/DosingPumpGui.java index 090bdec..dde4f13 100644 --- a/ihl/processing/chemistry/DosingPumpGui.java +++ b/ihl/processing/chemistry/DosingPumpGui.java @@ -1,29 +1,27 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; - -import cpw.mods.fml.relauncher.SideOnly; -import ic2.core.IC2; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.StatCollector; - import java.awt.event.KeyEvent; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.ClientProxy; import ihl.IHLMod; import ihl.utils.IHLRenderUtils; import ihl.utils.IHLUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; @SideOnly(Side.CLIENT) public class DosingPumpGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIDosingPump.png"); private DosingPumpContainer container; private GuiTextField setpointTextField; + private int lastFluidAmountSetpoint = -1; private final static int TANK_HEIGHT = 58; public DosingPumpGui(DosingPumpContainer container1) { @@ -38,6 +36,10 @@ public DosingPumpGui(DosingPumpContainer container1) { @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { + if(lastFluidAmountSetpoint!= this.container.tileEntity.fluidAmountSetpoint){ + setpointTextField.setText(Integer.toString(this.container.tileEntity.fluidAmountSetpoint)); + lastFluidAmountSetpoint= this.container.tileEntity.fluidAmountSetpoint; + } int xOffset = (this.width - xSize) / 2; int yOffset = (this.height - ySize) / 2; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/ihl/processing/chemistry/DosingPumpTileEntity.java b/ihl/processing/chemistry/DosingPumpTileEntity.java index d676bf9..e1e4996 100644 --- a/ihl/processing/chemistry/DosingPumpTileEntity.java +++ b/ihl/processing/chemistry/DosingPumpTileEntity.java @@ -1,9 +1,18 @@ package ihl.processing.chemistry; import java.util.List; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlotConsumableLiquid; +import ic2.core.block.invslot.InvSlotOutput; +import ihl.processing.invslots.InvSlotConsumableLiquidIHL; +import ihl.processing.metallurgy.BasicElectricMotorTileEntity; +import ihl.utils.IHLFluidTank; +import ihl.utils.IHLUtils; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -14,15 +23,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.block.invslot.InvSlot; -import ic2.core.block.invslot.InvSlotConsumableLiquid; -import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.invslots.InvSlotConsumableLiquidIHL; -import ihl.processing.metallurgy.BasicElectricMotorTileEntity; -import ihl.utils.IHLFluidTank; -import ihl.utils.IHLUtils; public class DosingPumpTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { public final InvSlotConsumableLiquidIHL drainInputSlot; diff --git a/ihl/processing/chemistry/ElectricEvaporatorGui.java b/ihl/processing/chemistry/ElectricEvaporatorGui.java index 016335f..4a36631 100644 --- a/ihl/processing/chemistry/ElectricEvaporatorGui.java +++ b/ihl/processing/chemistry/ElectricEvaporatorGui.java @@ -1,8 +1,11 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -11,10 +14,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; - @SideOnly(Side.CLIENT) public class ElectricEvaporatorGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIElectricEvaporator.png"); diff --git a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java index 1b5b647..cdf3524 100644 --- a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java +++ b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java @@ -6,15 +6,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -25,14 +16,22 @@ import ic2.core.IHasGui; import ic2.core.audio.AudioSource; import ic2.core.block.invslot.InvSlot; -import ic2.core.block.invslot.InvSlotUpgrade; import ic2.core.block.invslot.InvSlot.Access; +import ic2.core.block.invslot.InvSlotUpgrade; import ic2.core.upgrade.IUpgradableBlock; import ic2.core.upgrade.IUpgradeItem; import ic2.core.upgrade.UpgradableProperty; import ihl.IHLMod; import ihl.utils.IHLInvSlotDischarge; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implements IEnergySink, IUpgradableBlock, INetworkTileEntityEventListener { diff --git a/ihl/processing/chemistry/ElectrolysisBathGui.java b/ihl/processing/chemistry/ElectrolysisBathGui.java index 89b8ddb..404ef94 100644 --- a/ihl/processing/chemistry/ElectrolysisBathGui.java +++ b/ihl/processing/chemistry/ElectrolysisBathGui.java @@ -1,16 +1,15 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.IC2; +import ihl.utils.GuiMultiTextureButton; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import ihl.utils.GuiMultiTextureButton; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ElectrolysisBathGui extends GuiContainer { diff --git a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java index f8fae63..8a498b6 100644 --- a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java +++ b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java @@ -6,16 +6,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -25,13 +15,22 @@ import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; import ihl.flexible_cable.FlexibleCableHolderBaseTileEntity; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.UniversalRecipeInput; import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntity implements IHasGui, INetworkClientTileEntityEventListener, IFluidHandler { diff --git a/ihl/processing/chemistry/EvaporatorGui.java b/ihl/processing/chemistry/EvaporatorGui.java index 12edba9..05f7c31 100644 --- a/ihl/processing/chemistry/EvaporatorGui.java +++ b/ihl/processing/chemistry/EvaporatorGui.java @@ -1,8 +1,11 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.util.IIcon; @@ -11,10 +14,6 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; - @SideOnly(Side.CLIENT) public class EvaporatorGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUISolidFuelEvaporator.png"); diff --git a/ihl/processing/chemistry/EvaporatorTileEntity.java b/ihl/processing/chemistry/EvaporatorTileEntity.java index dbdf2e1..279fa17 100644 --- a/ihl/processing/chemistry/EvaporatorTileEntity.java +++ b/ihl/processing/chemistry/EvaporatorTileEntity.java @@ -5,16 +5,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; import ic2.api.item.IC2Items; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -31,6 +21,15 @@ import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implements IHasGui { @@ -142,7 +141,7 @@ public void updateEntityServer() { IHLUtils.handleFluidSlotsBehaviour(fillItemsSlot, fluidItemsSlot, emptyFluidItemsSlot, fluidTank); } - if (this.fuel <= 0 && this.canOperate()) + if (this.fuel <= 0 && this.canOperate() && this.fuelSlot instanceof InvSlotConsumableFuel) { this.fuel = this.maxFuel = ((InvSlotConsumableFuel) this.fuelSlot).consumeFuel(); } diff --git a/ihl/processing/chemistry/ExtruderModel.java b/ihl/processing/chemistry/ExtruderModel.java index 25e1263..4d4688a 100644 --- a/ihl/processing/chemistry/ExtruderModel.java +++ b/ihl/processing/chemistry/ExtruderModel.java @@ -1,8 +1,8 @@ package ihl.processing.chemistry; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class ExtruderModel extends ModelBase { diff --git a/ihl/processing/chemistry/FluidizedBedReactorContainer.java b/ihl/processing/chemistry/FluidizedBedReactorContainer.java index f8ea002..8b7aa47 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorContainer.java +++ b/ihl/processing/chemistry/FluidizedBedReactorContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class FluidizedBedReactorContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/FluidizedBedReactorGui.java b/ihl/processing/chemistry/FluidizedBedReactorGui.java index d79a09d..95ba8f0 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorGui.java +++ b/ihl/processing/chemistry/FluidizedBedReactorGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class FluidizedBedReactorGui extends GuiContainer { diff --git a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java index bb6cf1e..4961fc6 100644 --- a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java +++ b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java @@ -3,25 +3,14 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; @@ -31,6 +20,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/FractionatorBottomTileEntity.java b/ihl/processing/chemistry/FractionatorBottomTileEntity.java index 2f3b43f..288924e 100644 --- a/ihl/processing/chemistry/FractionatorBottomTileEntity.java +++ b/ihl/processing/chemistry/FractionatorBottomTileEntity.java @@ -6,14 +6,6 @@ import java.util.List; import java.util.Map; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.energy.tile.IHeatSource; import ic2.core.IC2; import ic2.core.block.TileEntityInventory; @@ -24,8 +16,17 @@ import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; import ihl.worldgen.ores.IHLFluid; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; -public class FractionatorBottomTileEntity extends TileEntityInventory +public class FractionatorBottomTileEntity extends TileEntityInventory implements IFluidHandler { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("fractionator"); private static float kF = 24000F; @@ -385,4 +386,24 @@ public boolean shouldRenderInPass(int pass) { return pass==0; } + + @Override + public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { + return this.fluidTank.drain(resource, doDrain); + } + + @Override + public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { + return this.fluidTank.drain(maxDrain, doDrain); + } + + @Override + public boolean canFill(ForgeDirection from, Fluid fluid) { + return true; + } + + @Override + public boolean canDrain(ForgeDirection from, Fluid fluid) { + return true; + } } \ No newline at end of file diff --git a/ihl/processing/chemistry/FractionatorSectionTileEntity.java b/ihl/processing/chemistry/FractionatorSectionTileEntity.java index ddd3f31..e71c453 100644 --- a/ihl/processing/chemistry/FractionatorSectionTileEntity.java +++ b/ihl/processing/chemistry/FractionatorSectionTileEntity.java @@ -139,7 +139,10 @@ public int fill(ForgeDirection direction, FluidStack fluidStack, boolean doFill) @Override public FluidTankInfo[] getTankInfo(ForgeDirection arg0) { - return columnBottom.getTankInfo(arg0); + if(columnBottom!=null) + return columnBottom.getTankInfo(arg0); + else + return new FluidTankInfo[] {new FluidTankInfo(null, 8000)}; } } diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java index 3227ab7..186b606 100644 --- a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java +++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java @@ -2,15 +2,15 @@ import java.util.List; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ihl.interfaces.IWorkspaceElement; import ihl.processing.metallurgy.BasicElectricMotorTileEntity; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; public class GaedesMercuryRotaryPumpTileEntity extends BasicElectricMotorTileEntity implements IWorkspaceElement{ diff --git a/ihl/processing/chemistry/LabElectrolyzerGui.java b/ihl/processing/chemistry/LabElectrolyzerGui.java index 8690257..3eb14a3 100644 --- a/ihl/processing/chemistry/LabElectrolyzerGui.java +++ b/ihl/processing/chemistry/LabElectrolyzerGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class LabElectrolyzerGui extends GuiContainer { diff --git a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java index 11647d6..19348b6 100644 --- a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java +++ b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java @@ -3,18 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; @@ -28,6 +19,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("labelectrolyzer"); diff --git a/ihl/processing/chemistry/LeadOvenGui.java b/ihl/processing/chemistry/LeadOvenGui.java index 0c35a21..72fb107 100644 --- a/ihl/processing/chemistry/LeadOvenGui.java +++ b/ihl/processing/chemistry/LeadOvenGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class LeadOvenGui extends GuiContainer { diff --git a/ihl/processing/chemistry/LeadOvenTileEntity.java b/ihl/processing/chemistry/LeadOvenTileEntity.java index c2067d8..95636ad 100644 --- a/ihl/processing/chemistry/LeadOvenTileEntity.java +++ b/ihl/processing/chemistry/LeadOvenTileEntity.java @@ -6,26 +6,16 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.IHasGui; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableFuel; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.RecipeOutputItemStack; @@ -34,6 +24,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class LeadOvenTileEntity extends TileEntityInventory implements IHasGui, IFluidHandler { public final InvSlotConsumableFuel fuelSlot; diff --git a/ihl/processing/chemistry/LoomModel.java b/ihl/processing/chemistry/LoomModel.java index afef73d..31c2724 100644 --- a/ihl/processing/chemistry/LoomModel.java +++ b/ihl/processing/chemistry/LoomModel.java @@ -1,8 +1,8 @@ package ihl.processing.chemistry; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class LoomModel extends ModelBase { diff --git a/ihl/processing/chemistry/LoomTileEntity.java b/ihl/processing/chemistry/LoomTileEntity.java index 4ff9bc4..8432a2d 100644 --- a/ihl/processing/chemistry/LoomTileEntity.java +++ b/ihl/processing/chemistry/LoomTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; @@ -11,7 +13,6 @@ import ic2.core.IHasGui; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot.Access; -import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.invslots.IHLInvSlotOutput; import ihl.recipes.RecipeInputWire; import ihl.recipes.UniversalRecipeInput; @@ -21,8 +22,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LoomTileEntity extends TileEntityInventory implements IHasGui, INetworkClientTileEntityEventListener { diff --git a/ihl/processing/chemistry/PaperMachineContainer.java b/ihl/processing/chemistry/PaperMachineContainer.java index 0969649..01db6fd 100644 --- a/ihl/processing/chemistry/PaperMachineContainer.java +++ b/ihl/processing/chemistry/PaperMachineContainer.java @@ -2,12 +2,9 @@ import java.util.List; -import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; import net.minecraftforge.fluids.FluidStack; public class PaperMachineContainer extends BasicElectricMotorContainer { diff --git a/ihl/processing/chemistry/PaperMachineGui.java b/ihl/processing/chemistry/PaperMachineGui.java index b65f041..8fea247 100644 --- a/ihl/processing/chemistry/PaperMachineGui.java +++ b/ihl/processing/chemistry/PaperMachineGui.java @@ -1,12 +1,12 @@ package ihl.processing.chemistry; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class PaperMachineGui extends GuiContainer { diff --git a/ihl/processing/chemistry/PaperMachineTileEntity.java b/ihl/processing/chemistry/PaperMachineTileEntity.java index eb28314..dddd306 100644 --- a/ihl/processing/chemistry/PaperMachineTileEntity.java +++ b/ihl/processing/chemistry/PaperMachineTileEntity.java @@ -3,19 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlot; @@ -29,6 +19,16 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class PaperMachineTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler { diff --git a/ihl/processing/chemistry/RefluxCondenserTileEntity.java b/ihl/processing/chemistry/RefluxCondenserTileEntity.java index b6cbcb0..83eb108 100644 --- a/ihl/processing/chemistry/RefluxCondenserTileEntity.java +++ b/ihl/processing/chemistry/RefluxCondenserTileEntity.java @@ -139,7 +139,10 @@ public int fill(ForgeDirection direction, FluidStack fluidStack, boolean doFill) @Override public FluidTankInfo[] getTankInfo(ForgeDirection arg0) { - return columnBottom.getTankInfo(arg0); + if(columnBottom!=null) + return columnBottom.getTankInfo(arg0); + else + return new FluidTankInfo[] {new FluidTankInfo(null, 8000)}; } } diff --git a/ihl/processing/chemistry/SolarEvaporatorContainer.java b/ihl/processing/chemistry/SolarEvaporatorContainer.java new file mode 100644 index 0000000..4ecf44d --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorContainer.java @@ -0,0 +1,112 @@ +package ihl.processing.chemistry; + +import ic2.core.ContainerBase; +import ic2.core.slot.SlotInvSlot; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class SolarEvaporatorContainer extends ContainerBase { + + protected SolarEvaporatorTileEntity tileEntity; + public int lastFluidAmount = -1; + public int lastFuel = -1; + public short lastProgress = -1; + private final static int height = 166; + public int lastNumberOfFluids = -1; + public int lastVisibleFluidID = -1; + public int lastVisibleFluidAmount = -1; + + public SolarEvaporatorContainer(EntityPlayer entityPlayer, SolarEvaporatorTileEntity tileEntity1) { + super(tileEntity1); + this.tileEntity = tileEntity1; + int col; + + for (col = 0; col < 3; ++col) { + for (int col1 = 0; col1 < 9; ++col1) { + this.addSlotToContainer( + new Slot(entityPlayer.inventory, col1 + col * 9 + 9, 8 + col1 * 18, height + -82 + col * 18)); + } + } + + for (col = 0; col < 9; ++col) { + this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24)); + } + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fluidItemsSlot, 0, 44, 14)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.emptyFluidItemsSlot, 0, 44, 32)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.fillItemsSlot, 0, 44, 50)); + this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 0, 117, 32)); + + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + for (int i = 0; i < this.crafters.size(); ++i) { + ICrafting icrafting = (ICrafting) this.crafters.get(i); + + if (this.tileEntity.getFluidTank().getFluid() != null + && this.tileEntity.getFluidTank().getFluidAmount() != this.lastFluidAmount) { + icrafting.sendProgressBarUpdate(this, 0, this.tileEntity.getFluidTank().getFluid().getFluid().getID()); + icrafting.sendProgressBarUpdate(this, 1, this.tileEntity.getFluidTank().getFluidAmount()); + } + + if (this.tileEntity.fuel != this.lastFuel) { + icrafting.sendProgressBarUpdate(this, 2, this.tileEntity.fuel); + } + + if (this.tileEntity.progress != this.lastProgress) { + icrafting.sendProgressBarUpdate(this, 3, this.tileEntity.progress); + } + if (this.tileEntity.visibleFluidId != this.lastVisibleFluidID) + { + icrafting.sendProgressBarUpdate(this, 4, this.tileEntity.visibleFluidId); + } + if (this.tileEntity.visibleFluidAmount != this.lastVisibleFluidAmount) + { + icrafting.sendProgressBarUpdate(this, 5, this.tileEntity.visibleFluidAmount); + } + } + + this.lastFluidAmount = this.tileEntity.getFluidTank().getFluidAmount(); + this.lastFuel = this.tileEntity.fuel; + this.lastProgress = this.tileEntity.progress; + this.lastVisibleFluidID=this.tileEntity.visibleFluidId; + this.lastVisibleFluidAmount=this.tileEntity.visibleFluidAmount; + } + + @Override + public void updateProgressBar(int index, int value) { + super.updateProgressBar(index, value); + + switch (index) { + case 0: + this.tileEntity.getFluidTank().setFluid(new FluidStack(FluidRegistry.getFluid(value), 1000)); + break; + case 1: + this.tileEntity.getFluidTank() + .setFluid(new FluidStack(this.tileEntity.getFluidTank().getFluid().getFluid(), value)); + break; + case 2: + this.tileEntity.fuel = value; + break; + case 3: + this.tileEntity.progress = (short) value; + break; + case 4: + this.tileEntity.visibleFluidId=value; + break; + case 5: + this.tileEntity.visibleFluidAmount=value; + break; + + } + } + + @Override + public boolean canInteractWith(EntityPlayer var1) { + return tileEntity.isUseableByPlayer(var1); + } +} diff --git a/ihl/processing/chemistry/SolarEvaporatorGui.java b/ihl/processing/chemistry/SolarEvaporatorGui.java new file mode 100644 index 0000000..e97f9e0 --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorGui.java @@ -0,0 +1,78 @@ +package ihl.processing.chemistry; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +@SideOnly(Side.CLIENT) +public class SolarEvaporatorGui extends GuiContainer { + private static final ResourceLocation background = new ResourceLocation("ihl", + "textures/gui/GUISolarEvaporator.png"); + private SolarEvaporatorContainer container; + + public SolarEvaporatorGui(SolarEvaporatorContainer container1) { + // the container is instanciated and passed to the superclass for + // handling + super(container1); + this.container = container1; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + int xOffset = (this.width - xSize) / 2; + int yOffset = (this.height - ySize) / 2; + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.renderEngine.bindTexture(background); + int i1; + if (this.container.tileEntity.getActive()) { + this.drawTexturedModalRect(9, 16, 176, 0, 14, 14); + } + if (this.container.tileEntity.progress > 0) { + i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(18), 18); + this.drawTexturedModalRect(99, 34, 198, 0, i1 + 1, 13); + } + + if (this.container.tileEntity.getTankAmount() > 0) { + FluidStack fluidStack = this.container.tileEntity.getFluidTank().getFluid(); + if (fluidStack != null) { + Fluid fluid = fluidStack.getFluid(); + if (fluid != null) { + + IIcon fluidIcon = fluid.getIcon(); + + if (fluidIcon != null) { + this.mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture); + int liquidHeight = this.container.tileEntity.gaugeLiquidScaled(47); + DrawUtil.drawRepeated(fluidIcon, (82), 16 + 47 - liquidHeight, 12.0D, liquidHeight, + this.zLevel); + this.mc.renderEngine.bindTexture(background); + } + } + String tooltip = StatCollector.translateToLocal(fluidStack.getFluid().getUnlocalizedName()) + ": " + + fluidStack.amount + "mB"; + GuiTooltipHelper.drawAreaTooltip(par1 - 90, par2 - 32, tooltip, xOffset - 8, yOffset - 15, xOffset + 2, + yOffset + 30); + } + } + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + // draw your Gui here, only thing you need to change is the path + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.renderEngine.bindTexture(background); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} \ No newline at end of file diff --git a/ihl/processing/chemistry/SolarEvaporatorTileEntity.java b/ihl/processing/chemistry/SolarEvaporatorTileEntity.java new file mode 100644 index 0000000..947a88a --- /dev/null +++ b/ihl/processing/chemistry/SolarEvaporatorTileEntity.java @@ -0,0 +1,108 @@ +package ihl.processing.chemistry; + +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ihl.interfaces.IFluidTankVisual; +import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.EnumSkyBlock; + +public class SolarEvaporatorTileEntity extends EvaporatorTileEntity implements IFluidTankVisual { + public int visibleFluidId = -1; + public int visibleFluidAmount = 1; + + public SolarEvaporatorTileEntity(){ + super(); + this.fuelSlot = null; + this.maxProgress = 4500; + } + + @Override + public List getNetworkedFields() + { + List ret = super.getNetworkedFields(); + ret.add("visibleFluidId"); + ret.add("visibleFluidAmount"); + return ret; + } + + @Override + public void updateEntityServer() + { + super.updateEntityServer(); + if(this.fluidTank.getFluid()!=null && (visibleFluidId!=this.fluidTank.getFluid().getFluid().getID() || visibleFluidAmount!=this.fluidTank.getFluidAmount())) + { + visibleFluidId = this.fluidTank.getFluid().getFluid().getID(); + visibleFluidAmount = this.fluidTank.getFluidAmount(); + IC2.network.get().updateTileEntityField(this, "visibleFluidId"); + IC2.network.get().updateTileEntityField(this, "visibleFluidAmount"); + } + else if(this.fluidTank.getFluid()==null && visibleFluidId!=-1) + { + visibleFluidId=-1; + IC2.network.get().updateTileEntityField(this, "visibleFluidId"); + } + } + @Override + public boolean isBurning() + { + return this.worldObj.getSkyBlockTypeBrightness(EnumSkyBlock.Sky, xCoord, yCoord, zCoord)>=15; + } + + @Override + public ContainerBase getGuiContainer(EntityPlayer entityPlayer) + { + return new SolarEvaporatorContainer(entityPlayer, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin) + { + return new SolarEvaporatorGui(new SolarEvaporatorContainer(entityPlayer, this)); + } + + @Override + public short getFacing() + { + return 3; + } + + @Override + public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) { + return false; + } + + @Override + public ItemStack getWrenchDrop(EntityPlayer entityPlayer) { + return IHLUtils.getThisModItemStack("solarEvaporator"); + } + + @Override + public int getVisibleFluidId() { + return this.visibleFluidId; + } + + @Override + public int getVisibleFluidAmount() { + return this.visibleFluidAmount; + } + + @Override + public float getRenderLiquidLevel() + { + return (float)this.visibleFluidAmount/(float)this.fluidTank.getCapacity()/2; + } + + @Override + public boolean shouldRenderInPass(int pass) + { + return pass==0; + } +} diff --git a/ihl/processing/invslots/IHLInvSlotOutput.java b/ihl/processing/invslots/IHLInvSlotOutput.java index d683221..d5186e2 100644 --- a/ihl/processing/invslots/IHLInvSlotOutput.java +++ b/ihl/processing/invslots/IHLInvSlotOutput.java @@ -6,15 +6,14 @@ import java.util.Map; import java.util.Map.Entry; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; - import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlotOutput; import ihl.recipes.RecipeOutputItemStack; import ihl.utils.IHLUtils; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; public class IHLInvSlotOutput extends InvSlotOutput { diff --git a/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java b/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java index 0a3b664..7bb6ecc 100644 --- a/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java +++ b/ihl/processing/invslots/InvSlotConsumableLiquidIHL.java @@ -4,16 +4,16 @@ import org.apache.commons.lang3.mutable.MutableObject; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlotConsumableLiquid; +import ic2.core.util.StackUtil; +import ihl.utils.IHLUtils; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlotConsumableLiquid; -import ic2.core.util.StackUtil; -import ihl.utils.IHLUtils; public class InvSlotConsumableLiquidIHL extends InvSlotConsumableLiquid{ diff --git a/ihl/processing/invslots/SlotInvSlotIronWorkbench.java b/ihl/processing/invslots/SlotInvSlotIronWorkbench.java index 94354ea..7f00e06 100644 --- a/ihl/processing/invslots/SlotInvSlotIronWorkbench.java +++ b/ihl/processing/invslots/SlotInvSlotIronWorkbench.java @@ -1,8 +1,9 @@ package ihl.processing.invslots; -import net.minecraft.entity.player.EntityPlayer; import ic2.core.slot.SlotInvSlot; -import ihl.flexible_cable.*; +import ihl.flexible_cable.IronWorkbenchInvSlot; +import ihl.flexible_cable.IronWorkbenchTileEntity; +import net.minecraft.entity.player.EntityPlayer; public class SlotInvSlotIronWorkbench extends SlotInvSlot { diff --git a/ihl/processing/invslots/SlotInvSlotOutputInProgress.java b/ihl/processing/invslots/SlotInvSlotOutputInProgress.java index a1b3937..25c0673 100644 --- a/ihl/processing/invslots/SlotInvSlotOutputInProgress.java +++ b/ihl/processing/invslots/SlotInvSlotOutputInProgress.java @@ -1,8 +1,8 @@ package ihl.processing.invslots; -import net.minecraft.entity.player.EntityPlayer; import ic2.core.slot.SlotInvSlot; import ihl.flexible_cable.IronWorkbenchInvSlot; +import net.minecraft.entity.player.EntityPlayer; public class SlotInvSlotOutputInProgress extends SlotInvSlot { diff --git a/ihl/processing/metallurgy/AchesonFurnaceGui.java b/ihl/processing/metallurgy/AchesonFurnaceGui.java index 7665635..6f8238a 100644 --- a/ihl/processing/metallurgy/AchesonFurnaceGui.java +++ b/ihl/processing/metallurgy/AchesonFurnaceGui.java @@ -1,9 +1,10 @@ package ihl.processing.metallurgy; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; public class AchesonFurnaceGui extends GuiContainer { protected static final ResourceLocation achesonFurnaceBackground = new ResourceLocation("ihl", "textures/gui/GUIAchesonFurnace.png"); diff --git a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java index 1692e62..75efd70 100644 --- a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java @@ -3,6 +3,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ihl.IHLMod; @@ -15,8 +17,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class AchesonFurnanceTileEntity extends MachineBaseTileEntity { diff --git a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java index 14a9e71..f02abea 100644 --- a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java +++ b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java @@ -38,8 +38,8 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa public BasicElectricMotorTileEntity() { super(); energyConsume = IHLMod.config.machineryEnergyConsume/100d; - dischargeSlot = new IHLInvSlotDischarge(this, 1, Access.IO, 4, InvSlot.InvSide.BOTTOM); - upgradeSlot = new InvSlotUpgradeIHL(this, 1, Access.IO, 4, InvSlot.InvSide.BOTTOM); + dischargeSlot = new IHLInvSlotDischarge(this, 1, Access.I, 4, InvSlot.InvSide.BOTTOM); + upgradeSlot = new InvSlotUpgradeIHL(this, 1, Access.I, 4, InvSlot.InvSide.BOTTOM); } @Override diff --git a/ihl/processing/metallurgy/CoilerRender.java b/ihl/processing/metallurgy/CoilerRender.java index f3da8fa..26ee32f 100644 --- a/ihl/processing/metallurgy/CoilerRender.java +++ b/ihl/processing/metallurgy/CoilerRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class CoilerRender extends TileEntitySpecialRenderer{ private CoilerModel model = new CoilerModel(); diff --git a/ihl/processing/metallurgy/CoilerTileEntity.java b/ihl/processing/metallurgy/CoilerTileEntity.java index 5fdcf13..3853a0e 100644 --- a/ihl/processing/metallurgy/CoilerTileEntity.java +++ b/ihl/processing/metallurgy/CoilerTileEntity.java @@ -2,6 +2,8 @@ import java.util.List; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.IC2; import ic2.core.block.invslot.InvSlotOutput; @@ -10,8 +12,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IProductionLine{ diff --git a/ihl/processing/metallurgy/Crucible.java b/ihl/processing/metallurgy/Crucible.java index 77f10a4..220b505 100644 --- a/ihl/processing/metallurgy/Crucible.java +++ b/ihl/processing/metallurgy/Crucible.java @@ -8,7 +8,19 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - +import ic2.api.item.IItemHudInfo; +import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.RecipeInputOreDict; +import ic2.core.IC2; +import ic2.core.IHasGui; +import ic2.core.item.IHandHeldInventory; +import ic2.core.util.LiquidUtil; +import ic2.core.util.StackUtil; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; +import ihl.recipes.UniversalRecipeInput; +import ihl.recipes.UniversalRecipeManager; +import ihl.recipes.UniversalRecipeOutput; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; @@ -25,19 +37,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; -import ic2.api.item.IItemHudInfo; -import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeInputOreDict; -import ic2.core.IC2; -import ic2.core.IHasGui; -import ic2.core.item.IHandHeldInventory; -import ic2.core.util.LiquidUtil; -import ic2.core.util.StackUtil; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; -import ihl.recipes.UniversalRecipeInput; -import ihl.recipes.UniversalRecipeManager; -import ihl.recipes.UniversalRecipeOutput; public class Crucible extends Item implements IHandHeldInventory, IFluidContainerItem, IItemHudInfo{ diff --git a/ihl/processing/metallurgy/CrucibleContainer.java b/ihl/processing/metallurgy/CrucibleContainer.java index 647c277..20ec65e 100644 --- a/ihl/processing/metallurgy/CrucibleContainer.java +++ b/ihl/processing/metallurgy/CrucibleContainer.java @@ -1,12 +1,12 @@ package ihl.processing.metallurgy; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.util.StackUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.util.StackUtil; public class CrucibleContainer extends ContainerBase { diff --git a/ihl/processing/metallurgy/CrucibleGui.java b/ihl/processing/metallurgy/CrucibleGui.java index e92347c..f05e7bb 100644 --- a/ihl/processing/metallurgy/CrucibleGui.java +++ b/ihl/processing/metallurgy/CrucibleGui.java @@ -2,6 +2,8 @@ import org.lwjgl.opengl.GL11; +import ic2.core.util.DrawUtil; +import ic2.core.util.GuiTooltipHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.item.ItemStack; @@ -10,8 +12,6 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import ic2.core.util.DrawUtil; -import ic2.core.util.GuiTooltipHelper; public class CrucibleGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/CrucibleInventory.java b/ihl/processing/metallurgy/CrucibleInventory.java index cc5707a..253483f 100644 --- a/ihl/processing/metallurgy/CrucibleInventory.java +++ b/ihl/processing/metallurgy/CrucibleInventory.java @@ -2,6 +2,10 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.item.tool.HandHeldInventory; +import ic2.core.util.StackUtil; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -9,10 +13,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.item.tool.HandHeldInventory; -import ic2.core.util.StackUtil; public class CrucibleInventory extends HandHeldInventory { diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java index 66d9acb..8cd29d0 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java @@ -5,15 +5,12 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; - +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import cpw.mods.fml.relauncher.Side; - -import cpw.mods.fml.relauncher.SideOnly; - @SideOnly(Side.CLIENT) public class DetonationSprayingMachineGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIDetonationSprayingMachine.png"); diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java index ee64b65..b68f8b3 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java @@ -1,13 +1,13 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; import ihl.utils.IHLItemRenderer; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class DetonationSprayingMachineRender extends TileEntitySpecialRenderer{ private DetonationSprayingMachineModel model = new DetonationSprayingMachineModel(); diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java index ce594ed..411b8db 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java @@ -2,13 +2,9 @@ import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import ic2.api.network.INetworkTileEntityEventListener; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; @@ -27,6 +23,10 @@ import ihl.recipes.UniversalRecipeManager; import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; public class DetonationSprayingMachineTileEntity extends TileEntityInventory implements IHasGui, INetworkTileEntityEventListener { diff --git a/ihl/processing/metallurgy/ElectricEngineItem.java b/ihl/processing/metallurgy/ElectricEngineItem.java index 59d6d07..c1e0003 100644 --- a/ihl/processing/metallurgy/ElectricEngineItem.java +++ b/ihl/processing/metallurgy/ElectricEngineItem.java @@ -6,14 +6,14 @@ import java.util.List; import java.util.Map; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; -import net.minecraft.util.IIcon; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ihl.IHLCreativeTab; import ihl.IHLModInfo; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.Item; +import net.minecraft.util.IIcon; public class ElectricEngineItem extends Item{ diff --git a/ihl/processing/metallurgy/ExtruderModel.java b/ihl/processing/metallurgy/ExtruderModel.java index fb28d50..fcff405 100644 --- a/ihl/processing/metallurgy/ExtruderModel.java +++ b/ihl/processing/metallurgy/ExtruderModel.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class ExtruderModel extends ModelBase { diff --git a/ihl/processing/metallurgy/ExtruderTileEntity.java b/ihl/processing/metallurgy/ExtruderTileEntity.java index 53447b4..a46ae62 100644 --- a/ihl/processing/metallurgy/ExtruderTileEntity.java +++ b/ihl/processing/metallurgy/ExtruderTileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.chemistry.ApparatusProcessableInvSlot; @@ -21,8 +23,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/GasWeldingStationGui.java b/ihl/processing/metallurgy/GasWeldingStationGui.java index 6248159..79becd5 100644 --- a/ihl/processing/metallurgy/GasWeldingStationGui.java +++ b/ihl/processing/metallurgy/GasWeldingStationGui.java @@ -1,14 +1,14 @@ package ihl.processing.metallurgy; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ic2.core.IC2; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Slot; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class GasWeldingStationGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java index 54f4177..b7172c2 100644 --- a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java +++ b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java @@ -3,18 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkClientTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -32,6 +23,15 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; public class GasWeldingStationTileEntity extends TileEntityInventory implements IHasGui, INetworkClientTileEntityEventListener, IFluidHandler, IWorkspaceElement { diff --git a/ihl/processing/metallurgy/ImpregnatingMachineGui.java b/ihl/processing/metallurgy/ImpregnatingMachineGui.java index c6a8b0f..29ba298 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineGui.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineGui.java @@ -1,12 +1,12 @@ package ihl.processing.metallurgy; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.utils.IHLRenderUtils; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import ihl.utils.IHLRenderUtils; @SideOnly(Side.CLIENT) public class ImpregnatingMachineGui extends GuiContainer { diff --git a/ihl/processing/metallurgy/ImpregnatingMachineRender.java b/ihl/processing/metallurgy/ImpregnatingMachineRender.java index 3231b71..9529186 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineRender.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineRender.java @@ -1,53 +1,55 @@ package ihl.processing.metallurgy; + +import org.lwjgl.opengl.GL11; + +import ihl.interfaces.IFluidTankVisual; +import ihl.model.FluidRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import org.lwjgl.opengl.GL11; - -import ihl.model.FluidRenderer; +public class ImpregnatingMachineRender extends TileEntitySpecialRenderer { -public class ImpregnatingMachineRender extends TileEntitySpecialRenderer{ + private float cap; + public ImpregnatingMachineRender(float capIn) { + cap = capIn; + } - -public ImpregnatingMachineRender(){} + public void renderAModelAt(IFluidTankVisual tile, double x, double y, double z, float f) { + GL11.glPushMatrix(); + GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F); + float rotation = 0F; + GL11.glRotatef(-rotation, 0F, 1F, 0F); + GL11.glScalef(1F, -1F, -1F); + GL11.glTranslatef(0F, -1.0F, 0F); + GL11.glPopMatrix(); + if (tile.getVisibleFluidId() == -1 || tile.getVisibleFluidAmount() <= 0) { + return; + } + FluidStack fluidStack = new FluidStack(FluidRegistry.getFluid(tile.getVisibleFluidId()), + tile.getVisibleFluidAmount()); + GL11.glPushMatrix(); + GL11.glPushAttrib(GL11.GL_ENABLE_BIT); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glTranslatef((float) x, (float) y + 0.1F, (float) z); + GL11.glScalef(0.99F, 0.8F * tile.getRenderLiquidLevel(), 0.99F); + int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack); + if (displayLists != null) { + float level = Math.min(fluidStack.amount, cap) / cap; + bindTexture(FluidRenderer.getFluidSheet(fluidStack)); + GL11.glCallList(displayLists[(int) (level * (FluidRenderer.DISPLAY_STAGES - 1))]); + } + GL11.glDisable(GL11.GL_BLEND); + GL11.glPopAttrib(); + GL11.glPopMatrix(); -public void renderAModelAt(ImpregnatingMachineTileEntity tile, double x, double y, double z, float f) { - GL11.glPushMatrix(); - GL11.glTranslatef((float)x + 0.5F, (float)y+0.5F, (float)z + 0.5F); - float rotation=0F; - GL11.glRotatef(-rotation, 0F, 1F, 0F); - GL11.glScalef(1F, -1F, -1F); - GL11.glTranslatef(0F, -1.0F, 0F); - GL11.glPopMatrix(); - if (tile.visibleFluidId == -1 || tile.visibleFluidAmount <= 0) { - return; } - FluidStack fluidStack = new FluidStack(FluidRegistry.getFluid(tile.visibleFluidId),tile.visibleFluidAmount); - GL11.glPushMatrix(); - GL11.glPushAttrib(GL11.GL_ENABLE_BIT); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glTranslatef((float) x, (float) y + 0.1F, (float) z); - GL11.glScalef(0.99F, 0.8F*tile.getRenderLiquidLevel(), 0.99F); - int[] displayLists = FluidRenderer.getLiquidDisplayLists(fluidStack); - if (displayLists != null) { - float cap = 900F; - float level = Math.min(fluidStack.amount, cap) / cap; - bindTexture(FluidRenderer.getFluidSheet(fluidStack)); - GL11.glCallList(displayLists[(int) (level * (FluidRenderer.DISPLAY_STAGES - 1))]); - } - GL11.glDisable(GL11.GL_BLEND); - GL11.glPopAttrib(); - GL11.glPopMatrix(); - -} @Override - public void renderTileEntityAt(TileEntity par1TileEntity, double par2, double par4, double par6, float par8) - { - this.renderAModelAt((ImpregnatingMachineTileEntity)par1TileEntity, par2, par4, par6, par8); + public void renderTileEntityAt(TileEntity tile, double par2, double par4, double par6, float par8) { + this.renderAModelAt((IFluidTankVisual) tile, par2, par4, par6, par8); } } \ No newline at end of file diff --git a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java index 1a15f06..a0ed60d 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java @@ -3,19 +3,9 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidHandler; import ic2.api.network.INetworkTileEntityEventListener; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -25,6 +15,7 @@ import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; +import ihl.interfaces.IFluidTankVisual; import ihl.interfaces.IHasTemperature; import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.processing.chemistry.ChemicalReactorTileEntity; @@ -35,8 +26,18 @@ import ihl.recipes.UniversalRecipeOutput; import ihl.utils.IHLFluidTank; import ihl.utils.IHLUtils; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; +import net.minecraftforge.fluids.IFluidHandler; -public class ImpregnatingMachineTileEntity extends TileEntityInventory implements IHasGui,INetworkTileEntityEventListener, IFluidHandler, IHasTemperature +public class ImpregnatingMachineTileEntity extends TileEntityInventory implements IHasGui,IFluidTankVisual,INetworkTileEntityEventListener, IFluidHandler, IHasTemperature { private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("tub"); public final ApparatusProcessableInvSlot input; @@ -337,4 +338,14 @@ public int getTemperature() { return this.fluidTank.getTemperature(); } + + @Override + public int getVisibleFluidId() { + return this.visibleFluidId; + } + + @Override + public int getVisibleFluidAmount() { + return this.visibleFluidAmount; + } } \ No newline at end of file diff --git a/ihl/processing/metallurgy/InjectionMoldBlock.java b/ihl/processing/metallurgy/InjectionMoldBlock.java index 1cd18d3..bbea1cb 100644 --- a/ihl/processing/metallurgy/InjectionMoldBlock.java +++ b/ihl/processing/metallurgy/InjectionMoldBlock.java @@ -1,14 +1,17 @@ package ihl.processing.metallurgy; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ihl.IHLCreativeTab; import ihl.IHLModInfo; import ihl.items_blocks.IHLItemBlock; import ihl.metallurgy.constants.Details; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; @@ -24,9 +27,6 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class InjectionMoldBlock extends Block implements ITileEntityProvider{ diff --git a/ihl/processing/metallurgy/InjectionMoldTileEntity.java b/ihl/processing/metallurgy/InjectionMoldTileEntity.java index 33689ba..e5fee82 100644 --- a/ihl/processing/metallurgy/InjectionMoldTileEntity.java +++ b/ihl/processing/metallurgy/InjectionMoldTileEntity.java @@ -5,6 +5,12 @@ import java.util.List; import java.util.Map; +import ic2.core.IC2; +import ihl.metallurgy.constants.Details; +import ihl.recipes.UniversalRecipeInput; +import ihl.recipes.UniversalRecipeManager; +import ihl.recipes.UniversalRecipeOutput; +import ihl.utils.IHLUtils; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -16,12 +22,6 @@ import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.oredict.OreDictionary; -import ic2.core.IC2; -import ihl.metallurgy.constants.Details; -import ihl.recipes.UniversalRecipeInput; -import ihl.recipes.UniversalRecipeManager; -import ihl.recipes.UniversalRecipeOutput; -import ihl.utils.IHLUtils; public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler diff --git a/ihl/processing/metallurgy/LathePart1TileEntity.java b/ihl/processing/metallurgy/LathePart1TileEntity.java index ddf834b..788bfd4 100644 --- a/ihl/processing/metallurgy/LathePart1TileEntity.java +++ b/ihl/processing/metallurgy/LathePart1TileEntity.java @@ -1,6 +1,9 @@ package ihl.processing.metallurgy; import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.ContainerBase; import ihl.interfaces.IWorkspaceElement; import ihl.utils.IHLUtils; @@ -9,8 +12,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class LathePart1TileEntity extends BasicElectricMotorTileEntity implements IWorkspaceElement{ diff --git a/ihl/processing/metallurgy/MachineBaseContainer.java b/ihl/processing/metallurgy/MachineBaseContainer.java index 19985fe..d7e3ac7 100644 --- a/ihl/processing/metallurgy/MachineBaseContainer.java +++ b/ihl/processing/metallurgy/MachineBaseContainer.java @@ -5,7 +5,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; -public class MachineBaseContainer extends ContainerBase { +public class MachineBaseContainer extends ContainerBase { protected MachineBaseTileEntity tileEntity; public int lastProgress = -1; diff --git a/ihl/processing/metallurgy/MachineBaseTileEntity.java b/ihl/processing/metallurgy/MachineBaseTileEntity.java index de20f5a..79763b5 100644 --- a/ihl/processing/metallurgy/MachineBaseTileEntity.java +++ b/ihl/processing/metallurgy/MachineBaseTileEntity.java @@ -1,5 +1,9 @@ package ihl.processing.metallurgy; +import java.util.List; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -10,15 +14,12 @@ import ic2.core.block.invslot.InvSlot.Access; import ihl.processing.chemistry.ApparatusProcessableInvSlot; import ihl.recipes.UniversalRecipeOutput; -import java.util.List; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public abstract class MachineBaseTileEntity extends TileEntityInventory implements IHasGui, IEnergySink { diff --git a/ihl/processing/metallurgy/MuffleFurnaceGui.java b/ihl/processing/metallurgy/MuffleFurnaceGui.java index bf0df24..9c83401 100644 --- a/ihl/processing/metallurgy/MuffleFurnaceGui.java +++ b/ihl/processing/metallurgy/MuffleFurnaceGui.java @@ -1,9 +1,10 @@ package ihl.processing.metallurgy; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; public class MuffleFurnaceGui extends GuiContainer { protected static final ResourceLocation muffleFurnaceBackground = new ResourceLocation("ihl", "textures/gui/GUIAchesonFurnace.png"); diff --git a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java index 3994bd7..6f811cb 100644 --- a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java @@ -3,8 +3,9 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; -import ic2.api.recipe.RecipeInputOreDict; import ic2.core.ContainerBase; import ihl.IHLMod; import ihl.processing.invslots.IHLInvSlotOutput; @@ -16,8 +17,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class MuffleFurnanceTileEntity extends MachineBaseTileEntity { diff --git a/ihl/processing/metallurgy/RollingMachinePart1Model.java b/ihl/processing/metallurgy/RollingMachinePart1Model.java index 460ff62..fe062f8 100644 --- a/ihl/processing/metallurgy/RollingMachinePart1Model.java +++ b/ihl/processing/metallurgy/RollingMachinePart1Model.java @@ -1,9 +1,9 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class RollingMachinePart1Model extends ModelBase diff --git a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java index dc2d293..da60877 100644 --- a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase; import ic2.core.IC2; @@ -20,8 +22,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/RollingMachinePart2Model.java b/ihl/processing/metallurgy/RollingMachinePart2Model.java index b4bda67..39fd1f5 100644 --- a/ihl/processing/metallurgy/RollingMachinePart2Model.java +++ b/ihl/processing/metallurgy/RollingMachinePart2Model.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; -import net.minecraft.client.model.ModelBase; import ihl.model.IHLModelRenderer; +import net.minecraft.client.model.ModelBase; public class RollingMachinePart2Model extends ModelBase { diff --git a/ihl/processing/metallurgy/RollingMachineRender.java b/ihl/processing/metallurgy/RollingMachineRender.java index 1990769..f347a73 100644 --- a/ihl/processing/metallurgy/RollingMachineRender.java +++ b/ihl/processing/metallurgy/RollingMachineRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class RollingMachineRender extends TileEntitySpecialRenderer{ private RollingMachinePart1Model model = new RollingMachinePart1Model(); diff --git a/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java b/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java index e3ab6c7..9ce0f01 100644 --- a/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java +++ b/ihl/processing/metallurgy/VulcanizationExtrudingMoldModel.java @@ -1,8 +1,8 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class VulcanizationExtrudingMoldModel extends ModelBase { diff --git a/ihl/processing/metallurgy/WireMillTileEntity.java b/ihl/processing/metallurgy/WireMillTileEntity.java index f69ea9a..d93eb4f 100644 --- a/ihl/processing/metallurgy/WireMillTileEntity.java +++ b/ihl/processing/metallurgy/WireMillTileEntity.java @@ -4,13 +4,15 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputOreDict; import ic2.core.ContainerBase; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotConsumableLiquid; import ic2.core.block.invslot.InvSlotOutput; -import ic2.core.block.invslot.InvSlot.Access; import ihl.IHLMod; import ihl.items_blocks.IHLTool; import ihl.processing.chemistry.ApparatusProcessableInvSlot; @@ -34,8 +36,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class WireMillTileEntity extends BasicElectricMotorTileEntity implements IFluidHandler{ diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java index 4dd1f1c..857575a 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java @@ -3,6 +3,8 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; @@ -21,8 +23,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java b/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java index 2673124..6ebc58e 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart2Model.java @@ -6,9 +6,9 @@ package ihl.processing.metallurgy; +import ihl.model.IHLModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; public class WoodenRollingMachinePart2Model extends ModelBase { diff --git a/ihl/processing/metallurgy/WoodenRollingMachineRender.java b/ihl/processing/metallurgy/WoodenRollingMachineRender.java index f5fd12a..f180f75 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachineRender.java +++ b/ihl/processing/metallurgy/WoodenRollingMachineRender.java @@ -1,11 +1,11 @@ package ihl.processing.metallurgy; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import ic2.api.tile.IWrenchable; import ihl.IHLModInfo; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; public class WoodenRollingMachineRender extends TileEntitySpecialRenderer{ private WoodenRollingMachinePart1Model model = new WoodenRollingMachinePart1Model(); diff --git a/ihl/recipes/IRecipeInputFluid.java b/ihl/recipes/IRecipeInputFluid.java index 823c0ae..774973c 100644 --- a/ihl/recipes/IRecipeInputFluid.java +++ b/ihl/recipes/IRecipeInputFluid.java @@ -1,6 +1,7 @@ package ihl.recipes; import java.util.List; + import net.minecraftforge.fluids.FluidStack; public interface IRecipeInputFluid { diff --git a/ihl/recipes/IronWorkbenchRecipe.java b/ihl/recipes/IronWorkbenchRecipe.java index f0bd81f..e471811 100644 --- a/ihl/recipes/IronWorkbenchRecipe.java +++ b/ihl/recipes/IronWorkbenchRecipe.java @@ -3,12 +3,13 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import net.minecraft.item.ItemStack; + import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ihl.interfaces.IWire; import ihl.utils.IHLUtils; +import net.minecraft.item.ItemStack; public class IronWorkbenchRecipe { public List workspaceElements=new ArrayList(); @@ -70,7 +71,14 @@ else if(!oreDictName.isEmpty() && oreDictName.length()>3) } } - this.outputs.addAll(output1_1); + Iterator iOutput = output1_1.iterator(); + while(iOutput.hasNext()) + { + ItemStack outputStack = iOutput.next(); + if(outputStack==null) + throw new NullPointerException("Output shall not contain null."); + this.outputs.add(outputStack); + } if(tools.size()>8 || materials.size()>12) { throw new IllegalArgumentException("Iron workbench recipe cannot contain more than 8 tools or more than 12 materials!"); diff --git a/ihl/recipes/RecipeInputDetonator.java b/ihl/recipes/RecipeInputDetonator.java index efef075..15030fd 100644 --- a/ihl/recipes/RecipeInputDetonator.java +++ b/ihl/recipes/RecipeInputDetonator.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; -import ic2.api.recipe.IRecipeInput; +import ic2.api.recipe.IRecipeInput; import ihl.utils.IHLUtils; import net.minecraft.item.ItemStack; diff --git a/ihl/recipes/RecipeInputFluidDictionary.java b/ihl/recipes/RecipeInputFluidDictionary.java index e1581c3..eb5b057 100644 --- a/ihl/recipes/RecipeInputFluidDictionary.java +++ b/ihl/recipes/RecipeInputFluidDictionary.java @@ -2,8 +2,8 @@ import java.util.List; -import net.minecraftforge.fluids.FluidStack; import ihl.IHLMod; +import net.minecraftforge.fluids.FluidStack; public class RecipeInputFluidDictionary implements IRecipeInputFluid { diff --git a/ihl/recipes/RecipeInputObjectInstance.java b/ihl/recipes/RecipeInputObjectInstance.java index 8648e72..42fdc26 100644 --- a/ihl/recipes/RecipeInputObjectInstance.java +++ b/ihl/recipes/RecipeInputObjectInstance.java @@ -3,9 +3,9 @@ import java.util.Arrays; import java.util.List; -import net.minecraft.item.ItemStack; import ic2.api.recipe.IRecipeInput; import ihl.utils.IHLUtils; +import net.minecraft.item.ItemStack; public class RecipeInputObjectInstance implements IRecipeInput { diff --git a/ihl/recipes/UniversalRecipeInput.java b/ihl/recipes/UniversalRecipeInput.java index d2c25b6..2ed546a 100644 --- a/ihl/recipes/UniversalRecipeInput.java +++ b/ihl/recipes/UniversalRecipeInput.java @@ -1,15 +1,14 @@ package ihl.recipes; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; import ihl.interfaces.IWire; import ihl.utils.IHLUtils; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -106,7 +105,7 @@ public boolean matches(List fluidInputs1, List itemInputs ItemStack is1 = getMatchedItemStack(is, itemInputs1); if (is1 == null || !is.matches(is1)) { return false; - } else if (doCheckAmounts && is1.stackSize < is.getAmount()) { + } else if (doCheckAmounts && IHLUtils.getAmountOf(is1) < is.getAmount()) { return false; } } diff --git a/ihl/recipes/UniversalRecipeManager.java b/ihl/recipes/UniversalRecipeManager.java index 6c09bb1..cddc252 100644 --- a/ihl/recipes/UniversalRecipeManager.java +++ b/ihl/recipes/UniversalRecipeManager.java @@ -7,9 +7,9 @@ import java.util.Map.Entry; import ic2.api.recipe.IRecipeInput; +import ihl.utils.IHLUtils; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import ihl.utils.IHLUtils; public class UniversalRecipeManager { diff --git a/ihl/servitor/BoneBlock.java b/ihl/servitor/BoneBlock.java index d8e9c32..549a92b 100644 --- a/ihl/servitor/BoneBlock.java +++ b/ihl/servitor/BoneBlock.java @@ -2,9 +2,9 @@ import java.util.List; -import ihl.IHLModInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/servitor/FlameRenderFX.java b/ihl/servitor/FlameRenderFX.java index 21729de..f90e378 100644 --- a/ihl/servitor/FlameRenderFX.java +++ b/ihl/servitor/FlameRenderFX.java @@ -1,12 +1,13 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class FlameRenderFX extends Render{ private ResourceLocation tex; diff --git a/ihl/servitor/LostHeadEntity.java b/ihl/servitor/LostHeadEntity.java index 8a20a42..704743b 100644 --- a/ihl/servitor/LostHeadEntity.java +++ b/ihl/servitor/LostHeadEntity.java @@ -1,11 +1,10 @@ package ihl.servitor; +import java.util.List; + import ic2.api.item.IC2Items; import ihl.IHLMod; import ihl.IHLModInfo; - -import java.util.List; - import net.minecraft.entity.Entity; import net.minecraft.entity.EntityFlying; import net.minecraft.entity.EntityLivingBase; diff --git a/ihl/servitor/LostHeadRender.java b/ihl/servitor/LostHeadRender.java index 5f8ee96..f4e7cb9 100644 --- a/ihl/servitor/LostHeadRender.java +++ b/ihl/servitor/LostHeadRender.java @@ -1,10 +1,11 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import ihl.IHLModInfo; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; public class LostHeadRender extends Render{ private SkullModel model = new SkullModel(); diff --git a/ihl/servitor/SkullItemRender.java b/ihl/servitor/SkullItemRender.java index 3d00df1..8b9e2b7 100644 --- a/ihl/servitor/SkullItemRender.java +++ b/ihl/servitor/SkullItemRender.java @@ -1,11 +1,12 @@ package ihl.servitor; +import org.lwjgl.opengl.GL11; + import ihl.IHLModInfo; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import org.lwjgl.opengl.GL11; public class SkullItemRender implements IItemRenderer{ private SkullModel model = new SkullModel(); diff --git a/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java b/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java index 43701eb..633b824 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java +++ b/ihl/trans_dimensional_item_teleporter/TDITFrequencyTransmitter.java @@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - import ic2.api.item.IItemHudInfo; import ic2.core.IC2; import ic2.core.util.StackUtil; diff --git a/ihl/trans_dimensional_item_teleporter/TDITGui.java b/ihl/trans_dimensional_item_teleporter/TDITGui.java index ab17b17..5966e5e 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITGui.java +++ b/ihl/trans_dimensional_item_teleporter/TDITGui.java @@ -1,14 +1,13 @@ package ihl.trans_dimensional_item_teleporter; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; -import org.lwjgl.opengl.GL11; - @SideOnly(Side.CLIENT) public class TDITGui extends GuiContainer { private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUITDIT.png"); diff --git a/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java b/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java index 6c6f268..d54a705 100644 --- a/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java +++ b/ihl/trans_dimensional_item_teleporter/TDITTileEntity.java @@ -7,17 +7,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.server.MinecraftServer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import ic2.api.energy.event.EnergyTileLoadEvent; import ic2.api.energy.event.EnergyTileUnloadEvent; import ic2.api.energy.tile.IEnergySink; @@ -30,14 +19,24 @@ import ic2.core.audio.PositionSpec; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import ic2.core.block.invslot.InvSlot.Access; import ic2.core.block.invslot.InvSlotOutput; import ic2.core.block.invslot.InvSlotUpgrade; -import ic2.core.block.invslot.InvSlot.Access; import ic2.core.upgrade.IUpgradableBlock; import ic2.core.upgrade.IUpgradeItem; import ic2.core.upgrade.UpgradableProperty; import ihl.IHLMod; import ihl.utils.IHLInvSlotDischarge; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ForgeDirection; public class TDITTileEntity extends TileEntityInventory implements IEnergySink, IHasGui, IUpgradableBlock { diff --git a/ihl/utils/BlockItemRender.java b/ihl/utils/BlockItemRender.java index 870ab21..34d1499 100644 --- a/ihl/utils/BlockItemRender.java +++ b/ihl/utils/BlockItemRender.java @@ -1,5 +1,9 @@ package ihl.utils; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ic2.core.block.RenderBlockDefault; import ihl.items_blocks.IHLItemBlock; import ihl.model.IHLModelRenderer; @@ -14,10 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; @SideOnly(value = Side.CLIENT) public class BlockItemRender implements IItemRenderer{ diff --git a/ihl/utils/EntityDropEventHandler.java b/ihl/utils/EntityDropEventHandler.java index f4021ef..c8edf47 100644 --- a/ihl/utils/EntityDropEventHandler.java +++ b/ihl/utils/EntityDropEventHandler.java @@ -1,7 +1,7 @@ package ihl.utils; -import net.minecraft.entity.passive.EntitySheep; import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import net.minecraft.entity.passive.EntitySheep; public class EntityDropEventHandler { diff --git a/ihl/utils/IHLInvSlotDischarge.java b/ihl/utils/IHLInvSlotDischarge.java index 4ebb488..ffa4216 100644 --- a/ihl/utils/IHLInvSlotDischarge.java +++ b/ihl/utils/IHLInvSlotDischarge.java @@ -1,11 +1,11 @@ package ihl.utils; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; import ic2.api.info.Info; import ic2.api.item.ElectricItem; import ic2.core.block.TileEntityInventory; import ic2.core.block.invslot.InvSlot; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; public class IHLInvSlotDischarge extends InvSlot { diff --git a/ihl/utils/IHLItemRenderer.java b/ihl/utils/IHLItemRenderer.java index 2ebbdb1..0191edb 100644 --- a/ihl/utils/IHLItemRenderer.java +++ b/ihl/utils/IHLItemRenderer.java @@ -22,8 +22,8 @@ import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; -import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.client.IItemRenderer.ItemRenderType; +import net.minecraftforge.client.MinecraftForgeClient; @SideOnly(value = Side.CLIENT) public class IHLItemRenderer { diff --git a/ihl/utils/IHLUtils.java b/ihl/utils/IHLUtils.java index 519f265..c37e11e 100644 --- a/ihl/utils/IHLUtils.java +++ b/ihl/utils/IHLUtils.java @@ -1,5 +1,16 @@ package ihl.utils; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +import org.apache.commons.lang3.mutable.MutableObject; + +import cpw.mods.fml.common.registry.GameRegistry; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; @@ -11,21 +22,10 @@ import ihl.interfaces.IEnergyNetNode; import ihl.interfaces.IMultiPowerCableHolder; import ihl.interfaces.IWire; -import ihl.metallurgy.constants.*; +import ihl.metallurgy.constants.ElectricConductor; +import ihl.metallurgy.constants.Insulation; import ihl.processing.invslots.InvSlotConsumableLiquidIHL; import ihl.recipes.IRecipeInputFluid; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - -import org.apache.commons.lang3.mutable.MutableObject; - -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; diff --git a/ihl/worldgen/IHLWorldGenerator.java b/ihl/worldgen/IHLWorldGenerator.java index 1c65b78..a6f3b6b 100644 --- a/ihl/worldgen/IHLWorldGenerator.java +++ b/ihl/worldgen/IHLWorldGenerator.java @@ -1,17 +1,17 @@ package ihl.worldgen; -import ihl.IHLMod; -import ihl.utils.IHLUtils; -import ihl.worldgen.ores.IHLFluid; - import java.util.HashSet; import java.util.Random; import java.util.Set; + +import cpw.mods.fml.common.IWorldGenerator; +import ihl.IHLMod; +import ihl.utils.IHLUtils; +import ihl.worldgen.ores.IHLFluid; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; -import cpw.mods.fml.common.IWorldGenerator; public class IHLWorldGenerator implements IWorldGenerator { diff --git a/ihl/worldgen/ores/BlockOre.java b/ihl/worldgen/ores/BlockOre.java index 4b0c7a7..00a8bcc 100644 --- a/ihl/worldgen/ores/BlockOre.java +++ b/ihl/worldgen/ores/BlockOre.java @@ -7,11 +7,11 @@ import java.util.List; import java.util.Map; -import ihl.IHLCreativeTab; -import ihl.IHLModInfo; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ihl.IHLCreativeTab; +import ihl.IHLModInfo; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/ihl/worldgen/ores/DebugScannerGui.java b/ihl/worldgen/ores/DebugScannerGui.java index 2d79300..56be263 100644 --- a/ihl/worldgen/ores/DebugScannerGui.java +++ b/ihl/worldgen/ores/DebugScannerGui.java @@ -2,12 +2,12 @@ import java.util.List; -import cpw.mods.fml.relauncher.Side; +import org.lwjgl.opengl.GL11; +import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) public class DebugScannerGui extends GuiContainer { diff --git a/ihl/worldgen/ores/DebugScannerTileEntity.java b/ihl/worldgen/ores/DebugScannerTileEntity.java index df027d5..b32f3e8 100644 --- a/ihl/worldgen/ores/DebugScannerTileEntity.java +++ b/ihl/worldgen/ores/DebugScannerTileEntity.java @@ -6,6 +6,11 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ic2.core.ContainerBase; +import ic2.core.IC2; +import ic2.core.IHasGui; +import ic2.core.block.TileEntityInventory; +import ic2.core.block.invslot.InvSlot; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -15,11 +20,6 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.oredict.OreDictionary; -import ic2.core.ContainerBase; -import ic2.core.IC2; -import ic2.core.IHasGui; -import ic2.core.block.TileEntityInventory; -import ic2.core.block.invslot.InvSlot; public class DebugScannerTileEntity extends TileEntityInventory implements IHasGui { public final InvSlot itemsSlot; diff --git a/ihl/worldgen/ores/IHLFluid.java b/ihl/worldgen/ores/IHLFluid.java index 51e0999..d35dc73 100644 --- a/ihl/worldgen/ores/IHLFluid.java +++ b/ihl/worldgen/ores/IHLFluid.java @@ -7,11 +7,11 @@ import java.util.List; import java.util.Map; +import cpw.mods.fml.common.registry.GameRegistry; import ic2.core.Ic2Items; import ihl.IHLCreativeTab; import ihl.IHLModInfo; import ihl.items_blocks.IHLFluidBlock; -import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; @@ -47,7 +47,7 @@ public IHLFluid(IHLFluidType type1) { if (!FluidRegistry.registerFluid(instance)) { instance = FluidRegistry.getFluid(type.fluidRegistryName); } - if (instance.getBlock() == null && !type.noBlock) { + if (instance.getBlock() == null) { instance.setBlock(new IHLFluidBlock(instance, type.blockMaterial, type.textureName, "fluid" + type.fluidName.replaceFirst("fluid", "")).setFlammable(type.flammable) .setBlockName("block" + type.fluidName).setCreativeTab(IHLCreativeTab.tab)); @@ -136,7 +136,7 @@ public enum IHLFluidType { // "methane", Material.water, false, false, false, false), NitroGlyceryl("NitroGlycerin", 10052, 293, 291, 583, 1595, "nitroglycerin", Material.water, true, false, true), Ammonia("Ammonia", 10051, 273, 273 - 78, 273 - - 33, 0.772F, "ammonia", new MaterialLiquid(MapColor.airColor), false, false, true), + - 33, 0.772F, "ammonia", new MaterialLiquid(MapColor.airColor), true, false, true), Acetaldehyde("Acetaldehyde", 10050, 273, 273 - 123, 294, 784, "acetaldehyde", Material.water, false, false, false), Formaldehyde("Formaldehyde", 10049, 254, 273 @@ -160,13 +160,13 @@ public enum IHLFluidType { Fuel("Fuel", 10035, 293, 268, 633, 840, "fuel", Material.water, true, false, true), MineralOil("MineralOil", 10034, 293, 238, 704, 845, "mineraloil", Material.water, true, false, true), FuelOil("FuelOil", 10033, 293, 293, 693, 991, "fueloil", Material.water, true, false, true), - Oil("Oil", "fluidOil", 10032, 293, 284, 773, 850f, "oil", Material.water, true, false, true, false), + Oil("Oil", "fluidOil", 10032, 293, 284, 773, 850f, "oil", Material.water, true, false, true), Mercury("Mercury", 10031, 293, 234, 630, 13546), VapourMercury("VapourMercury", 10030, 630, 234, 630, 9.229F, "vapour.mercury", new MaterialLiquid( MapColor.cyanColor), false, false, false), Hydrogen("Hydrogen", 10029, 293, 14, 20, 0.046F, "hydrogen", new MaterialLiquid( MapColor.blueColor), true, false, true), - SaltWater("SaltWater", "fluidSaltWater", 10028, 293, 253, 373, 1360f, "saltwater", Material.water, true, false, false, false), + SaltWater("SaltWater", "fluidSaltWater", 10028, 293, 253, 373, 1360f, "saltwater", Material.water, true, false, false), HydrogenChloride("HydrogenChloride", 10027, 293, 159, 188, 1.477F, "hydrogenchloride", new MaterialLiquid( MapColor.yellowColor), true, false, true), NatriumTungstate("NatriumTungstateDissolvedInWater", 10026, 293, 249, 373, 1730, "solution.natriumtungstate", Material.water, true, false, false), @@ -178,8 +178,8 @@ public enum IHLFluidType { Oxygen("Oxygen", 10022, 93, 55, 93, 1.429F, "oxygen", new MaterialLiquid(MapColor.airColor), true, false, true), NatriumHydroxide("NatriumHydroxideDissolvedInWater", 10021, 293, 249, 373, 1525, "solution.natriumhydroxide", Material.water, true, false, false), LiquidGlass("LiquidGlass", 10020, 293, 253, 373, 2400), - fluidRubberTreeSap("fluidRubberTreeSap", "fluidRubberTreeSap", 10019, 293, 273, 393, 1200f, "fluidrubbertreesap", Material.water, true, true, false, false), - SpruceResin("SpruceResin","fluidSpruceResin", 10018, 293, 273, 533, 1080, "spruceresin", Material.water, true, true, true, false), + fluidRubberTreeSap("fluidRubberTreeSap", "fluidRubberTreeSap", 10019, 293, 273, 393, 1200f, "fluidrubbertreesap", Material.water, true, true, false), + SpruceResin("SpruceResin","fluidSpruceResin", 10018, 293, 273, 533, 1080, "spruceresin", Material.water, true, true, true), CablingColophony("CablingColophony", 10017, 363, 363, 533, 1070, "cablingcolophony", Material.water, true, false, true), Glycerol("Glycerol", 10016, 293, 291, 583, 1261, "glycerol", Material.water, true, false, true), SeedOil("SeedOil", 10015, 293, 256, 583, 920, "seedoil", Material.water, true, false, true), @@ -191,12 +191,12 @@ public enum IHLFluidType { NickelSulfateDissolvedInWater("NickelSulfateDissolvedInWater", 10009, 293, 253, 373, 1220, "solution.nickelsulfate", Material.water, true, false, false), BlueVitriolDissolvedInWater("BlueVitriolDissolvedInWater", 10008, 293, 253, 373, 1180, "solution.bluevitriol", Material.water, true, false, false), MoltenRubberWithSulfur("MoltenRubberWithSulfur", 10007, 600, 600, 1000, 1200, "molten.rubber", Material.lava, false, false, true), - MoltenPotassium("MoltenPotassium", "fluidMolten", 10042, 336, 336, 1047, 856, "molten.potassium", Material.lava, false, false, false, true), + MoltenPotassium("MoltenPotassium", "fluidMolten", 10042, 336, 336, 1047, 856, "molten.potassium", Material.lava, false, false, false), MoltenLithium("MoltenLithium", "fluidMolten", 10042, 454, 454, 1613, 512, "molten.lithium", Material.lava, false, false, false), MoltenPotassiumChloride("MoltenPotassiumChloride", "fluidMolten", 10006, 776 + 273, 776 + 273, 1407 - + 273, 1556, "molten.potassiumchloride", Material.lava, false, false, false, true), + + 273, 1556, "molten.potassiumchloride", Material.lava, false, false, false), MoltenSodiumChloride("MoltenSodiumChloride", "fluidMolten", 10006, 1273, 1273, 1740, 1556, "molten.sodiumchloride", Material.lava, false, false, false), - MoltenGlass("MoltenGlass", "fluidMolten", 10048, 600, 600, 1950, 2270, "molten.glass", Material.lava, false, false, false, true), + MoltenGlass("MoltenGlass", "fluidMolten", 10048, 600, 600, 1950, 2270, "molten.glass", Material.lava, false, false, false), MoltenMagnesium("MoltenMagnesium", "fluidMolten", 10006, 923, 923, 1623, 1584, "molten.magnesium", Material.lava, false, false, false), MoltenSteel("MoltenSteel", "fluidMolten", 10006, 1800, 1800, 3134, 6980, "molten.steel", Material.lava, false, false, false), MoltenCopper("MoltenCopper", "fluidMolten", 10048, 1356, 1356, 2840, 8920, "molten.copper", Material.lava, false, false, false), @@ -275,26 +275,6 @@ public enum IHLFluidType { damage = celldamage; } - IHLFluidType(String fluidName1, String textureName1, int celldamage, int temperature1, int meltingPoint1, - int boilingPoint1, float density1, String fluidRegistryName1, Material blockMaterial1, boolean hasCell1, - boolean haveBucket1, boolean flammable1, boolean noBlock1) { - noBlock = noBlock1; - fluidName = fluidName1; - fluidRegistryName = fluidRegistryName1; - textureName = textureName1; - temperature = temperature1; - density = density1; - cellName = "itemCell" + fluidName; - haveBucket = haveBucket1; - flammable = flammable1; - isGaseous = density1 < maxGaseousStateVapoursDensity; - blockMaterial = blockMaterial1; - boilingPoint = boilingPoint1; - meltingPoint = meltingPoint1; - hasCell = hasCell1; - damage = celldamage; - } - public String fluidName; public String fluidRegistryName; public String cellName; @@ -303,7 +283,6 @@ public enum IHLFluidType { float density; boolean isGaseous; boolean flammable = false; - boolean noBlock = true; boolean haveBucket; Material blockMaterial = Material.water; int meltingPoint;