From 69ce418e29e22391f60cdd55815727762a78c33a Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Fri, 24 May 2024 19:04:17 +0100 Subject: Apply updated GT5u spotless configs --- .../GT_MetaTileEntity_ChiselBus.java | 23 +- .../GT_MetaTileEntity_Hatch_AirIntake.java | 57 +- .../GT_MetaTileEntity_Hatch_AirIntake_Extreme.java | 12 +- .../GT_MetaTileEntity_Hatch_DynamoBuffer.java | 8 +- ...etaTileEntity_Hatch_ElementalDataOrbHolder.java | 45 +- .../GT_MetaTileEntity_Hatch_FluidGenerator.java | 29 +- .../GT_MetaTileEntity_Hatch_InputBattery.java | 52 +- .../GT_MetaTileEntity_Hatch_Muffler_Adv.java | 82 +- .../GT_MetaTileEntity_Hatch_Naquadah.java | 38 +- .../GT_MetaTileEntity_Hatch_OutputBattery.java | 59 +- .../GT_MetaTileEntity_Hatch_Reservoir.java | 4 +- .../GT_MetaTileEntity_Hatch_Solidifier.java | 26 +- .../GT_MetaTileEntity_Hatch_Steam_BusInput.java | 112 ++- .../GT_MetaTileEntity_Hatch_Steam_BusOutput.java | 84 +- .../GT_MetaTileEntity_Hatch_Turbine.java | 89 +- .../GT_MetaTileEntity_Hatch_TurbineProvider.java | 30 +- .../GT_MetaTileEntity_SuperBus_Input.java | 10 +- .../GT_MetaTileEntity_SuperBus_Output.java | 28 +- .../GregtechMetaPipeEntityFluid.java | 76 +- .../GregtechMetaPipeEntity_Cable.java | 141 ++-- .../GregtechMetaTreeFarmerStructural.java | 14 +- .../GT_MetaTileEntity_Hatch_CustomFluidBase.java | 49 +- .../base/GregtechMetaTileEntity.java | 4 +- .../base/GregtechMetaTransformerHiAmp.java | 32 +- .../base/GregtechMeta_MultiBlockBase.java | 902 +++++++++++---------- .../base/GregtechMeta_SteamMultiBase.java | 80 +- .../base/generators/GregtechMetaBoilerBase.java | 109 ++- .../generators/GregtechMetaSolarGenerator.java | 52 +- .../GregtechRocketFuelGeneratorBase.java | 69 +- .../base/machines/GregtechMetaTreeFarmerBase.java | 21 +- .../GT_MetaTileEntity_Hatch_NbtConsumable.java | 101 ++- 31 files changed, 1286 insertions(+), 1152 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java index 687ea4429f..3009c80c80 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_ChiselBus.java @@ -45,12 +45,12 @@ public class GT_MetaTileEntity_ChiselBus extends GT_MetaTileEntity_Hatch_InputBu @Override public String[] getDescription() { return new String[] { "Item Input Bus for Industrial Chisel", getSlots(this.mTier) - 1 + " + 1 " + " Slots", - "Added by: " + EnumChatFormatting.AQUA - + "Quetz4l" - + " - " - + EnumChatFormatting.RED - + "[GT++]" - + EnumChatFormatting.RESET }; + "Added by: " + EnumChatFormatting.AQUA + + "Quetz4l" + + " - " + + EnumChatFormatting.RED + + "[GT++]" + + EnumChatFormatting.RESET }; } @Override @@ -61,13 +61,18 @@ public class GT_MetaTileEntity_ChiselBus extends GT_MetaTileEntity_Hatch_InputBu int columnsToMake = Math.min(inventoryHandler.getSlots() - row * 4, 4); for (int column = 0; column < columnsToMake; column++) { scrollable.widget( - new SlotWidget(inventoryHandler, slotIndex++).setPos(column * 18, row * 18).setSize(18, 18)); + new SlotWidget(inventoryHandler, slotIndex++).setPos(column * 18, row * 18) + .setSize(18, 18)); } } - builder.widget(scrollable.setSize(18 * 4 + 4, 18 * 4).setPos(52, 7)); // main slots - builder.widget(new SlotWidget(inventoryHandler, slotIndex).setPos(18, 18).setSize(18, 18)); // slot for target + builder.widget( + scrollable.setSize(18 * 4 + 4, 18 * 4) + .setPos(52, 7)); // main slots + builder.widget( + new SlotWidget(inventoryHandler, slotIndex).setPos(18, 18) + .setSize(18, 18)); // slot for target } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java index 7ceae20109..bab504910e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java @@ -13,12 +13,12 @@ import gtPlusPlus.core.util.minecraft.FluidUtils; public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_FluidGenerator { public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -38,7 +38,8 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F @Override public Fluid getFluidToGenerate() { - return FluidUtils.getAir(1).getFluid(); + return FluidUtils.getAir(1) + .getFluid(); } @Override @@ -58,12 +59,16 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F @Override public boolean doesHatchMeetConditionsToGenerate() { - return this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()); + return this.getBaseMetaTileEntity() + .getAirAtSide( + this.getBaseMetaTileEntity() + .getFrontFacing()); } @Override public void generateParticles(World aWorld, String name) { - if (this.getBaseMetaTileEntity().isServerSide()) { + if (this.getBaseMetaTileEntity() + .isServerSide()) { return; } final float ran1 = GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat(); @@ -96,28 +101,28 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_F } aWorld.spawnParticle( - name, - (double) (xPos + ran1 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran1 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); aWorld.spawnParticle( - name, - (double) (xPos + ran2 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran2 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); aWorld.spawnParticle( - name, - (double) (xPos + ran3 * 0.5f), - (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), - (double) xSpd, - (double) -ySpd, - (double) zSpd); + name, + (double) (xPos + ran3 * 0.5f), + (double) (yPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) (zPos + GT_MetaTileEntity_Hatch_AirIntake.floatGen.nextFloat() * 0.5f), + (double) xSpd, + (double) -ySpd, + (double) zSpd); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java index 235354f396..007310fc06 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java @@ -7,22 +7,22 @@ import gregtech.api.metatileentity.MetaTileEntity; public class GT_MetaTileEntity_Hatch_AirIntake_Extreme extends GT_MetaTileEntity_Hatch_AirIntake { public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @Override public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Hatch_AirIntake_Extreme( - this.mName, - this.mTier, - this.mDescriptionArray, - this.mTextures); + this.mName, + this.mTier, + this.mDescriptionArray, + this.mTextures); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java index 1811ee6183..f375900800 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java @@ -11,12 +11,12 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatch_Dynamo { public GT_MetaTileEntity_Hatch_DynamoBuffer(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_DynamoBuffer(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -49,8 +49,8 @@ public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatc public String[] getDescription() { String[] g; g = new String[] { "Dynamo with internal storage and additional Amp capacity", - "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", - CORE.GT_Tooltip.get() }; + "Does not accept more than " + (this.maxEUOutput() * this.maxAmperesIn()) + "EU/t as input", + CORE.GT_Tooltip.get() }; return g; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java index 2d534a493d..336c6eb011 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java @@ -26,26 +26,26 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch - implements IConfigurationCircuitSupport { + implements IConfigurationCircuitSupport { public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 17, - new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot", - "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + 17, + new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot", + "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 17, aDescription, aTextures); } public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 17, aDescription, aTextures); } @@ -126,10 +126,10 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { Logger.INFO("Checking if we can pull " + aStack.getDisplayName() + " from slot " + aIndex); if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && side == getBaseMetaTileEntity().getFrontFacing()) { + && side == getBaseMetaTileEntity().getFrontFacing()) { return true; } return false; @@ -137,10 +137,10 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { Logger.INFO("Checking if we can put " + aStack.getDisplayName() + " into slot " + aIndex); if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && side == getBaseMetaTileEntity().getFrontFacing()) { + && side == getBaseMetaTileEntity().getFrontFacing()) { return true; } return false; @@ -172,7 +172,8 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) { if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack) - && ordinalSide == getBaseMetaTileEntity().getFrontFacing().ordinal()) { + && ordinalSide == getBaseMetaTileEntity().getFrontFacing() + .ordinal()) { Logger.INFO("Putting " + aStack.getDisplayName() + " into slot " + aIndex); return true; } @@ -216,11 +217,13 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - SlotGroup.ofItemHandler(inventoryHandler, 4).startFromSlot(0).endAtSlot(15) - .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DATA_ORB) - .applyForWidget( - widget -> widget - .setFilter(stack -> ItemList.Tool_DataOrb.isStackEqual(stack, false, true))) - .build().setPos(52, 7)); + SlotGroup.ofItemHandler(inventoryHandler, 4) + .startFromSlot(0) + .endAtSlot(15) + .background(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_DATA_ORB) + .applyForWidget( + widget -> widget.setFilter(stack -> ItemList.Tool_DataOrb.isStackEqual(stack, false, true))) + .build() + .setPos(52, 7)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java index e50ec67d80..b4e213e829 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java @@ -26,12 +26,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile public int mProgresstime = 0, mMaxProgresstime = 0; public GT_MetaTileEntity_Hatch_FluidGenerator(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_FluidGenerator(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } @@ -60,13 +60,13 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER) }; } @Override @@ -93,12 +93,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile public abstract MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity); public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { return false; } @@ -160,8 +160,12 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile } int aFillAmount = this.fill(FluidUtils.getFluidStack(getFluidToGenerate(), getAmountOfFluidToGenerate()), true); if (aFillAmount > 0) { - if (this.getBaseMetaTileEntity().isClientSide()) { - generateParticles(this.getBaseMetaTileEntity().getWorld(), "cloud"); + if (this.getBaseMetaTileEntity() + .isClientSide()) { + generateParticles( + this.getBaseMetaTileEntity() + .getWorld(), + "cloud"); } } return aFillAmount > 0; @@ -184,14 +188,13 @@ public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTile @Override public int fill(FluidStack aFluid, boolean doFill) { - if (aFluid == null || aFluid.getFluid().getID() <= 0 - || aFluid.amount <= 0 - || aFluid.getFluid() != getFluidToGenerate() - || !canTankBeFilled()) { + if (aFluid == null || aFluid.getFluid() + .getID() <= 0 || aFluid.amount <= 0 || aFluid.getFluid() != getFluidToGenerate() || !canTankBeFilled()) { return 0; } - if (getFillableStack() == null || getFillableStack().getFluid().getID() <= 0) { + if (getFillableStack() == null || getFillableStack().getFluid() + .getID() <= 0) { if (aFluid.amount <= getCapacity()) { if (doFill) { setFillableStack(aFluid.copy()); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java index 46d6917beb..c55ddda47d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java @@ -34,7 +34,7 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc } public GT_MetaTileEntity_Hatch_InputBattery(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 4 : 16, aDescription, aTextures); } @@ -131,17 +131,17 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { if (mMetaTileEntity.rechargerSlotCount() > 0 && aBaseMetaTileEntity.getStoredEU() > 0) { for (int i = mMetaTileEntity.rechargerSlotStartIndex(), - k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) { if (aBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) { for (int u = 0; u < 10; u++) { aBaseMetaTileEntity.decreaseStoredEnergyUnits( - GT_ModHandler.chargeElectricItem( - mMetaTileEntity.mInventory[i], - (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), - (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), - false, - false), - true); + GT_ModHandler.chargeElectricItem( + mMetaTileEntity.mInventory[i], + (int) Math.min(V[this.mTier] * 15, aBaseMetaTileEntity.getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, GT_Values.V[u]), + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) { mMetaTileEntity.mInventory[i] = null; } @@ -163,31 +163,31 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc protected void fillStacksIntoFirstSlots() { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); + } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override @@ -223,8 +223,8 @@ public class GT_MetaTileEntity_Hatch_InputBattery extends GT_MetaTileEntity_Hatc public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { if (mTier == 2) { for (int i = 0; i < 4; i++) { - builder.widget( - new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); + builder + .widget(new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); } } else { for (int i = 0; i < 16; i++) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java index 5c209f2252..a3261af6f6 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -52,17 +52,17 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch } public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 1, aDescription, aTextures); } final String[] mDescription = new String[] { "Outputs pollution from a multiblock", "DO NOT OBSTRUCT THE OUTPUT!", - "Requires 3 Air Blocks in front of the exhaust face", - mTier < 5 ? "Requires an Air Filter" - : "Requires an Air Filter " + EnumChatFormatting.WHITE + "[Tier 2]" + EnumChatFormatting.GRAY, - "Can take Air Filters from an input bus of the multiblock", - "Reduces Pollution to " + calculatePollutionReduction(100, true) + "%", - "Recovers " + (100 - calculatePollutionReduction(100, true)) + "% of CO2/CO/SO2", CORE.GT_Tooltip.get() }; + "Requires 3 Air Blocks in front of the exhaust face", + mTier < 5 ? "Requires an Air Filter" + : "Requires an Air Filter " + EnumChatFormatting.WHITE + "[Tier 2]" + EnumChatFormatting.GRAY, + "Can take Air Filters from an input bus of the multiblock", + "Reduces Pollution to " + calculatePollutionReduction(100, true) + "%", + "Recovers " + (100 - calculatePollutionReduction(100, true)) + "% of CO2/CO/SO2", CORE.GT_Tooltip.get() }; @Override public String[] getDescription() { @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return (aIndex == this.SLOT_FILTER && isAirFilter(aStack)); } @@ -152,7 +152,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch IGregTechTileEntity bmte = getBaseMetaTileEntity(); ForgeDirection facing = bmte.getFrontFacing(); return bmte.getAirAtSide(facing) && bmte.getAirAtSideAndDistance(facing, 1) - && bmte.getAirAtSideAndDistance(facing, 2); + && bmte.getAirAtSideAndDistance(facing, 2); } /** @@ -249,14 +249,18 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isClientSide()) { - if (this.getBaseMetaTileEntity().isActive()) { + if (this.getBaseMetaTileEntity() + .isActive()) { String aParticleName; if ((aTick % 2) == 0) { aParticleName = "cloud"; } else { aParticleName = "smoke"; } - this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + this.pollutionParticles( + this.getBaseMetaTileEntity() + .getWorld(), + aParticleName); } } } @@ -306,35 +310,35 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch if (chk1) { aWorld.spawnParticle( - name, - (double) (xPos + ran1 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran1 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } if (chk2) { aWorld.spawnParticle( - name, - (double) (xPos + ran2 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran2 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } if (chk3) { aWorld.spawnParticle( - name, - (double) (xPos + ran3 * 0.5F), - (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), - (double) xSpd, - (double) ySpd, - (double) zSpd); + name, + (double) (xPos + ran3 * 0.5F), + (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) xSpd, + (double) ySpd, + (double) zSpd); } } @@ -349,16 +353,18 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch @Override public GUITextureSet getGUITextureSet() { return new GUITextureSet().setMainBackground(GTPP_UITextures.BACKGROUND_YELLOW) - .setItemSlot(GTPP_UITextures.SLOT_ITEM_YELLOW).setTitleTab( - GTPP_UITextures.TAB_TITLE_YELLOW, - GTPP_UITextures.TAB_TITLE_DARK_YELLOW, - GTPP_UITextures.TAB_TITLE_ANGULAR_YELLOW); + .setItemSlot(GTPP_UITextures.SLOT_ITEM_YELLOW) + .setTitleTab( + GTPP_UITextures.TAB_TITLE_YELLOW, + GTPP_UITextures.TAB_TITLE_DARK_YELLOW, + GTPP_UITextures.TAB_TITLE_ANGULAR_YELLOW); } @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( - new SlotWidget(inventoryHandler, 0).setFilter(stack -> stack.getItem() instanceof ItemAirFilter) - .setBackground(getGUITextureSet().getItemSlot()).setPos(79, 34)); + new SlotWidget(inventoryHandler, 0).setFilter(stack -> stack.getItem() instanceof ItemAirFilter) + .setBackground(getGUITextureSet().getItemSlot()) + .setPos(79, 34)); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java index 232d8a8c55..ad94907d4c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public GT_MetaTileEntity_Hatch_Naquadah(final String aName, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, 6, aDescription[0], aTextures); mFluidCapacity = 32000; initHatch(); @@ -53,21 +53,22 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In @Override public ITexture[] getTexturesActive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; } @Override public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, - final ForgeDirection side, final ItemStack aStack) { + final ForgeDirection side, final ItemStack aStack) { if (side == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { for (FluidStack f : mFluidsToUse) { if (f != null) { - if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f.getFluid()) { + if (GT_Utility.getFluidForFilledItem(aStack, true) + .getFluid() == f.getFluid()) { return true; } } @@ -113,8 +114,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In String aEnrNaq = aDescCache[1]; String aNaquad = aDescCache[2]; String[] s2 = new String[] { "Fluid Input for Multiblocks", "Capacity: " + getCapacity() + "L", - "Accepted Fluid: " + aNaq, "Accepted Fluid: " + aEnrNaq, "Accepted Fluid: " + aNaquad, - CORE.GT_Tooltip.get() }; + "Accepted Fluid: " + aNaq, "Accepted Fluid: " + aEnrNaq, "Accepted Fluid: " + aNaquad, + CORE.GT_Tooltip.get() }; return s2; } @@ -124,7 +125,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In FluidStack mLockedStack = f; Integer mLockedTemp = 0;; String mTempMod = "" + EnumChatFormatting.RESET; - mLockedTemp = mLockedStack.getFluid().getTemperature(); + mLockedTemp = mLockedStack.getFluid() + .getTemperature(); if (mLockedTemp != null) { if (mLockedTemp <= -3000) { mTempMod = "" + EnumChatFormatting.DARK_PURPLE; @@ -160,7 +162,7 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, - int aColorIndex, boolean aActive, boolean aRedstone) { + int aColorIndex, boolean aActive, boolean aRedstone) { byte a1 = 0, a2 = 0; try { if (F1 == null) { @@ -183,19 +185,19 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In if (side == ForgeDirection.UP || side == ForgeDirection.DOWN) { ITexture g = textureIndex > 0 ? BlockIcons.casingTexturePages[a2][texturePointer] - : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; + : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; return new ITexture[] { g, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; + new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; } return side != facing - ? (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } - : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) - : (textureIndex > 0 - ? (aActive ? this.getTexturesActive(BlockIcons.casingTexturePages[a2][texturePointer]) - : this.getTexturesInactive(BlockIcons.casingTexturePages[a2][texturePointer])) - : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) - : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); + ? (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } + : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) + : (textureIndex > 0 + ? (aActive ? this.getTexturesActive(BlockIcons.casingTexturePages[a2][texturePointer]) + : this.getTexturesInactive(BlockIcons.casingTexturePages[a2][texturePointer])) + : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) + : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java index f70be9aa89..58dc7ec380 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat } public GT_MetaTileEntity_Hatch_OutputBattery(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures); } @@ -115,13 +115,13 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing(); } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == aBaseMetaTileEntity.getFrontFacing(); } @@ -134,17 +134,17 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat protected void fillStacksIntoFirstSlots() { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { - GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); - } + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) { + GT_Utility.moveStackFromSlotAToSlotB( + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); + } } @Override @@ -176,23 +176,22 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat if (aBaseMetaTileEntity.isServerSide()) { if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity mMetaTileEntity) { if (mMetaTileEntity.dechargerSlotCount() > 0 - && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { for (int i = mMetaTileEntity.dechargerSlotStartIndex(), - k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { + k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) { if (mMetaTileEntity.mInventory[i] != null - && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { + && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) { aBaseMetaTileEntity.increaseStoredEnergyUnits( - GT_ModHandler.dischargeElectricItem( - mMetaTileEntity.mInventory[i], - (int) Math.min( - V[mTier] * 15, - aBaseMetaTileEntity.getEUCapacity() - - aBaseMetaTileEntity.getStoredEU()), - (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), - true, - false, - false), - true); + GT_ModHandler.dischargeElectricItem( + mMetaTileEntity.mInventory[i], + (int) Math.min( + V[mTier] * 15, + aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), + (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), + true, + false, + false), + true); if (mMetaTileEntity.mInventory[i].stackSize <= 0) mMetaTileEntity.mInventory[i] = null; } } @@ -211,8 +210,8 @@ public class GT_MetaTileEntity_Hatch_OutputBattery extends GT_MetaTileEntity_Hat public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { if (mTier == 2) { for (int i = 0; i < 4; i++) { - builder.widget( - new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); + builder + .widget(new ElectricSlotWidget(inventoryHandler, i).setPos(70 + (i % 2) * 18, 25 + (i / 2) * 18)); } } else { for (int i = 0; i < 16; i++) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java index 6945e4928d..bfe8290240 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java @@ -13,12 +13,12 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GT_MetaTileEntity_Hatch_Reservoir extends GT_MetaTileEntity_Hatch_FluidGenerator { public GT_MetaTileEntity_Hatch_Reservoir(final int aID, final String aName, final String aNameRegional, - final int aTier) { + final int aTier) { super(aID, aName, aNameRegional, aTier); } public GT_MetaTileEntity_Hatch_Reservoir(final String aName, final int aTier, final String[] aDescription, - final ITexture[][][] aTextures) { + final ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java index d8811a72f7..94c28877d8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Solidifier.java @@ -24,20 +24,20 @@ public class GT_MetaTileEntity_Hatch_Solidifier extends GT_MetaTileEntity_Hatch_ @Override public String[] getDescription() { return new String[] { - "Fluid Input with Mold for " + EnumChatFormatting.YELLOW - + "Large Processing Factory" - + EnumChatFormatting.RESET, - "#22 Circuit is imprinted in Hatch", "Capacity: " + GT_Utility.formatNumbers(getCapacity()) + "L", - "Added by: " + EnumChatFormatting.AQUA - + "Quetz4l" - + " - " - + EnumChatFormatting.RED - + "[GT++]" - + EnumChatFormatting.RESET }; + "Fluid Input with Mold for " + EnumChatFormatting.YELLOW + + "Large Processing Factory" + + EnumChatFormatting.RESET, + "#22 Circuit is imprinted in Hatch", "Capacity: " + GT_Utility.formatNumbers(getCapacity()) + "L", + "Added by: " + EnumChatFormatting.AQUA + + "Quetz4l" + + " - " + + EnumChatFormatting.RED + + "[GT++]" + + EnumChatFormatting.RESET }; } public GT_MetaTileEntity_Hatch_Solidifier(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, getSlots(aTier), aTier, aDescription, aTextures); } @@ -53,7 +53,9 @@ public class GT_MetaTileEntity_Hatch_Solidifier extends GT_MetaTileEntity_Hatch_ @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { super.addUIWidgets(builder, buildContext); - builder.widget(new SlotWidget(inventoryHandler, moldSlot).setPos(125, 35).setSize(18, 18)); + builder.widget( + new SlotWidget(inventoryHandler, moldSlot).setPos(125, 35) + .setSize(18, 18)); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java index 0122b1b0c8..5cc1e64d13 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java @@ -31,38 +31,38 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public GT_MetaTileEntity_Hatch_Steam_BusInput(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - getSlots(aTier), - new String[] { "Item Input for Steam Multiblocks", - "Shift + right click with screwdriver to toggle automatic item shuffling", "Capacity: 4 stacks", - "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + getSlots(aTier), + new String[] { "Item Input for Steam Multiblocks", + "Shift + right click with screwdriver to toggle automatic item shuffling", "Capacity: 4 stacks", + "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String[] aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } @Override public ITexture[] getTexturesActive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return GT_Mod.gregtechproxy.mRenderIndicatorsOnHatch - ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } - : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; + ? new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN), TextureFactory.of(ITEM_IN_SIGN) } + : new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_PIPE_IN) }; } @Override @@ -116,16 +116,16 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha } else { for (int i = 0; i < mInventory.length; i++) for (int j = i + 1; j < mInventory.length; j++) if (mInventory[j] != null - && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) + && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) GT_Utility.moveStackFromSlotAToSlotB( - getBaseMetaTileEntity(), - getBaseMetaTileEntity(), - j, - i, - (byte) 64, - (byte) 1, - (byte) 64, - (byte) 1); + getBaseMetaTileEntity(), + getBaseMetaTileEntity(), + j, + i, + (byte) 64, + (byte) 1, + (byte) 64, + (byte) 1); } } @@ -146,23 +146,23 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha if (aPlayer.isSneaking()) { disableSort = !disableSort; GT_Utility.sendChatToPlayer( - aPlayer, - GT_Utility.trans("200.1", "Automatic Item Shuffling: ") - + (disableSort ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled"))); + aPlayer, + GT_Utility.trans("200.1", "Automatic Item Shuffling: ") + + (disableSort ? GT_Utility.trans("087", "Disabled") : GT_Utility.trans("088", "Enabled"))); } } @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return false; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, - ItemStack aStack) { + ItemStack aStack) { return side == getBaseMetaTileEntity().getFrontFacing() - && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); } @Override @@ -189,84 +189,82 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha public ITexture[] getSideFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getSideFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getFrontFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE) }; } public ITexture[] getTopFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getTopFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP) }; } public ITexture[] getBottomFacingActive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingInactive(byte aColor) { return new ITexture[] { new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM) }; } public ITexture[] getBottomFacingPipeActive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getBottomFacingPipeInactive(byte aColor) { - return new ITexture[] { - new GT_RenderedTexture( - mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM - : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + return new ITexture[] { new GT_RenderedTexture( + mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM : Textures.BlockIcons.MACHINE_BRONZE_BOTTOM), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getTopFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP : Textures.BlockIcons.MACHINE_BRONZE_TOP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeActive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } public ITexture[] getSideFacingPipeInactive(byte aColor) { - return new ITexture[] { new GT_RenderedTexture( + return new ITexture[] { + new GT_RenderedTexture( mTier == 1 ? Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE : Textures.BlockIcons.MACHINE_BRONZE_SIDE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) }; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java index 962d4d2f3e..1d4dbc8987 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java @@ -25,37 +25,37 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) { super( - aID, - aName, - aNameRegional, - aTier, - 4, - new String[] { "Item Output for Steam Multiblocks", "Does not automatically export items", - "Capacity: 4 stacks", "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); + aID, + aName, + aNameRegional, + aTier, + 4, + new String[] { "Item Output for Steam Multiblocks", "Does not automatically export items", + "Capacity: 4 stacks", "Does not work with non-steam multiblocks", CORE.GT_Tooltip.get() }); } public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, - ITexture[][][] aTextures) { + ITexture[][][] aTextures) { super(aName, aTier, 4, aDescription, aTextures); } public GT_Me