From 95c57bccf0dd05409251ec097cc941020be5601c Mon Sep 17 00:00:00 2001 From: Gig Date: Sat, 20 Jun 2015 10:30:52 +0100 Subject: [PATCH 1/4] small hud changes looks a littlie better --- src/main/java/techreborn/client/hud/ChargeHud.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/techreborn/client/hud/ChargeHud.java b/src/main/java/techreborn/client/hud/ChargeHud.java index 40ea7b138..149229293 100644 --- a/src/main/java/techreborn/client/hud/ChargeHud.java +++ b/src/main/java/techreborn/client/hud/ChargeHud.java @@ -118,11 +118,11 @@ public class ChargeHud { if (euValue > 1000000) { double tenX = Math.round(euValue / 100000); - return Double.toString(tenX / 10.0).concat(" m EU"); + return Double.toString(tenX / 10.0).concat("M "); } else if (euValue > 1000) { double tenX = Math.round(euValue / 100); - return Double.toString(tenX / 10.0).concat(" k EU"); + return Double.toString(tenX / 10.0).concat("k "); } else { return Double.toString(Math.floor(euValue)).concat(" EU"); From c6bc7f6fb8739393d88616ebad82f6185afe4edb Mon Sep 17 00:00:00 2001 From: Gig Date: Sat, 20 Jun 2015 11:24:04 +0100 Subject: [PATCH 2/4] Little more work on pda lots more to do --- src/main/java/techreborn/api/IpdaItem.java | 10 ++++ .../java/techreborn/client/GuiHandler.java | 2 +- .../client/container/ContainerPda.java | 23 +++++++++ src/main/java/techreborn/pda/GuiPda.java | 46 +++++++++++++++--- .../assets/techreborn/textures/gui/pda.png | Bin 1167 -> 3132 bytes 5 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 src/main/java/techreborn/api/IpdaItem.java create mode 100644 src/main/java/techreborn/client/container/ContainerPda.java diff --git a/src/main/java/techreborn/api/IpdaItem.java b/src/main/java/techreborn/api/IpdaItem.java new file mode 100644 index 000000000..9a1aa93d6 --- /dev/null +++ b/src/main/java/techreborn/api/IpdaItem.java @@ -0,0 +1,10 @@ +package techreborn.api; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public interface IpdaItem +{ + //TODO +} diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 58845c856..416c2a960 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -248,7 +248,7 @@ public class GuiHandler implements IGuiHandler { (TileChemicalReactor) world.getTileEntity(x, y, z)); } else if (ID == pdaID) { - return new GuiPda(player); + return new GuiPda(player, new ContainerPda(player)); } else if (ID == destructoPackID) { return new GuiDestructoPack(new ContainerDestructoPack(player)); } else if (ID == lesuID) { diff --git a/src/main/java/techreborn/client/container/ContainerPda.java b/src/main/java/techreborn/client/container/ContainerPda.java new file mode 100644 index 000000000..a256000f4 --- /dev/null +++ b/src/main/java/techreborn/client/container/ContainerPda.java @@ -0,0 +1,23 @@ +package techreborn.client.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Slot; +import techreborn.api.recipe.RecipeCrafter; +import techreborn.client.SlotOutput; +import techreborn.tiles.TileAlloySmelter; + +public class ContainerPda extends TechRebornContainer { + + EntityPlayer player; + public ContainerPda(EntityPlayer player) + { + + } + + @Override + public boolean canInteractWith(EntityPlayer player) + { + return true; + } + +} diff --git a/src/main/java/techreborn/pda/GuiPda.java b/src/main/java/techreborn/pda/GuiPda.java index 165238f95..7c3e773c2 100644 --- a/src/main/java/techreborn/pda/GuiPda.java +++ b/src/main/java/techreborn/pda/GuiPda.java @@ -1,20 +1,27 @@ package techreborn.pda; +import java.awt.Container; + +import techreborn.client.container.ContainerPda; +import techreborn.cofhLib.gui.GuiBase; +import techreborn.cofhLib.gui.GuiColor; +import techreborn.cofhLib.gui.element.ElementSlider; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; -public class GuiPda extends GuiScreen { +public class GuiPda extends GuiBase { + public final int guiHeight = 256; public final int guiWidth = 256; - public final int guiHeight = 180; private int guiLeft, guiTop; + private ElementSlider slider; - private static final ResourceLocation pdaGuipages = new ResourceLocation( - "techreborn:" + "textures/gui/pda.png"); + private static final ResourceLocation pdaGuipages = new ResourceLocation("techreborn:" + "textures/gui/pda.png"); - public GuiPda(EntityPlayer player) + public GuiPda(EntityPlayer player, ContainerPda container) { + super(container); } @Override @@ -23,6 +30,27 @@ public class GuiPda extends GuiScreen { super.initGui(); this.guiLeft = this.width / 2 - this.guiWidth / 2; this.guiTop = this.height / 2 - this.guiHeight / 2; + //TODO fix + slider = new ElementSlider(this, "scrollBar", 239, 36, 12, 201, 187, 0) + { + @Override + protected void dragSlider(int x, int y) + { + if (y > _value) + { + setValue(_value + 1); + } + else + { + setValue(_value - 1); + } + } + }; + + slider.backgroundColor = new GuiColor(0, 0, 0, 0).getColor(); + slider.borderColor = new GuiColor(0, 0, 0, 0).getColor(); + slider.setSliderSize(12, 15); + addElement(slider); } @Override @@ -30,7 +58,13 @@ public class GuiPda extends GuiScreen { { mc.getTextureManager().bindTexture(pdaGuipages); drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.guiWidth,this.guiHeight); - super.drawScreen(mouseX, mouseY, partialTicks); +// super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public boolean doesGuiPauseGame() + { + return false; } } diff --git a/src/main/resources/assets/techreborn/textures/gui/pda.png b/src/main/resources/assets/techreborn/textures/gui/pda.png index 9f7699536c5d9dfcddb0f4ce23a4afb13f2cb51a..727c2a0516b567ce8b0824aa0239d986dc9d90b9 100644 GIT binary patch literal 3132 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5bvW37l#WcUHi%aoRtvY3H^?=T269?xHq0u+=eag8Vm&QB{TPb^AhC`ioAE78kKEm1Jh zGte{cc{V+Ofq{Fir;B4qMcmsfhIz7qJV!6w{LeIbi|54D8wG+w>J#?Vq7KME*?vgbU9&> zz#_!5BxizXg|AM-U7ov(nkH%X#`iWazy3YurH8Q1U)ihTXM88Ac!JQEC4c|^JnaA2 z|KjHtu&DW5w>P3uiJme1-?mn-dIo_E+1~ zL9{}{N}Acg9wc%A*<)y-cjF-Ak53<^87kNyzT8{PuvBaFOxODvY+vm5}uXaB0wI{uHPrTjTe~=XY`mrQKh1}yv`ST11K1-bcRq>CV s;e4{qYqWeY4U%I9g1of3boXEGi}lQAbEdtM02U4mp00i_>zopr01z*eWB>pF From 5d9c2737434892851ed90801e95ce6f9e9a7883d Mon Sep 17 00:00:00 2001 From: Gig Date: Sat, 20 Jun 2015 21:34:03 +0100 Subject: [PATCH 3/4] Massive cleanup on the fluids --- .../blocks/fluid/BlockFluidCalcium.java | 14 ---- .../fluid/BlockFluidCalciumCarbonate.java | 14 ---- .../blocks/fluid/BlockFluidChlorite.java | 14 ---- .../blocks/fluid/BlockFluidDeuterium.java | 14 ---- .../blocks/fluid/BlockFluidGlyceryl.java | 14 ---- .../blocks/fluid/BlockFluidHelium.java | 14 ---- .../blocks/fluid/BlockFluidHelium3.java | 14 ---- .../blocks/fluid/BlockFluidHeliumplasma.java | 14 ---- .../blocks/fluid/BlockFluidHydrogen.java | 14 ---- .../blocks/fluid/BlockFluidLithium.java | 14 ---- .../blocks/fluid/BlockFluidMercury.java | 14 ---- .../blocks/fluid/BlockFluidMethane.java | 14 ---- .../blocks/fluid/BlockFluidNitrocoalfuel.java | 14 ---- .../blocks/fluid/BlockFluidNitrofuel.java | 14 ---- .../blocks/fluid/BlockFluidNitrogen.java | 14 ---- .../fluid/BlockFluidNitrogendioxide.java | 14 ---- .../blocks/fluid/BlockFluidPotassium.java | 14 ---- .../blocks/fluid/BlockFluidSilicon.java | 14 ---- .../blocks/fluid/BlockFluidSodium.java | 14 ---- .../fluid/BlockFluidSodiumpersulfate.java | 14 ---- ...erylium.java => BlockFluidTechReborn.java} | 6 +- .../blocks/fluid/BlockFluidTritium.java | 14 ---- .../blocks/fluid/BlockFluidWolframium.java | 14 ---- src/main/java/techreborn/init/ModFluids.java | 70 +++++++------------ 24 files changed, 27 insertions(+), 357 deletions(-) delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidCalcium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidCalciumCarbonate.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidChlorite.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidDeuterium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidGlyceryl.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidHelium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidHelium3.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidHeliumplasma.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidHydrogen.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidLithium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidMercury.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidMethane.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidNitrocoalfuel.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidNitrofuel.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidNitrogen.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidNitrogendioxide.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidPotassium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidSilicon.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidSodium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidSodiumpersulfate.java rename src/main/java/techreborn/blocks/fluid/{BlockFluidBerylium.java => BlockFluidTechReborn.java} (50%) delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidTritium.java delete mode 100644 src/main/java/techreborn/blocks/fluid/BlockFluidWolframium.java diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidCalcium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidCalcium.java deleted file mode 100644 index cfbac2c60..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidCalcium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidCalcium extends BlockFluidBase{ - - public BlockFluidCalcium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.calcium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidCalciumCarbonate.java b/src/main/java/techreborn/blocks/fluid/BlockFluidCalciumCarbonate.java deleted file mode 100644 index efb102dbb..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidCalciumCarbonate.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidCalciumCarbonate extends BlockFluidBase{ - - public BlockFluidCalciumCarbonate(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.calciumcarbonate"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidChlorite.java b/src/main/java/techreborn/blocks/fluid/BlockFluidChlorite.java deleted file mode 100644 index be405561c..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidChlorite.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidChlorite extends BlockFluidBase{ - - public BlockFluidChlorite(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.chlorite"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidDeuterium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidDeuterium.java deleted file mode 100644 index 9dc60fc08..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidDeuterium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidDeuterium extends BlockFluidBase{ - - public BlockFluidDeuterium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.deuterium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidGlyceryl.java b/src/main/java/techreborn/blocks/fluid/BlockFluidGlyceryl.java deleted file mode 100644 index 601bc641b..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidGlyceryl.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidGlyceryl extends BlockFluidBase{ - - public BlockFluidGlyceryl(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.glyceryl"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidHelium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidHelium.java deleted file mode 100644 index e2f584e1e..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidHelium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidHelium extends BlockFluidBase{ - - public BlockFluidHelium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.helium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidHelium3.java b/src/main/java/techreborn/blocks/fluid/BlockFluidHelium3.java deleted file mode 100644 index b4443577d..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidHelium3.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidHelium3 extends BlockFluidBase{ - - public BlockFluidHelium3(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.helium3"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidHeliumplasma.java b/src/main/java/techreborn/blocks/fluid/BlockFluidHeliumplasma.java deleted file mode 100644 index f050ac753..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidHeliumplasma.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidHeliumplasma extends BlockFluidBase{ - - public BlockFluidHeliumplasma(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.heliumplasma"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidHydrogen.java b/src/main/java/techreborn/blocks/fluid/BlockFluidHydrogen.java deleted file mode 100644 index a26bf4899..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidHydrogen.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidHydrogen extends BlockFluidBase{ - - public BlockFluidHydrogen(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.hydrogen"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidLithium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidLithium.java deleted file mode 100644 index 0b5fc2b1f..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidLithium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidLithium extends BlockFluidBase{ - - public BlockFluidLithium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.lithium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidMercury.java b/src/main/java/techreborn/blocks/fluid/BlockFluidMercury.java deleted file mode 100644 index 22b70afd3..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidMercury.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidMercury extends BlockFluidBase{ - - public BlockFluidMercury(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.mercury"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidMethane.java b/src/main/java/techreborn/blocks/fluid/BlockFluidMethane.java deleted file mode 100644 index 962ddbd48..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidMethane.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidMethane extends BlockFluidBase{ - - public BlockFluidMethane(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.methane"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrocoalfuel.java b/src/main/java/techreborn/blocks/fluid/BlockFluidNitrocoalfuel.java deleted file mode 100644 index b3ab9d56f..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrocoalfuel.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidNitrocoalfuel extends BlockFluidBase{ - - public BlockFluidNitrocoalfuel(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.nitrocoalfuel"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrofuel.java b/src/main/java/techreborn/blocks/fluid/BlockFluidNitrofuel.java deleted file mode 100644 index d96681fcc..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrofuel.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidNitrofuel extends BlockFluidBase{ - - public BlockFluidNitrofuel(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.nitrofuel"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogen.java b/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogen.java deleted file mode 100644 index 56f3c615b..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogen.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidNitrogen extends BlockFluidBase{ - - public BlockFluidNitrogen(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.nitrogen"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogendioxide.java b/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogendioxide.java deleted file mode 100644 index 6ad572c64..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidNitrogendioxide.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidNitrogendioxide extends BlockFluidBase{ - - public BlockFluidNitrogendioxide(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.nitrogendioxide"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidPotassium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidPotassium.java deleted file mode 100644 index c36dd8d2e..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidPotassium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidPotassium extends BlockFluidBase{ - - public BlockFluidPotassium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.potassium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidSilicon.java b/src/main/java/techreborn/blocks/fluid/BlockFluidSilicon.java deleted file mode 100644 index c2645553f..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidSilicon.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidSilicon extends BlockFluidBase{ - - public BlockFluidSilicon(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.silicon"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidSodium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidSodium.java deleted file mode 100644 index 24782457e..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidSodium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidSodium extends BlockFluidBase{ - - public BlockFluidSodium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.sodium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidSodiumpersulfate.java b/src/main/java/techreborn/blocks/fluid/BlockFluidSodiumpersulfate.java deleted file mode 100644 index e57ebaaba..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidSodiumpersulfate.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidSodiumpersulfate extends BlockFluidBase{ - - public BlockFluidSodiumpersulfate(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.sodiumpersulfate"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidBerylium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java similarity index 50% rename from src/main/java/techreborn/blocks/fluid/BlockFluidBerylium.java rename to src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java index 70dbb40ff..94b7926be 100644 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidBerylium.java +++ b/src/main/java/techreborn/blocks/fluid/BlockFluidTechReborn.java @@ -3,12 +3,12 @@ package techreborn.blocks.fluid; import net.minecraft.block.material.Material; import net.minecraftforge.fluids.Fluid; -public class BlockFluidBerylium extends BlockFluidBase{ +public class BlockFluidTechReborn extends BlockFluidBase{ - public BlockFluidBerylium(Fluid fluid, Material material) + public BlockFluidTechReborn(Fluid fluid, Material material, String name) { super(fluid, material); - setBlockName("techreborn.berylium"); + setBlockName(name); } } diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidTritium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidTritium.java deleted file mode 100644 index e66b10d67..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidTritium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidTritium extends BlockFluidBase{ - - public BlockFluidTritium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.tritium"); - } - -} diff --git a/src/main/java/techreborn/blocks/fluid/BlockFluidWolframium.java b/src/main/java/techreborn/blocks/fluid/BlockFluidWolframium.java deleted file mode 100644 index dc1eab79b..000000000 --- a/src/main/java/techreborn/blocks/fluid/BlockFluidWolframium.java +++ /dev/null @@ -1,14 +0,0 @@ -package techreborn.blocks.fluid; - -import net.minecraft.block.material.Material; -import net.minecraftforge.fluids.Fluid; - -public class BlockFluidWolframium extends BlockFluidBase{ - - public BlockFluidWolframium(Fluid fluid, Material material) - { - super(fluid, material); - setBlockName("techreborn.wolframium"); - } - -} diff --git a/src/main/java/techreborn/init/ModFluids.java b/src/main/java/techreborn/init/ModFluids.java index 2c3dd1c18..3cb1eab71 100644 --- a/src/main/java/techreborn/init/ModFluids.java +++ b/src/main/java/techreborn/init/ModFluids.java @@ -4,29 +4,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; -import techreborn.blocks.fluid.BlockFluidBerylium; -import techreborn.blocks.fluid.BlockFluidCalcium; -import techreborn.blocks.fluid.BlockFluidCalciumCarbonate; -import techreborn.blocks.fluid.BlockFluidChlorite; -import techreborn.blocks.fluid.BlockFluidDeuterium; -import techreborn.blocks.fluid.BlockFluidGlyceryl; -import techreborn.blocks.fluid.BlockFluidHelium; -import techreborn.blocks.fluid.BlockFluidHelium3; -import techreborn.blocks.fluid.BlockFluidHeliumplasma; -import techreborn.blocks.fluid.BlockFluidHydrogen; -import techreborn.blocks.fluid.BlockFluidLithium; -import techreborn.blocks.fluid.BlockFluidMercury; -import techreborn.blocks.fluid.BlockFluidMethane; -import techreborn.blocks.fluid.BlockFluidNitrocoalfuel; -import techreborn.blocks.fluid.BlockFluidNitrofuel; -import techreborn.blocks.fluid.BlockFluidNitrogen; -import techreborn.blocks.fluid.BlockFluidNitrogendioxide; -import techreborn.blocks.fluid.BlockFluidPotassium; -import techreborn.blocks.fluid.BlockFluidSilicon; -import techreborn.blocks.fluid.BlockFluidSodium; -import techreborn.blocks.fluid.BlockFluidSodiumpersulfate; -import techreborn.blocks.fluid.BlockFluidTritium; -import techreborn.blocks.fluid.BlockFluidWolframium; +import techreborn.blocks.fluid.BlockFluidTechReborn; import techreborn.lib.ModInfo; import cpw.mods.fml.common.registry.GameRegistry; @@ -104,117 +82,117 @@ public class ModFluids { public static void init() { FluidRegistry.registerFluid(fluidberylium); - BlockFluidBerylium = new BlockFluidBerylium(fluidberylium, Material.water); + BlockFluidBerylium = new BlockFluidTechReborn(fluidberylium, Material.water, "techreborn.berylium"); GameRegistry.registerBlock(BlockFluidBerylium, ModInfo.MOD_ID + "_" + BlockFluidBerylium.getUnlocalizedName().substring(5)); fluidberylium.setUnlocalizedName(BlockFluidBerylium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidcalcium); - BlockFluidCalcium = new BlockFluidCalcium(fluidcalcium, Material.water); + BlockFluidCalcium = new BlockFluidTechReborn(fluidcalcium, Material.water, "techreborn.calcium"); GameRegistry.registerBlock(BlockFluidCalcium, ModInfo.MOD_ID + "_" + BlockFluidCalcium.getUnlocalizedName().substring(5)); fluidcalcium.setUnlocalizedName(BlockFluidCalcium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidcalciumcarbonate); - BlockFluidCalciumCarbonate = new BlockFluidCalciumCarbonate(fluidcalciumcarbonate, Material.water); + BlockFluidCalciumCarbonate = new BlockFluidTechReborn(fluidcalciumcarbonate, Material.water, "techreborn.calciumcarbonate"); GameRegistry.registerBlock(BlockFluidCalciumCarbonate, ModInfo.MOD_ID + "_" + BlockFluidCalciumCarbonate.getUnlocalizedName().substring(5)); fluidcalcium.setUnlocalizedName(BlockFluidCalciumCarbonate.getUnlocalizedName()); FluidRegistry.registerFluid(fluidChlorite); - BlockFluidChlorite = new BlockFluidChlorite(fluidChlorite, Material.water); + BlockFluidChlorite = new BlockFluidTechReborn(fluidChlorite, Material.water, "techreborn.chlorite"); GameRegistry.registerBlock(BlockFluidChlorite, ModInfo.MOD_ID + "_" + BlockFluidChlorite.getUnlocalizedName().substring(5)); fluidChlorite.setUnlocalizedName(BlockFluidChlorite.getUnlocalizedName()); FluidRegistry.registerFluid(fluidDeuterium); - BlockFluidDeuterium = new BlockFluidDeuterium(fluidDeuterium, Material.water); + BlockFluidDeuterium = new BlockFluidTechReborn(fluidDeuterium, Material.water, "techreborn.deuterium"); GameRegistry.registerBlock(BlockFluidDeuterium, ModInfo.MOD_ID + "_" + BlockFluidDeuterium.getUnlocalizedName().substring(5)); fluidDeuterium.setUnlocalizedName(BlockFluidDeuterium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidGlyceryl); - BlockFluidGlyceryl = new BlockFluidGlyceryl(fluidGlyceryl, Material.water); + BlockFluidGlyceryl = new BlockFluidTechReborn(fluidGlyceryl, Material.water, "techreborn.glyceryl"); GameRegistry.registerBlock(BlockFluidGlyceryl, ModInfo.MOD_ID + "_" + BlockFluidGlyceryl.getUnlocalizedName().substring(5)); fluidGlyceryl.setUnlocalizedName(BlockFluidGlyceryl.getUnlocalizedName()); FluidRegistry.registerFluid(fluidHelium); - BlockFluidHelium = new BlockFluidHelium(fluidHelium, Material.water); + BlockFluidHelium = new BlockFluidTechReborn(fluidHelium, Material.water, "techreborn.helium"); GameRegistry.registerBlock(BlockFluidHelium, ModInfo.MOD_ID + "_" + BlockFluidHelium.getUnlocalizedName().substring(5)); fluidHelium.setUnlocalizedName(BlockFluidHelium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidHelium3); - BlockFluidHelium3 = new BlockFluidHelium3(fluidHelium3, Material.water); + BlockFluidHelium3 = new BlockFluidTechReborn(fluidHelium3, Material.water, "techreborn.helium3"); GameRegistry.registerBlock(BlockFluidHelium3, ModInfo.MOD_ID + "_" + BlockFluidHelium3.getUnlocalizedName().substring(5)); fluidHelium3.setUnlocalizedName(BlockFluidHelium3.getUnlocalizedName()); FluidRegistry.registerFluid(fluidHeliumplasma); - BlockFluidHeliumplasma = new BlockFluidHeliumplasma(fluidHeliumplasma, Material.water); + BlockFluidHeliumplasma = new BlockFluidTechReborn(fluidHeliumplasma, Material.water, "techreborn.heliumplasma"); GameRegistry.registerBlock(BlockFluidHeliumplasma, ModInfo.MOD_ID + "_" + BlockFluidHeliumplasma.getUnlocalizedName().substring(5)); fluidHeliumplasma.setUnlocalizedName(fluidHeliumplasma.getUnlocalizedName()); FluidRegistry.registerFluid(fluidHydrogen); - BlockFluidHydrogen = new BlockFluidHydrogen(fluidHydrogen, Material.water); + BlockFluidHydrogen = new BlockFluidTechReborn(fluidHydrogen, Material.water, "techreborn.hydrogen"); GameRegistry.registerBlock(BlockFluidHydrogen, ModInfo.MOD_ID + "_" + BlockFluidHydrogen.getUnlocalizedName().substring(5)); fluidHydrogen.setUnlocalizedName(fluidHydrogen.getUnlocalizedName()); FluidRegistry.registerFluid(fluidLithium); - BlockFluidLithium = new BlockFluidLithium(fluidLithium, Material.water); + BlockFluidLithium = new BlockFluidTechReborn(fluidLithium, Material.water, "techreborn.lithium"); GameRegistry.registerBlock(BlockFluidLithium, ModInfo.MOD_ID + "_" + BlockFluidLithium.getUnlocalizedName().substring(5)); fluidLithium.setUnlocalizedName(fluidLithium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidMercury); - BlockFluidMercury = new BlockFluidMercury(fluidMercury, Material.water); + BlockFluidMercury = new BlockFluidTechReborn(fluidMercury, Material.water, "techreborn.mercury"); GameRegistry.registerBlock(BlockFluidMercury, ModInfo.MOD_ID + "_" + BlockFluidMercury.getUnlocalizedName().substring(5)); fluidMercury.setUnlocalizedName(fluidMercury.getUnlocalizedName()); FluidRegistry.registerFluid(fluidMethane); - BlockFluidMethane = new BlockFluidMethane(fluidMethane, Material.water); + BlockFluidMethane = new BlockFluidTechReborn(fluidMethane, Material.water, "techreborn.methane"); GameRegistry.registerBlock(BlockFluidMethane, ModInfo.MOD_ID + "_" + BlockFluidMethane.getUnlocalizedName().substring(5)); fluidMethane.setUnlocalizedName(fluidMethane.getUnlocalizedName()); FluidRegistry.registerFluid(fluidNitrocoalfuel); - BlockFluidNitrocoalfuel = new BlockFluidNitrocoalfuel(fluidNitrocoalfuel, Material.water); + BlockFluidNitrocoalfuel = new BlockFluidTechReborn(fluidNitrocoalfuel, Material.water, "techreborn.nitrocoalfuel"); GameRegistry.registerBlock(BlockFluidNitrocoalfuel, ModInfo.MOD_ID + "_" + BlockFluidNitrocoalfuel.getUnlocalizedName().substring(5)); fluidNitrocoalfuel.setUnlocalizedName(fluidNitrocoalfuel.getUnlocalizedName()); FluidRegistry.registerFluid(fluidNitrofuel); - BlockFluidNitrofuel = new BlockFluidNitrofuel(fluidNitrofuel, Material.water); + BlockFluidNitrofuel = new BlockFluidTechReborn(fluidNitrofuel, Material.water, "techreborn.nitrofuel"); GameRegistry.registerBlock(BlockFluidNitrofuel, ModInfo.MOD_ID + "_" + BlockFluidNitrofuel.getUnlocalizedName().substring(5)); fluidNitrofuel.setUnlocalizedName(fluidNitrofuel.getUnlocalizedName()); FluidRegistry.registerFluid(fluidNitrogen); - BlockFluidNitrogen = new BlockFluidNitrogen(fluidNitrogen, Material.water); + BlockFluidNitrogen = new BlockFluidTechReborn(fluidNitrogen, Material.water, "techreborn.nitrogen"); GameRegistry.registerBlock(BlockFluidNitrogen, ModInfo.MOD_ID + "_" + BlockFluidNitrogen.getUnlocalizedName().substring(5)); fluidNitrogen.setUnlocalizedName(fluidNitrogen.getUnlocalizedName()); FluidRegistry.registerFluid(fluidNitrogendioxide); - BlockFluidNitrogendioxide = new BlockFluidNitrogendioxide(fluidNitrogendioxide, Material.water); + BlockFluidNitrogendioxide = new BlockFluidTechReborn(fluidNitrogendioxide, Material.water, "techreborn.nitrogendioxide"); GameRegistry.registerBlock(BlockFluidNitrogendioxide, ModInfo.MOD_ID + "_" + BlockFluidNitrogendioxide.getUnlocalizedName().substring(5)); fluidNitrogendioxide.setUnlocalizedName(fluidNitrogendioxide.getUnlocalizedName()); FluidRegistry.registerFluid(fluidPotassium); - BlockFluidPotassium = new BlockFluidPotassium(fluidPotassium, Material.water); + BlockFluidPotassium = new BlockFluidTechReborn(fluidPotassium, Material.water, "techreborn.potassium"); GameRegistry.registerBlock(BlockFluidPotassium, ModInfo.MOD_ID + "_" + BlockFluidPotassium.getUnlocalizedName().substring(5)); fluidPotassium.setUnlocalizedName(fluidPotassium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidSilicon); - BlockFluidSilicon = new BlockFluidSilicon(fluidSilicon, Material.water); + BlockFluidSilicon = new BlockFluidTechReborn(fluidSilicon, Material.water, "techreborn.silicon"); GameRegistry.registerBlock(BlockFluidSilicon, ModInfo.MOD_ID + "_" + BlockFluidSilicon.getUnlocalizedName().substring(5)); fluidSilicon.setUnlocalizedName(fluidSilicon.getUnlocalizedName()); FluidRegistry.registerFluid(fluidSodium); - BlockFluidSodium = new BlockFluidSodium(fluidSodium, Material.water); + BlockFluidSodium = new BlockFluidTechReborn(fluidSodium, Material.water, "techreborn.sodium"); GameRegistry.registerBlock(BlockFluidSodium, ModInfo.MOD_ID + "_" + BlockFluidSodium.getUnlocalizedName().substring(5)); fluidSodium.setUnlocalizedName(fluidSodium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidSodiumpersulfate); - BlockFluidSodiumpersulfate = new BlockFluidSodiumpersulfate(fluidSodiumpersulfate, Material.water); + BlockFluidSodiumpersulfate = new BlockFluidTechReborn(fluidSodiumpersulfate, Material.water, "techreborn.sodiumpersulfate"); GameRegistry.registerBlock(BlockFluidSodiumpersulfate, ModInfo.MOD_ID + "_" + BlockFluidSodiumpersulfate.getUnlocalizedName().substring(5)); fluidSodiumpersulfate.setUnlocalizedName(fluidSodiumpersulfate.getUnlocalizedName()); FluidRegistry.registerFluid(fluidTritium); - BlockFluidTritium = new BlockFluidTritium(fluidTritium, Material.water); + BlockFluidTritium = new BlockFluidTechReborn(fluidTritium, Material.water, "techreborn.tritium"); GameRegistry.registerBlock(BlockFluidTritium, ModInfo.MOD_ID + "_" + BlockFluidTritium.getUnlocalizedName().substring(5)); fluidTritium.setUnlocalizedName(fluidTritium.getUnlocalizedName()); FluidRegistry.registerFluid(fluidWolframium); - BlockFluidWolframium = new BlockFluidWolframium(fluidWolframium, Material.water); + BlockFluidWolframium = new BlockFluidTechReborn(fluidWolframium, Material.water, "techreborn.wolframium"); GameRegistry.registerBlock(BlockFluidWolframium, ModInfo.MOD_ID + "_" + BlockFluidWolframium.getUnlocalizedName().substring(5)); fluidWolframium.setUnlocalizedName(fluidWolframium.getUnlocalizedName()); From 49a359f17813af61d92bb535e532c889c3e50fa2 Mon Sep 17 00:00:00 2001 From: Gig Date: Sat, 20 Jun 2015 21:54:08 +0100 Subject: [PATCH 4/4] blast furnace gui should still open even if there is no multiblock --- .../blocks/machine/BlockBlastFurnace.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java b/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java index 45ffec40b..c499cdd8d 100644 --- a/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java +++ b/src/main/java/techreborn/blocks/machine/BlockBlastFurnace.java @@ -51,22 +51,8 @@ public class BlockBlastFurnace extends BlockMachineBase { EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (!player.isSneaking()) - for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) - { - if (world.getTileEntity(x + direction.offsetX, y - + direction.offsetY, z + direction.offsetZ) instanceof TileMachineCasing) - { - TileMachineCasing casing = (TileMachineCasing) world - .getTileEntity(x + direction.offsetX, y - + direction.offsetY, z + direction.offsetZ); - if (casing.getMultiblockController() != null - && casing.getMultiblockController().isAssembled() && !casing.getMultiblockController().isStar) - { - player.openGui(Core.INSTANCE, - GuiHandler.blastFurnaceID, world, x, y, z); - } - } - } + player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y, + z); return true; }