aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-03-04 12:58:47 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-03-04 12:58:47 +1000
commitae21012d216df71f31aed6fbc9d76215fc24ceed (patch)
treecc89accbe6ce5c04b72ed3c5e46b2a185f88be6a /src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator
parentba89972a22a316030f8c3bd99974f915b1d7aefc (diff)
downloadGT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.gz
GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.tar.bz2
GT5-Unofficial-ae21012d216df71f31aed6fbc9d76215fc24ceed.zip
+ New texture for the slow builders ring.
+ Added the Alkalus Disk. $ Fixed Frame Box Assembler Recipes. $ Fixed Missing 7Li material. $ Fixed Tiered Tanks not showing their capacity in the tooltip. $ Fixed tooltips for alloys containing Bronze or Steel. $ Fixed Clay Pipe Extruder Recipes. - Removed a handful of Plasma cells for misc. materials. % Changed the Industrial Coke Oven's tooltip, to better describe the input/output requirements. % Cleaned up The Entire Project.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator')
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java108
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java42
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java15
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java75
4 files changed, 118 insertions, 122 deletions
diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java
index 1287b81e49..7038d98a7d 100644
--- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java
+++ b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/BlockRTG.java
@@ -1,5 +1,13 @@
package gtPlusPlus.xmod.ic2.block.RTGGenerator;
+import java.util.List;
+import java.util.Random;
+
+import org.apache.commons.lang3.mutable.MutableObject;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.xmod.ic2.block.kieticgenerator.tileentity.TileEntityKineticWindGenerator;
import gtPlusPlus.xmod.ic2.item.IC2_Items;
@@ -10,10 +18,6 @@ import ic2.core.block.BlockMultiID;
import ic2.core.block.TileEntityBlock;
import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric;
import ic2.core.init.InternalName;
-
-import java.util.List;
-import java.util.Random;
-
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -21,21 +25,15 @@ import net.minecraft.item.*;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
-import org.apache.commons.lang3.mutable.MutableObject;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
public class BlockRTG
extends BlockMultiID
{
- public BlockRTG(InternalName internalName1)
+ public BlockRTG(final InternalName internalName1)
{
super(internalName1, Material.iron, ItemGenerators.class);
- setCreativeTab(AddToCreativeTab.tabMachines);
- setHardness(3.0F);
- setStepSound(soundTypeMetal);
+ this.setCreativeTab(AddToCreativeTab.tabMachines);
+ this.setHardness(3.0F);
+ this.setStepSound(soundTypeMetal);
IC2_Items.blockRTG = new ItemStack(this, 1, 0);
IC2_Items.blockKineticGenerator = new ItemStack(this, 1, 1);
@@ -45,14 +43,14 @@ extends BlockMultiID
}
@Override
- public void getSubBlocks(Item j, CreativeTabs tabs, List itemList) {
- Item item = Item.getItemFromBlock(this);
+ public void getSubBlocks(final Item j, final CreativeTabs tabs, final List itemList) {
+ final Item item = Item.getItemFromBlock(this);
if (!item.getHasSubtypes()) {
itemList.add(new ItemStack(this));
} else {
for (int i = 0; i < 16; i++)
{
- ItemStack is = new ItemStack(this, 1, i);
+ final ItemStack is = new ItemStack(this, 1, i);
if (is.getItem().getUnlocalizedName(is) == null) {
break;
}
@@ -63,36 +61,36 @@ extends BlockMultiID
@Override
- public String getTextureFolder(int id)
+ public String getTextureFolder(final int id)
{
return "generator";
}
@Override
- public int damageDropped(int meta)
+ public int damageDropped(final int meta)
{
switch (meta)
{
- case 2:
+ case 2:
return 2;
}
return 0;
}
@Override
- public Class<? extends TileEntity> getTeClass(int meta, MutableObject<Class<?>[]> ctorArgTypes, MutableObject<Object[]> ctorArgs)
+ public Class<? extends TileEntity> getTeClass(final int meta, final MutableObject<Class<?>[]> ctorArgTypes, final MutableObject<Object[]> ctorArgs)
{
try
{
switch (meta)
- {
- case 0:
- return TileEntityRTG.class;
- case 1:
+ {
+ case 0:
+ return TileEntityRTG.class;
+ case 1:
return TileEntityKineticWindGenerator.class;
}
}
- catch (Exception e)
+ catch (final Exception e)
{
throw new RuntimeException(e);
}
@@ -100,75 +98,75 @@ extends BlockMultiID
}
/*
- *
+ *
* {
- case 0:
+ case 0:
return TileEntityGenerator.class;
- case 1:
+ case 1:
return TileEntityGeoGenerator.class;
- case 2:
+ case 2:
return TileEntityWaterGenerator.class;
- case 3:
+ case 3:
return TileEntitySolarGenerator.class;
- case 4:
+ case 4:
return TileEntityWindGenerator.class;
- case 5:
+ case 5:
return TileEntityNuclearReactorElectric.class;
- case 6:
+ case 6:
return TileEntityRTGenerator.class;
- case 7:
+ case 7:
return TileEntitySemifluidGenerator.class;
- case 8:
+ case 8:
return TileEntityStirlingGenerator.class;
- case 9:
+ case 9:
return TileEntityKineticGenerator.class;
}
- *
+ *
* (non-Javadoc)
* @see net.minecraft.block.Block#randomDisplayTick(net.minecraft.world.World, int, int, int, java.util.Random)
*/
@Override
- public void randomDisplayTick(World world, int x, int y, int z, Random random)
+ public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random random)
{
if (!IC2.platform.isRendering()) {
return;
}
- int meta = world.getBlockMetadata(x, y, z);
- if ((meta == 0) && (isActive(world, x, y, z)))
+ final int meta = world.getBlockMetadata(x, y, z);
+ if ((meta == 0) && (this.isActive(world, x, y, z)))
{
- TileEntityBlock te = (TileEntityBlock)getOwnTe(world, x, y, z);
+ final TileEntityBlock te = (TileEntityBlock)this.getOwnTe(world, x, y, z);
if (te == null) {
return;
}
- int l = te.getFacing();
- float f = x + 0.5F;
- float f1 = y + 0.0F + random.nextFloat() * 6.0F / 16.0F;
- float f2 = z + 0.5F;
- float f3 = 0.52F;
- float f4 = random.nextFloat() * 0.6F - 0.3F;
+ final int l = te.getFacing();
+ final float f = x + 0.5F;
+ final float f1 = y + 0.0F + ((random.nextFloat() * 6.0F) / 16.0F);
+ final float f2 = z + 0.5F;
+ final float f3 = 0.52F;
+ final float f4 = (random.nextFloat() * 0.6F) - 0.3F;
switch (l)
{
- case 4:
+ case 4:
world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
break;
- case 5:
+ case 5:
world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D);
break;
- case 2:
+ case 2:
world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D);
break;
- case 3:
+ case 3:
world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D);
}
}
else if (meta == 5)
{
- TileEntityNuclearReactorElectric te = (TileEntityNuclearReactorElectric)getOwnTe(world, x, y, z);
+ final TileEntityNuclearReactorElectric te = (TileEntityNuclearReactorElectric)this.getOwnTe(world, x, y, z);
if (te == null) {
return;
}
@@ -188,7 +186,7 @@ extends BlockMultiID
}
@Override
- public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int side, float a, float b, float c)
+ public boolean onBlockActivated(final World world, final int i, final int j, final int k, final EntityPlayer entityplayer, final int side, final float a, final float b, final float c)
{
if ((entityplayer.getCurrentEquippedItem() != null) && (entityplayer.getCurrentEquippedItem().isItemEqual(Ic2Items.reactorChamber))) {
return false;
@@ -198,7 +196,7 @@ extends BlockMultiID
@Override
@SideOnly(Side.CLIENT)
- public EnumRarity getRarity(ItemStack stack)
+ public EnumRarity getRarity(final ItemStack stack)
{
return stack.getItemDamage() == 5 ? EnumRarity.uncommon : EnumRarity.common;
}
diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java
index cea09bdd5c..d057da8715 100644
--- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java
+++ b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/TileEntityRTG.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.ic2.block.RTGGenerator;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.CONTAINER_RTG;
import gtPlusPlus.xmod.ic2.block.RTGGenerator.gui.GUI_RTG;
import ic2.core.ContainerBase;
@@ -10,8 +12,6 @@ import ic2.core.block.invslot.InvSlotConsumableId;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public class TileEntityRTG
extends TileEntityRTGenerator
@@ -24,26 +24,26 @@ extends TileEntityRTGenerator
}
@Override
- public int gaugeFuelScaled(int i)
+ public int gaugeFuelScaled(final int i)
{
return i;
}
@Override
- public boolean gainEnergy()
- {
- int counter = 0;
- for (int i = 0; i < this.fuelSlot.size(); i++) {
- if (this.fuelSlot.get(i) != null) {
- counter++;
- }
- }
- if (counter == 0) {
- return false;
- }
- this.storage += (int)Math.pow(2.0D, counter - 1);
- return true;
- }
+ public boolean gainEnergy()
+ {
+ int counter = 0;
+ for (int i = 0; i < this.fuelSlot.size(); i++) {
+ if (this.fuelSlot.get(i) != null) {
+ counter++;
+ }
+ }
+ if (counter == 0) {
+ return false;
+ }
+ this.storage += (int)Math.pow(2.0D, counter - 1);
+ return true;
+ }
@Override
public boolean gainFuel()
@@ -62,16 +62,16 @@ extends TileEntityRTGenerator
{
return "RTG";
}
-
+
@Override
- public ContainerBase<TileEntityRTGenerator> getGuiContainer(EntityPlayer entityPlayer)
+ public ContainerBase<TileEntityRTGenerator> getGuiContainer(final EntityPlayer entityPlayer)
{
return new CONTAINER_RTG(entityPlayer, this);
}
@Override
@SideOnly(Side.CLIENT)
- public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin)
+ public GuiScreen getGui(final EntityPlayer entityPlayer, final boolean isAdmin)
{
return new GUI_RTG(new CONTAINER_RTG(entityPlayer, this));
}
@@ -82,5 +82,5 @@ extends TileEntityRTGenerator
return true;
}
-
+
}
diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java
index e9c7b5cc81..eae0c3dd9c 100644
--- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/CONTAINER_RTG.java
@@ -1,34 +1,33 @@
package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui;
+import java.util.List;
+
import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG;
import ic2.core.block.generator.container.ContainerRTGenerator;
import ic2.core.slot.SlotInvSlot;
-
-import java.util.List;
-
import net.minecraft.entity.player.EntityPlayer;
public class CONTAINER_RTG
extends ContainerRTGenerator
{
- public CONTAINER_RTG(EntityPlayer entityPlayer, TileEntityRTG tileEntity1)
+ public CONTAINER_RTG(final EntityPlayer entityPlayer, final TileEntityRTG tileEntity1)
{
super(entityPlayer, tileEntity1);
for (int i = 0; i < 4; i++) {
- addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + i * 18, 18));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + (i * 18), 18));
}
for (int i = 4; i < 8; i++) {
- addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + (i - 4) * 18, 36));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 4) * 18), 36));
}
for (int i = 8; i < 12; i++) {
- addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + (i - 8) * 18, 54));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.fuelSlot, i, 36 + ((i - 8) * 18), 54));
}
}
@Override
public List<String> getNetworkedFields()
{
- List<String> ret = super.getNetworkedFields();
+ final List<String> ret = super.getNetworkedFields();
ret.add("storage");
diff --git a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java
index 34ac0af814..72edb4403d 100644
--- a/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/ic2/block/RTGGenerator/gui/GUI_RTG.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.ic2.block.RTGGenerator.gui;
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.xmod.ic2.block.RTGGenerator.TileEntityRTG;
import ic2.core.IC2;
import ic2.core.block.generator.gui.GuiRTGenerator;
@@ -7,45 +11,40 @@ import ic2.core.util.GuiTooltipHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
-import org.lwjgl.opengl.GL11;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
@SideOnly(Side.CLIENT)
public class GUI_RTG
- extends GuiRTGenerator
+extends GuiRTGenerator
{
- public CONTAINER_RTG container;
-
- public GUI_RTG(CONTAINER_RTG container1)
- {
- super(container1);
-
- this.container = container1;
- this.name = "RTG Mach II";
- }
-
- @Override
-protected void drawGuiContainerForegroundLayer(int par1, int par2)
- {
- this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 4, 4210752);
-
- GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocalFormatted("ic2.generic.text.bufferEU", new Object[] { Double.valueOf(((TileEntityRTG)this.container.base).storage) }), 117, 38, 150, 48);
- }
-
- @Override
-protected void drawGuiContainerBackgroundLayer(float f, int x, int y)
- {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.getTextureManager().bindTexture(background);
- int j = (this.width - this.xSize) / 2;
- int k = (this.height - this.ySize) / 2;
- drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
-
- int i1 = ((TileEntityRTG)this.container.base).gaugeStorageScaled(31);
- drawTexturedModalRect(j + 119, k + 40, 179, 3, i1, 8);
- }
-
- private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIRTGenerator.png");
+ public CONTAINER_RTG container;
+
+ public GUI_RTG(final CONTAINER_RTG container1)
+ {
+ super(container1);
+
+ this.container = container1;
+ this.name = "RTG Mach II";
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int par1, final int par2)
+ {
+ this.fontRendererObj.drawString(this.name, (this.xSize - this.fontRendererObj.getStringWidth(this.name)) / 2, 4, 4210752);
+
+ GuiTooltipHelper.drawAreaTooltip(par1 - this.guiLeft, par2 - this.guiTop, StatCollector.translateToLocalFormatted("ic2.generic.text.bufferEU", new Object[] { Double.valueOf(((TileEntityRTG)this.container.base).storage) }), 117, 38, 150, 48);
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float f, final int x, final int y)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(background);
+ final int j = (this.width - this.xSize) / 2;
+ final int k = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+
+ final int i1 = ((TileEntityRTG)this.container.base).gaugeStorageScaled(31);
+ this.drawTexturedModalRect(j + 119, k + 40, 179, 3, i1, 8);
+ }
+
+ private static final ResourceLocation background = new ResourceLocation(IC2.textureDomain, "textures/gui/GUIRTGenerator.png");
}