aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/boilers
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-30 10:56:42 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-30 10:56:42 -0800
commit0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a (patch)
tree1e2c649f3a6ce3f6b2babd0098a5f4819e9cd0b6 /src/main/java/gregtech/common/tileentities/boilers
parentf8cc82edeb9810c45cba762d733a2c909a302faa (diff)
downloadGT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.gz
GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.tar.bz2
GT5-Unofficial-0d9aab72aa570f13dc3e32e0d32b3f3a95f95e0a.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/boilers')
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java148
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java225
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java61
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java163
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java38
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java41
6 files changed, 317 insertions, 359 deletions
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
index 9eb861ad06..3d2f69c26d 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
@@ -2,6 +2,14 @@ package gregtech.common.tileentities.boilers;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.api.drawable.UITexture;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
@@ -9,6 +17,7 @@ import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
@@ -30,16 +39,10 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
import gregtech.common.GT_Pollution;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.IFluidHandler;
public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTank
implements IGetTitleColor, IAddUIWidgets {
+
public static final byte SOUND_EVENT_LET_OFF_EXCESS_STEAM = 1;
public int mTemperature = 20;
public int mProcessingEnergy = 0;
@@ -48,13 +51,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
public boolean mHadNoWater = false;
private int mExcessWater = 0;
- public GT_MetaTileEntity_Boiler(
- int aID, String aName, String aNameRegional, String aDescription, ITexture... aTextures) {
+ public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String aDescription,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures);
}
- public GT_MetaTileEntity_Boiler(
- int aID, String aName, String aNameRegional, String[] aDescription, ITexture... aTextures) {
+ public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String[] aDescription,
+ ITexture... aTextures) {
super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures);
}
@@ -67,17 +70,12 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
- ITexture[] tmp =
- mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex + 1];
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
+ ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex
+ + 1];
if (aSide != aFacing && tmp.length == 2) {
- tmp = new ITexture[] {tmp[0]};
+ tmp = new ITexture[] { tmp[0] };
}
return tmp;
}
@@ -214,8 +212,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
}
try {
aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound()));
- } catch (Throwable ignored) {
- }
+ } catch (Throwable ignored) {}
}
@Override
@@ -275,8 +272,7 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
}
private void calculateHeatUp(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if ((this.mTemperature < getMaxTemperature())
- && (this.mProcessingEnergy > 0)
+ if ((this.mTemperature < getMaxTemperature()) && (this.mProcessingEnergy > 0)
&& (aTick % getHeatUpRate() == 0L)) {
this.mProcessingEnergy -= getEnergyConsumption();
this.mTemperature += getHeatUpAmount();
@@ -325,11 +321,10 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
protected final void pushSteamToSide(IGregTechTileEntity aBaseMetaTileEntity, int aSide) {
IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide((byte) aSide);
if (tTileEntity == null) return;
- FluidStack tDrained = aBaseMetaTileEntity.drain(
- ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false);
+ FluidStack tDrained = aBaseMetaTileEntity
+ .drain(ForgeDirection.getOrientation(aSide), Math.max(1, this.mSteam.amount / 2), false);
if (tDrained == null) return;
- int tFilledAmount =
- tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false);
+ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tDrained, false);
if (tFilledAmount <= 0) return;
tTileEntity.fill(
ForgeDirection.getOrientation(aSide).getOpposite(),
@@ -370,13 +365,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
if (aIndex == GT_MetaTileEntity_Boiler.SOUND_EVENT_LET_OFF_EXCESS_STEAM) {
GT_Utility.doSoundAtClient(SoundResource.RANDOM_FIZZ, 2, 1.0F, aX, aY, aZ);
- new ParticleEventBuilder()
- .setIdentifier(ParticleFX.CLOUD)
- .setWorld(getBaseMetaTileEntity().getWorld())
- .setMotion(0D, 0D, 0D)
- .<ParticleEventBuilder>times(8, x -> x.setPosition(
- aX - 0.5D + XSTR_INSTANCE.nextFloat(), aY, aZ - 0.5D + XSTR_INSTANCE.nextFloat())
- .run());
+ new ParticleEventBuilder().setIdentifier(ParticleFX.CLOUD).setWorld(getBaseMetaTileEntity().getWorld())
+ .setMotion(0D, 0D, 0D).<ParticleEventBuilder>times(
+ 8,
+ x -> x.setPosition(
+ aX - 0.5D + XSTR_INSTANCE.nextFloat(),
+ aY,
+ aZ - 0.5D + XSTR_INSTANCE.nextFloat()).run());
}
}
@@ -420,15 +415,13 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
}
protected IDrawable[] getFuelSlotBackground() {
- return new IDrawable[] {
- getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant())
- };
+ return new IDrawable[] { getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_COAL_STEAM.get(getSteamVariant()) };
}
protected IDrawable[] getAshSlotBackground() {
- return new IDrawable[] {
- getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())
- };
+ return new IDrawable[] { getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()) };
}
@Override
@@ -438,44 +431,41 @@ public abstract class GT_MetaTileEntity_Boiler extends GT_MetaTileEntity_BasicTa
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(new SlotWidget(inventoryHandler, 0)
- .setPos(43, 25)
+ builder.widget(
+ new SlotWidget(inventoryHandler, 0).setPos(43, 25)
.setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotIn()))
- .widget(new SlotWidget(inventoryHandler, 1)
- .setPos(43, 61)
- .setBackground(getGUITextureSet().getItemSlot(), getOverlaySlotOut()))
- .widget(createFuelSlot())
- .widget(createAshSlot())
- .widget(new ProgressBar()
- .setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_STEAM, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(70, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(83, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- .setProgress(() -> (float) mTemperature / maxProgresstime())
- .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(96, 25)
- .setSize(10, 54))
- .widget(new ProgressBar()
- // cap minimum so that one can easily see there's fuel remaining
- .setProgress(
- () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5) : 0)
- .setTexture(getProgressbarFuel(), 14)
- .setDirection(ProgressBar.Direction.UP)
- .setPos(116, 45)
- .setSize(14, 14))
- .widget(new DrawableWidget()
- .setDrawable(getOverlaySlotCanister())
- .setPos(43, 43)
- .setSize(18, 18));
+ .widget(
+ new SlotWidget(inventoryHandler, 1).setPos(
+ 43,
+ 61).setBackground(
+ getGUITextureSet().getItemSlot(),
+ getOverlaySlotOut()))
+ .widget(createFuelSlot()).widget(
+ createAshSlot())
+ .widget(
+ new ProgressBar().setProgress(() -> mSteam == null ? 0 : (float) mSteam.amount / getCapacity())
+ .setTexture(
+ getProgressbarEmpty(),
+ GT_UITextures.PROGRESSBAR_BOILER_STEAM,
+ 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(70, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> mFluid == null ? 0 : (float) mFluid.amount / getCapacity())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_WATER, 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(83, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar().setProgress(() -> (float) mTemperature / maxProgresstime())
+ .setTexture(getProgressbarEmpty(), GT_UITextures.PROGRESSBAR_BOILER_HEAT, 10)
+ .setDirection(ProgressBar.Direction.UP).setPos(96, 25).setSize(10, 54))
+ .widget(
+ new ProgressBar()
+ // cap minimum so that one can easily see there's fuel remaining
+ .setProgress(
+ () -> mProcessingEnergy > 0 ? Math.max((float) mProcessingEnergy / 1000, 1f / 5)
+ : 0)
+ .setTexture(getProgressbarFuel(), 14).setDirection(ProgressBar.Direction.UP)
+ .setPos(116, 45).setSize(14, 14))
+ .widget(new DrawableWidget().setDrawable(getOverlaySlotCanister()).setPos(43, 43).setSize(18, 18));
}
protected SlotWidget createFuelSlot() {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index ef343d24f2..e88a35c617 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -10,6 +10,10 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE;
import static gregtech.api.objects.XSTR.XSTR_INSTANCE;
+import net.minecraft.block.Block;
+import net.minecraft.tileentity.TileEntityFurnace;
+import net.minecraftforge.common.util.ForgeDirection;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.GT_Mod;
@@ -26,17 +30,17 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.WorldSpawnedEventBuilder.ParticleEventBuilder;
import gregtech.common.GT_Pollution;
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntityFurnace;
-import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
+
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, new String[] {
- "An early way to get Steam Power",
- "Produces 120L of Steam per second",
- "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond + " Pollution per second"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ new String[] { "An early way to get Steam Power", "Produces 120L of Steam per second",
+ "Causes " + GT_Mod.gregtechproxy.mPollutionSmallCoalBoilerPerSecond
+ + " Pollution per second" });
}
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional, String[] aDescription) {
@@ -54,27 +58,13 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
@Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
- final ITexture[] texBottom = {TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM)},
- texTop = {TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
- texSide = {TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
- texFront =
- {
- TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE),
- TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder()
- .addIcon(BOILER_FRONT_GLOW)
- .glow()
- .build()
- },
- texFrontActive =
- {
- TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE),
- TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder()
- .addIcon(BOILER_FRONT_ACTIVE_GLOW)
- .glow()
- .build()
- };
+ final ITexture[] texBottom = { TextureFactory.of(MACHINE_BRONZEBRICKS_BOTTOM) },
+ texTop = { TextureFactory.of(MACHINE_BRONZEBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
+ texSide = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
+ texFront = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
+ TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ texFrontActive = { TextureFactory.of(MACHINE_BRONZEBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
@@ -107,8 +97,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
final byte frontFacing = aBaseMetaTileEntity.getFrontFacing();
- if (frontFacing > 1
- && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0
+ if (frontFacing > 1 && aBaseMetaTileEntity.getCoverIDAtSide(frontFacing) == 0
&& !aBaseMetaTileEntity.getOpacityAtSide(frontFacing)) {
final double oX = aBaseMetaTileEntity.getOffsetX(frontFacing, 1) + 8D / 16D;
@@ -136,10 +125,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
z = oZ + offset;
}
- ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder())
- .setMotion(0D, 0D, 0D)
- .setPosition(x, y, z)
- .setWorld(getBaseMetaTileEntity().getWorld());
+ ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
+ .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
}
@@ -149,8 +136,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if ((aBaseMetaTileEntity.isServerSide())
- && (aTick > 20L)
+ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)
&& this.mProcessingEnergy > 0
&& (aTick % 20L == 0L)) {
GT_Pollution.addPollution(getBaseMetaTileEntity(), getPollution());
@@ -186,7 +172,7 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
protected void updateFuel(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (this.mInventory[2] == null) return;
if ((GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)
- && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block))
+ && !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block))
|| (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal)
&& !GT_Utility.isPartOfOrePrefix(this.mInventory[2], OrePrefixes.block))
|| (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite)
@@ -202,9 +188,8 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
aBaseMetaTileEntity.decrStackSize(2, 1);
if (XSTR.XSTR_INSTANCE.nextInt(
- GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)
- || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal)
- ? 3
+ GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)
+ || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Charcoal) ? 3
: GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite) ? 8 : 2)
== 0) {
aBaseMetaTileEntity.addStackToSlot(
@@ -212,99 +197,93 @@ public class GT_MetaTileEntity_Boiler_Bronze extends GT_MetaTileEntity_Boiler {
GT_OreDictUnificator.get(
OrePrefixes.dustTiny,
(GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite)
- || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal))
- ? Materials.DarkAsh
- : Materials.Ash,
+ || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal))
+ ? Materials.DarkAsh
+ : Materials.Ash,
1L));
}
}
} else if (
// If its a block of the following materials
GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Coal))
- || GT_OreDictUnificator.isItemStackInstanceOf(
- this.mInventory[2], OrePrefixes.block.get(Materials.Lignite))
- || GT_OreDictUnificator.isItemStackInstanceOf(
- this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))
- || GT_OreDictUnificator.isItemStackInstanceOf(
- this.mInventory[2], OrePrefixes.block.get(Materials.Diamond))
+ || GT_OreDictUnificator
+ .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Lignite))
+ || GT_OreDictUnificator
+ .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Charcoal))
+ || GT_OreDictUnificator
+ .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.block.get(Materials.Diamond))
||
// if its either a Railcraft Coke Block or a custom GTNH compressed Coal/charcoal/lignite/coke block
- (Block.getBlockFromItem(this.mInventory[2].getItem()) != null
- && // check if the block exists
- (Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("tile")
- && // check if the block is a tile -> block
+ (Block.getBlockFromItem(this.mInventory[2].getItem()) != null && // check if the block exists
+ (Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
+ .contains("tile") && // check if the block is a tile -> block
(
// If the name of the block contains these names
- Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("charcoal")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("coal")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("diamond")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("coke")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("railcraft.cube")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("lignite"))))) {
- // try to add 10% of the burnvalue as Processing energy, no boost for coal coke here
- if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10) > 0) {
- this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
- aBaseMetaTileEntity.decrStackSize(2, 1);
- aBaseMetaTileEntity.addStackToSlot(
- 3,
- GT_OreDictUnificator.get(
- OrePrefixes.dust,
- (GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Lignite)
- || GT_Utility.isPartOfMaterials(this.mInventory[2], Materials.Coal)
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("coal")
- || Block.getBlockFromItem(this.mInventory[2].getItem())
- .getUnlocalizedName()
- .toLowerCase()
- .contains("lignite"))
- ? Materials.DarkAsh
- : Materials.Ash,
- 1L));
- }
- // enables every other fuel with at least 2000 burntime as a fuel, i.e. peat, Magic/Solid Super Fuel, Coal
- // Singularities, Nitor, while bucket of creosite should be blocked same goes for lava
- } else if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000
- && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket")
- || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))) {
- this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
- aBaseMetaTileEntity.decrStackSize(2, 1);
- // adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for bigger values
- if (XSTR.XSTR_INSTANCE.nextInt(2) == 0)
- aBaseMetaTileEntity.addStackToSlot(
- 3,
- GT_OreDictUnificator.get(
- (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000
- ? TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 100000
- ? OrePrefixes.dust
- : OrePrefixes.dustSmall
- : OrePrefixes.dustTiny),
- Materials.Ash,
- 1L));
- }
+ Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName().toLowerCase()
+ .contains("charcoal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
+ .toLowerCase().contains("coal")
+ || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
+ .toLowerCase().contains("diamond")
+ || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
+ .toLowerCase().contains("coke")
+ || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
+ .toLowerCase().contains("railcraft.cube")
+ || Block.getBlockFromItem(this.mInventory[2].getItem()).getUnlocalizedName()
+ .toLowerCase().contains("lignite"))))) {
+ // try to add 10% of the burnvalue as Processing energy, no boost
+ // for coal coke here
+ if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10)
+ > 0) {
+ this.mProcessingEnergy += (TileEntityFurnace
+ .getItemBurnTime(this.mInventory[2]) / 10);
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ aBaseMetaTileEntity.addStackToSlot(
+ 3,
+ GT_OreDictUnificator.get(
+ OrePrefixes.dust,
+ (GT_Utility.isPartOfMaterials(
+ this.mInventory[2],
+ Materials.Lignite)
+ || GT_Utility.isPartOfMaterials(
+ this.mInventory[2],
+ Materials.Coal)
+ || Block.getBlockFromItem(
+ this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase().contains("coal")
+ || Block.getBlockFromItem(
+ this.mInventory[2].getItem())
+ .getUnlocalizedName()
+ .toLowerCase()
+ .contains("lignite"))
+ ? Materials.DarkAsh
+ : Materials.Ash,
+ 1L));
+ }
+ // enables every other fuel with at least 2000 burntime as a fuel,
+ // i.e. peat, Magic/Solid Super Fuel, Coal
+ // Singularities, Nitor, while bucket of creosite should be blocked
+ // same goes for lava
+ } else
+ if ((TileEntityFurnace.getItemBurnTime(this.mInventory[2])) >= 2000
+ && !(this.mInventory[2].getUnlocalizedName().toLowerCase().contains("bucket")
+ || this.mInventory[2].getUnlocalizedName().toLowerCase().contains("cell"))) {
+ this.mProcessingEnergy += (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) / 10);
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ // adds tiny pile of ash for burntime under 10k, small pile for under 100k and pile for
+ // bigger values
+ if (XSTR.XSTR_INSTANCE.nextInt(2) == 0) aBaseMetaTileEntity.addStackToSlot(
+ 3,
+ GT_OreDictUnificator.get(
+ (TileEntityFurnace.getItemBurnTime(this.mInventory[2]) >= 10000
+ ? TileEntityFurnace.getItemBurnTime(this.mInventory[2])
+ >= 100000 ? OrePrefixes.dust : OrePrefixes.dustSmall
+ : OrePrefixes.dustTiny),
+ Materials.Ash,
+ 1L));
+ }
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
index 14a2833549..6a1ad39195 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java
@@ -9,6 +9,8 @@ import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE;
import static gregtech.api.enums.Textures.BlockIcons.MACHINE_STEELBRICKS_TOP;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE;
+import net.minecraftforge.fluids.FluidStack;
+
import gregtech.GT_Mod;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -19,7 +21,6 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
@@ -29,14 +30,18 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
public static final int PRODUCTION_PER_SECOND = 600;
public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, new String[] {
- "A Boiler running off Lava",
- "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second",
- "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond)
- + " Pollution per second",
- "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA) + "L of Lava every " + COOLDOWN_INTERVAL
- + " ticks when fully heat up"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ new String[] { "A Boiler running off Lava",
+ "Produces " + PRODUCTION_PER_SECOND + "L of Steam per second",
+ "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureLavaBoilerPerSecond)
+ + " Pollution per second",
+ "Consumes " + ((double) CONSUMPTION_PER_HEATUP / ENERGY_PER_LAVA)
+ + "L of Lava every "
+ + COOLDOWN_INTERVAL
+ + " ticks when fully heat up" });
}
public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@@ -50,24 +55,14 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
@Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
- final ITexture[] texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)},
- texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
- texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
- texFront =
- {
- TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
- TextureFactory.of(BOILER_LAVA_FRONT),
- TextureFactory.of(BOILER_LAVA_FRONT_GLOW)
- },
- texFrontActive =
- {
- TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
- TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE),
- TextureFactory.builder()
- .addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW)
- .glow()
- .build()
- };
+ final ITexture[] texBottom = { TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM) },
+ texTop = { TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
+ texSide = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
+ texFront = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_LAVA_FRONT),
+ TextureFactory.of(BOILER_LAVA_FRONT_GLOW) },
+ texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
+ TextureFactory.of(BOILER_LAVA_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_LAVA_FRONT_ACTIVE_GLOW).glow().build() };
for (byte i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;
@@ -124,12 +119,12 @@ public class GT_MetaTileEntity_Boiler_Lava extends GT_MetaTileEntity_Boiler {
this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA;
aBaseMetaTileEntity.decrStackSize(2, 1);
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L));
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(
- this.mInventory[2], OrePrefixes.bucketClay.get(Materials.Lava))) {
- this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA;
- aBaseMetaTileEntity.decrStackSize(2, 1);
- // Clay lava buckets break, so you don't get it back.
- }
+ } else if (GT_OreDictUnificator
+ .isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucketClay.get(Materials.Lava))) {
+ this.mProcessingEnergy += 1000 * ENERGY_PER_LAVA;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ // Clay lava buckets break, so you don't get it back.
+ }
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
index 978e70e5ab..746f0602d6 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java
@@ -5,8 +5,22 @@ import static gregtech.api.enums.ConfigCategories.machineconfig;
import static mcp.mobius.waila.api.SpecialChars.GOLD;
import static mcp.mobius.waila.api.SpecialChars.RESET;
+import java.util.List;
+
+import mcp.mobius.waila.api.IWailaConfigHandler;
+import mcp.mobius.waila.api.IWailaDataAccessor;
+
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
+
import gregtech.api.enums.Dyes;
import gregtech.api.enums.SteamVariant;
import gregtech.api.enums.Textures.BlockIcons;
@@ -18,18 +32,9 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
-import java.util.List;
-import mcp.mobius.waila.api.IWailaConfigHandler;
-import mcp.mobius.waila.api.IWailaDataAccessor;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
+
public static final String LPS_FMT = "%s L/s";
private static final String localizedDescFormat = GT_LanguageManager.addStringLocalization(
"gt.blockmachines.boiler.solar.desc.format",
@@ -55,8 +60,8 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
mConfig = createConfig();
}
- protected GT_MetaTileEntity_Boiler_Solar(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) {
+ protected GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
+ Config aConfig) {
super(aName, aTier, aDescription, aTextures);
mConfig = aConfig;
}
@@ -93,10 +98,9 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
@Override
public String[] getDescription() {
return String.format(
- localizedDescFormat,
- GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getMinOutputPerSecond()))
- .split("\\R");
+ localizedDescFormat,
+ GT_Utility.formatNumbers(getMaxOutputPerSecond()),
+ GT_Utility.formatNumbers(getMinOutputPerSecond())).split("\\R");
}
public int getMinOutputPerSecond() {
@@ -109,29 +113,21 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
for (int color = -1; color < 16; color++) {
int i = color + 1;
short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa);
- rTextures[0][i] =
- new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation)};
- rTextures[1][i] = new ITexture[] {
- TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation),
- TextureFactory.of(BlockIcons.BOILER_SOLAR)
- };
- rTextures[2][i] = new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation)};
- rTextures[3][i] = new ITexture[] {
- TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation),
- TextureFactory.of(BlockIcons.OVERLAY_PIPE)
- };
+ rTextures[0][i] = new ITexture[] {
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, colorModulation) };
+ rTextures[1][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_TOP, colorModulation),
+ TextureFactory.of(BlockIcons.BOILER_SOLAR) };
+ rTextures[2][i] = new ITexture[] {
+ TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation) };
+ rTextures[3][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_BRONZEBRICKS_SIDE, colorModulation),
+ TextureFactory.of(BlockIcons.OVERLAY_PIPE) };
}
return rTextures;
}
@Override
- public ITexture[] getTexture(
- IGregTechTileEntity aBaseMetaTileEntity,
- byte aSide,
- byte aFacing,
- byte aColorIndex,
- boolean aActive,
- boolean aRedstone) {
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
int i = aColorIndex + 1;
if (aSide >= 2) {
if (aSide != aFacing) return mTextures[2][i];
@@ -187,12 +183,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
if (mRunTimeTicks > mConfig.getMaxRuntimeTicks()) {
return mConfig.getMinOutputPerSecond();
} else if (mRunTimeTicks > mConfig.getCalcificationTicks()) {
- /* When reaching calcification ticks; discount the proportion of run-time spent on calcification
- * from the maximum output per second, and return this or the minimum output per second
+ /*
+ * When reaching calcification ticks; discount the proportion of run-time spent on calcification from the
+ * maximum output per second, and return this or the minimum output per second
*/
return mConfig.getMaxOutputPerSecond()
- - mConfig.getMaxOutputPerSecond()
- * (mRunTimeTicks - mConfig.getCalcificationTicks())
+ - mConfig.getMaxOutputPerSecond() * (mRunTimeTicks - mConfig.getCalcificationTicks())
/ mConfig.getCalcificationTicks();
} else {
return mConfig.getMaxOutputPerSecond();
@@ -257,19 +253,32 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
@Override
public String[] getInfoData() {
return String.format(
- "Heat Capacity: " + EnumChatFormatting.GREEN + "%s %%" + EnumChatFormatting.RESET
- + " Hot time: "
- + EnumChatFormatting.RED + "%s s" + EnumChatFormatting.RESET + "%n" + "Min output: "
- + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + " Max output: "
- + EnumChatFormatting.RED + LPS_FMT + EnumChatFormatting.RESET + "%n"
- + "Current Output: "
- + EnumChatFormatting.YELLOW + LPS_FMT + EnumChatFormatting.RESET,
- GT_Utility.formatNumbers(getHeatCapacityPercent()),
- GT_Utility.formatNumbers(getHotTimeSeconds()),
- GT_Utility.formatNumbers(getMinOutputPerSecond()),
- GT_Utility.formatNumbers(getMaxOutputPerSecond()),
- GT_Utility.formatNumbers(getProductionPerSecond()))
- .split("\\R");
+ "Heat Capacity: " + EnumChatFormatting.GREEN
+ + "%s %%"
+ + EnumChatFormatting.RESET
+ + " Hot time: "
+ + EnumChatFormatting.RED
+ + "%s s"
+ + EnumChatFormatting.RESET
+ + "%n"
+ + "Min output: "
+ + EnumChatFormatting.RED
+ + LPS_FMT
+ + EnumChatFormatting.RESET
+ + " Max output: "
+ + EnumChatFormatting.RED
+ + LPS_FMT
+ + EnumChatFormatting.RESET
+ + "%n"
+ + "Current Output: "
+ + EnumChatFormatting.YELLOW
+ + LPS_FMT
+ + EnumChatFormatting.RESET,
+ GT_Utility.formatNumbers(getHeatCapacityPercent()),
+ GT_Utility.formatNumbers(getHotTimeSeconds()),
+ GT_Utility.formatNumbers(getMinOutputPerSecond()),
+ GT_Utility.formatNumbers(getMaxOutputPerSecond()),
+ GT_Utility.formatNumbers(getProductionPerSecond())).split("\\R");
}
public int getHeatCapacityPercent() {
@@ -287,12 +296,12 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
@Override
protected IDrawable[] getFuelSlotBackground() {
- return new IDrawable[] {GT_UITextures.TRANSPARENT};
+ return new IDrawable[] { GT_UITextures.TRANSPARENT };
}
@Override
protected IDrawable[] getAshSlotBackground() {
- return new IDrawable[] {GT_UITextures.TRANSPARENT};
+ return new IDrawable[] { GT_UITextures.TRANSPARENT };
}
@Override
@@ -308,38 +317,36 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
}
@Override
- public void getWailaBody(
- ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
+ public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor,
+ IWailaConfigHandler config) {
final NBTTagCompound tag = accessor.getNBTData();
- currentTip.add(String.format(
- (GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"),
- tag.getInteger("calcificationOutput"),
- tag.getInteger("maxCalcificationOutput")));
+ currentTip.add(
+ String.format(
+ (GOLD + "Solar Boiler Output: " + RESET + "%d/%d L/s"),
+ tag.getInteger("calcificationOutput"),
+ tag.getInteger("maxCalcificationOutput")));
super.getWailaBody(itemStack, currentTip, accessor, config);
}
@Override
- public void getWailaNBTData(
- EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) {
+ public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y,
+ int z) {
super.getWailaNBTData(player, tile, tag, world, x, y, z);
tag.setInteger("calcificationOutput", (getProductionPerSecond()));
tag.setInteger("maxCalcificationOutput", (getMaxOutputPerSecond()));
}
protected static class Config {
+
private final int calcificationTicks;
private final int minOutputPerSecond;
private final int maxOutputPerSecond;
private final int coolDownTicks;
private final int maxRuntimeTicks;
- public Config(
- String aCategory,
- int aDefaultCalcificationTicks,
- int aDefaultMinOutputPerSecond,
- int aDefaultMaxOutputPerSecond,
- int aDefaultCoolDownTicks) {
+ public Config(String aCategory, int aDefaultCalcificationTicks, int aDefaultMinOutputPerSecond,
+ int aDefaultMaxOutputPerSecond, int aDefaultCoolDownTicks) {
calcificationTicks = get(
aCategory,
"CalcificationTicks",
@@ -348,24 +355,22 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler {
"100% calcification and minimal output will be reached at 2 times this.");
minOutputPerSecond = get(aCategory, "MinOutputPerSecond", aDefaultMinOutputPerSecond);
maxOutputPerSecond = get(aCategory, "MaxOutputPerSecond", aDefaultMaxOutputPerSecond);
- coolDownTicks =
- get(aCategory, "CoolDownTicks", aDefaultCoolDownTicks, "Number of ticks it takes to lose 1°C.");
+ coolDownTicks = get(
+ aCategory,
+ "CoolDownTicks",
+ aDefaultCoolDownTicks,
+ "Number of ticks it takes to lose 1°C.");
// After which min output is reached.
- maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond())
- * getCalcificationTicks()
- / getMaxOutputPerSecond()
- + getCalcificationTicks();
+ maxRuntimeTicks = (getMaxOutputPerSecond() - getMinOutputPerSecond()) * getCalcificationTicks()
+ / getMaxOutputPerSecond() + getCalcificationTicks();
}
- protected int get(
- final String aCategory, final String aKey, final int aDefaultValue, final String... aComments) {
+ protected int get(final String aCategory, final String aKey, final int aDefaultValue,
+ final String... aComments) {
final StringBuilder tCommentBuilder = new StringBuilder();
for (String tComment : aComments) tCommentBuilder.append(tComment).append('\n');
tCommentBuilder.append("Default: ").append(aDefaultValue);
- return sMachineFile
- .mConfig
- .get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString())
- .getInt();
+ return sMachineFile.mConfig.get(aCategory, aKey, aDefaultValue, tCommentBuilder.toString()).getInt();
}
public int getCalcificationTicks() {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
index 997ca33df5..45e22c29fb 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar_Steel.java
@@ -11,22 +11,23 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boiler_Solar {
+
public GT_MetaTileEntity_Boiler_Solar_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GT_MetaTileEntity_Boiler_Solar_Steel(
- String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
- public GT_MetaTileEntity_Boiler_Solar_Steel(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
- public GT_MetaTileEntity_Boiler_Solar_Steel(
- String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, Config aConfig) {
+ public GT_MetaTileEntity_Boiler_Solar_Steel(String aName, int aTier, String[] aDescription,
+ ITexture[][][] aTextures, Config aConfig) {
super(aName, aTier, aDescription, aTextures, aConfig);
}
@@ -42,17 +43,14 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil
for (int color = -1; color < 16; color++) {
int i = color + 1;
short[] colorModulation = Dyes.getModulation(color, Dyes._NULL.mRGBa);
- rTextures[0][i] =
- new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation)};
- rTextures[1][i] = new ITexture[] {
- TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation),
- TextureFactory.of(BlockIcons.BOILER_SOLAR)
- };
- rTextures[2][i] = new ITexture[] {TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation)};
- rTextures[3][i] = new ITexture[] {
- TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation),
- TextureFactory.of(BlockIcons.OVERLAY_PIPE)
- };
+ rTextures[0][i] = new ITexture[] {
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_BOTTOM, colorModulation) };
+ rTextures[1][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_TOP, colorModulation),
+ TextureFactory.of(BlockIcons.BOILER_SOLAR) };
+ rTextures[2][i] = new ITexture[] {
+ TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation) };
+ rTextures[3][i] = new ITexture[] { TextureFactory.of(BlockIcons.MACHINE_STEELBRICKS_SIDE, colorModulation),
+ TextureFactory.of(BlockIcons.OVERLAY_PIPE) };
}
return rTextures;
}
@@ -70,6 +68,10 @@ public class GT_MetaTileEntity_Boiler_Solar_Steel extends GT_MetaTileEntity_Boil
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Boiler_Solar_Steel(
- this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mConfig);
+ this.mName,
+ this.mTier,
+ this.mDescriptionArray,
+ this.mTextures,
+ this.mConfig);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index 0ae425f792..719fd13317 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -19,12 +19,13 @@ import gregtech.api.render.TextureFactory;
public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bronze {
public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, new String[] {
- "Faster than the Bronze Boiler",
- "Produces 300L of Steam per second",
- "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond)
- + " Pollution per second"
- });
+ super(
+ aID,
+ aName,
+ aNameRegional,
+ new String[] { "Faster than the Bronze Boiler", "Produces 300L of Steam per second",
+ "Causes " + Integer.toString(GT_Mod.gregtechproxy.mPollutionHighPressureCoalBoilerPerSecond)
+ + " Pollution per second" });
}
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@@ -38,27 +39,13 @@ public class GT_MetaTileEntity_Boiler_Steel extends GT_MetaTileEntity_Boiler_Bro
@Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[5][17][];
- final ITexture[] texBottom = {TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM)},
- texTop = {TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE)},
- texSide = {TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE)},
- texFront =
- {
- TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
- TextureFactory.of(BOILER_FRONT),
- TextureFactory.builder()
- .addIcon(BOILER_FRONT_GLOW)
- .glow()
- .build()
- },
- texFrontActive =
- {
- TextureFactory.of(MACHINE_STEELBRICKS_SIDE),
- TextureFactory.of(BOILER_FRONT_ACTIVE),
- TextureFactory.builder()
- .addIcon(BOILER_FRONT_ACTIVE_GLOW)
- .glow()
- .build()
- };
+ final ITexture[] texBottom = { TextureFactory.of(MACHINE_STEELBRICKS_BOTTOM) },
+ texTop = { TextureFactory.of(MACHINE_STEELBRICKS_TOP), TextureFactory.of(OVERLAY_PIPE) },
+ texSide = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(OVERLAY_PIPE) },
+ texFront = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT),
+ TextureFactory.builder().addIcon(BOILER_FRONT_GLOW).glow().build() },
+ texFrontActive = { TextureFactory.of(MACHINE_STEELBRICKS_SIDE), TextureFactory.of(BOILER_FRONT_ACTIVE),
+ TextureFactory.builder().addIcon(BOILER_FRONT_ACTIVE_GLOW).glow().build() };
for (int i = 0; i < 17; i++) {
rTextures[0][i] = texBottom;
rTextures[1][i] = texTop;