diff options
author | chill <chill.gtnh@outlook.com> | 2023-06-05 06:51:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 06:51:28 +0200 |
commit | db089891a20e5696096907864578e39586035e6e (patch) | |
tree | e56d68eb64c3b8025193930b68e731b23d0f60d9 /src/main/java/gregtech/common/tileentities/machines/multi | |
parent | dd9bbe334a00a0435502ac502d4155bfa12d123d (diff) | |
download | GT5-Unofficial-db089891a20e5696096907864578e39586035e6e.tar.gz GT5-Unofficial-db089891a20e5696096907864578e39586035e6e.tar.bz2 GT5-Unofficial-db089891a20e5696096907864578e39586035e6e.zip |
Code cleanup (#2040)
* remove redundant suppressions
* prettify commented code
* improve comments
The integer comment contradicted the code, so I deleted it.
* delete commented-out code
* update bitwise int flip from XOR to the dedicated tilda operator
The flip was a 32-bit XOR, which is an int-flip.
That XOR was replaced with an equivalent tilda operator.
* convert a field to inline
This field was used only once, so put it straight to where it is used.
* remove fluid fix since no-one uses Forge version 1355 or earlier
* unwrap switches where fitting
In some places, we suppress IntelliJ's inspection
RedundantLabeledSwitchRuleCodeBlock - we don't want to unwrap some of
the suggested cases because we want to keep the consistency in a
switch statement for the sake of readability.
* fuse "collect" into Stream API
* fix javadocs
* remove unnecessary public modifiers from an interface
Members of an interface are public by default.
* move common parts outside of if
* suppress OverrideOnly warning in a javadoc
* remove unused lock
* suppress warnings about unchecked casts
These warnings require non-trivial fixes that are yet to arrive.
For now, let's suppress them to reduce the warning-bloat.
* remove outdated comment
* remove final modifier from private methods
Because they are private, it is hard to accidentally overwrite them.
Therefore, the final modifier is redundant in this case.
* refactor getIcon
The first 'if' doesn't cover only tMeta == 9 && mConnectedMachineTextures,
therefore the second if can be unrolled.
The last switch is redundant because all tMeta values are covered by
switches, but let's keep SOLID_STEEL as a fallback just in case.
* explain what the casings are and why block casings are split
* suppress switch-to-if suggestion
* remove unnecessary null check
The null is handled in doGenerateItem()
* address redundant local variables
* rename variables in onTick
* suppress warning about accessing static member via instance
* rephrase exception
* rephrase javadoc
* address field-can-be-final warnings
* remove empty methods
* enum cannot inherit, so protected is redundant
* remove redundant throws
* update imports to be not wildcard
* remove unnecessary try-catch
* update for loop
* remove redundant code in order to use the diamond operator
* update instanceof to use pattern variables
* replace blank lines with <p> in javadocs
* fix dangling javadocs
* suppress warning about unreachable methods in javadocs
* remove redundant operation
* add the descriptions of parameters in javadocs
Also fix javadocs along the way.
* relax returned type in javadoc
That was done in order to make the docs reflect the code more often.
Otherwise, people may forget to change the returned type again with
another change.
* make long conversion explicit
Integer multiplication can give a wrong result if one of the parts is
not explicitly cast to long. Let's cast one of the parts where
applicable.
* remove unary plus
* simplify unary minus
* use addAll instead of forEach,add
It was suggested by IntelliJ to replace the iteration with a bulk operation
to improve performance.
* replace .asList with .singletonList for consistency
* simplify toArray calls
Explanation from IntelliJ:
There are two styles to convert a collection to an array:
* A pre-sized array, for example, c.toArray(new String[c.size()])
* An empty array, for example, c.toArray(new String[0])
In older Java versions, using a pre-sized array was recommended, as the
reflection call necessary to create an array of proper size was quite slow.
However, since late updates of OpenJDK 6, this call was intrinsified, making
the performance of the empty array version the same, and sometimes even better,
compared to the pre-sized version. Also, passing a pre-sized array is dangerous
for a concurrent or synchronized collection as a data race is possible between
the size and toArray calls. This may result in extra nulls at the end of the
array if the collection was concurrently shrunk during the operation.
* split StringBuilder append
Explanation by IntelliJ:
Reports String concatenation used as the argument to appends.
Such calls may profitably be turned into chained append calls on the existing
StringBuilder saving the cost of an extra StringBuilder allocation. This
inspection ignores compile-time evaluated String concatenations,
in which case the conversion would only worsen performance.
* annotate overriding methods with @Nonnull where needed
The method that was overridden has @Nonnull so the method that is overriding
should also have @Nonnull.
* remove set adding itself to itself
* remove null check because findField either works or blows up
cpw.mods.fml.relauncher.ReflectionHelper::findField either returns a non-null
value or throws a RuntimeException, so no need to check of null.
* remove slot comparison with tInventory.length
slot max value is 127 when tInventory.length is set to 256, which results in
that the condition is always true and unnecessary.
* remove aOutput2 null check
As GT_Values.NI is null, there is no need to check aOutput2 for null again
* suppress the suggestion to delete tMeta < 13
mConnectedMachineTextures can change, so tMeta range is not guaranteed
* remove aCoverVariable % 3 < 2
the if above already limits the result of % 3 to "2", so the condition
"less than 2" is always false.
* unwrap "if" because bonus is unchanged
Unwrap if because even if the bonus is a variable, it hasn't been changed for
the past 8 years and is unlikely to be changed in the future.
* reformat javadoc
* improve ignoring an exception
Make them either more clear or concise
* fixup fix typo
* update deprecated calls of newInstance()
* remove testing BaseMetaTileEntity
GregTech_API.constructBaseMetaTileEntity() checks the creation by itself,
logging and throwing a runtime error if failed.
* unwrap hatch-fill for do_SolarSalt
To reach this branch, do_coolant needs to be false and we need to still be in
the function, which means that do_SolarSalt was set to true in the previous
top-tier "if".
* remove always-false input-bus checks of MTE PlasmaForge
size() is non-negative, and the values it is compared to are final and 0.
* length and size are non-negative
Therefore, there's no need to check their negativity
* aOutput is guaranteed to be positive
* tThereWasARecipe is always false when reached in its first occurrence
* convert an assert into if
Only tStack 2 is checked for null because if it isn't null then
tStack1 also isn't null based on the "if" above.
Also IntelliJ was sure that tStack is not null for some reason.
On a side note, assertions work only either with a specified flag
or in debug runs. Therefore, it is dangerous to rely on them.
* simplify stone-gravel-cobble if
tBlock != Blocks.stone because of the if at the start of the method.
for the last else-if, tBlock == Blocks.gravel because of the check slightly
above the change.
* interDimensional is always true because of the first if
* convert an example to javadoc
* remove always-false statements
* replace referential string equality with equals
If we compare strings by "==", we compare references to them, which is not
what we usually want. I wasn't sure if String Pool works here, so I played
it save with equals().
* use Automatic Resource Management for AutoCloseable ByteBufOutputStream
* add todo to swap from sleep to event bus
* null is checked by instanceof
* merge switch branches
* add a TODO to use clamp()
* new String declaration is redundant
* use getOrDefault for a map
* replace StringBuilder with concatenation where fitting
Using a StringBuilder to concatenate two string will not make the program
faster or more understandable, so I swapped it to concatenation.
* remove unnecessary continue
* flip if
* remove redundant returns
* unwrap ifs
It's checked at the top "if" that aType == IItemRenderer.ItemRenderType.INVENTORY,
so all aType.equals(IItemRenderer.ItemRenderType.INVENTORY below are always true.
* remove checking all GT VERSIONs except the API one
* remove version check from GT_Mod and delete respective VERSION fields
Aside from GregTech_API.VERSION, these fields are not used anywhere
in the project, so only GregTech_API.VERSION was kept.
The idea and the usage check were done by miozune.
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
31 files changed, 269 insertions, 103 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index bfef3cfc07..454f04066f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -1,8 +1,14 @@ package gregtech.common.tileentities.machines.multi; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; @@ -40,7 +46,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput; import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.render.TextureFactory; -import gregtech.api.util.*; +import gregtech.api.util.GT_AssemblyLineUtils; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; @@ -296,7 +304,7 @@ public class GT_MetaTileEntity_AssemblyLine } // Best not to run this recipe. - if (!foundRecipe || tStack.length <= 0) { + if (!foundRecipe || tStack.length == 0) { return false; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 6b0b49d982..a02e2647d0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -1,7 +1,11 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.GT_Values.debugCleanroom; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.BLOCK_PLASCRETE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_GLOW; import java.util.HashMap; import java.util.Map; @@ -390,8 +394,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB private static class ConfigEntry { - int percentage; - int allowedCount; + final int percentage; + final int allowedCount; ConfigEntry(int percentage, int count) { this.percentage = percentage; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java index ab52f481ca..3fff653723 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java @@ -1,6 +1,9 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; import static gregtech.api.enums.GT_Values.VN; import java.util.List; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index bf5d12482f..ff28a9e40a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -356,7 +356,7 @@ public class GT_MetaTileEntity_DieselEngine + EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.engine.output") + ": " + EnumChatFormatting.RED - + GT_Utility.formatNumbers((mEUt * mEfficiency / 10000)) + + GT_Utility.formatNumbers(((long) mEUt * mEfficiency / 10000)) + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.engine.consumption") + ": " diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index e8443fbe88..3a75cab071 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -5,7 +5,12 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java index 5d92f251de..8c671f69a8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java @@ -3,7 +3,13 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.W; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE; @@ -42,7 +48,10 @@ import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.objects.GT_ChunkManager; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index a7b845b5de..0557128b60 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -1,10 +1,20 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.VN; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; @@ -36,7 +46,11 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.fluid.IFluidStore; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; @@ -203,7 +217,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends } protected boolean processRecipe(ItemStack[] tItems, FluidStack[] tFluids) { - if (tItems.length <= 0) return false; + if (tItems.length == 0) return false; long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java index ee08617950..9503f11026 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java @@ -206,7 +206,7 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die + EnumChatFormatting.RESET, StatCollector.translateToLocal("GT5U.engine.output") + ": " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUt * mEfficiency / 10000) + + GT_Utility.formatNumbers((long) -mEUt * mEfficiency / 10000) + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.engine.consumption") + ": " diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 4fceb7c40d..d7b51c8de6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -47,7 +47,10 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.modularui.IAddUIWidgets; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; -import gregtech.api.metatileentity.implementations.*; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.objects.GT_ItemStack; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index 95529c503f..d3c1267f3f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -3,8 +3,16 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import net.minecraft.item.ItemStack; @@ -187,7 +195,7 @@ public class GT_MetaTileEntity_HeatExchanger extends .startsWith("gt.integrated_circuit")) { int circuit_config = mInventory[1].getItemDamage(); if (circuit_config >= 1 && circuit_config <= 25) { - // If so, apply the penalty and reduced threshold. + // If so, apply the penalty and reduce the threshold. penalty = (circuit_config - 1) * penalty_per_config; superheated_threshold -= (shs_reduction_per_config * (circuit_config - 1)); } @@ -231,10 +239,8 @@ public class GT_MetaTileEntity_HeatExchanger extends mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("ic2pahoehoelava", fluidAmountToConsume), true); } else if (do_coolant) { mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("ic2coolant", fluidAmountToConsume), true); - } else if (do_solarSalt) { - mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("molten.solarsaltcold", fluidAmountToConsume), true); } else { - return false; + mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("molten.solarsaltcold", fluidAmountToConsume), true); } this.mEfficiencyIncrease = 80; return true; @@ -349,11 +355,6 @@ public class GT_MetaTileEntity_HeatExchanger extends } @Override - public boolean isGivingInformation() { - return super.isGivingInformation(); - } - - @Override public String[] getInfoData() { return new String[] { StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": " @@ -369,7 +370,7 @@ public class GT_MetaTileEntity_HeatExchanger extends + StatCollector.translateToLocal("GT5U.LHE.steam") + ": " + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) - + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) + + GT_Utility.formatNumbers(superheated ? -2L * mEUt : -mEUt) + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 11a792f0a9..3cceb98bf0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -2,7 +2,10 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java index c8ae955688..6820d1c59a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java @@ -1,12 +1,27 @@ package gregtech.common.tileentities.machines.multi; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY_GLOW; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofFrame; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Random; import java.util.stream.Collectors; import net.minecraft.entity.player.EntityPlayer; @@ -341,7 +356,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; this.mOutputItems = sMidProduct; - calculateOverclockedNessMultiInternal(30 * tRealUsed, getTime(sMode), 1, getMaxInputVoltage(), false); + calculateOverclockedNessMultiInternal(30L * tRealUsed, getTime(sMode), 1, getMaxInputVoltage(), false); if (this.mEUt > 0) { this.mEUt = -this.mEUt; } @@ -351,7 +366,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final boolean checkTypes(int aID, HashSet<Integer>... aTables) { + private boolean checkTypes(int aID, HashSet<Integer>... aTables) { for (HashSet<Integer> set : aTables) { if (set.contains(aID)) { return true; @@ -391,7 +406,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doMac(HashSet<Integer>... aTables) { + private void doMac(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -413,7 +428,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doWash(HashSet<Integer>... aTables) { + private void doWash(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -439,7 +454,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doThermal(HashSet<Integer>... aTables) { + private void doThermal(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -461,7 +476,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doCentrifuge(HashSet<Integer>... aTables) { + private void doCentrifuge(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -483,7 +498,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doSift(HashSet<Integer>... aTables) { + private void doSift(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -505,7 +520,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } @SafeVarargs - private final void doChemWash(HashSet<Integer>... aTables) { + private void doChemWash(HashSet<Integer>... aTables) { List<ItemStack> tProduct = new ArrayList<>(); if (sMidProduct != null) { for (ItemStack aStack : sMidProduct) { @@ -557,15 +572,16 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends } int tChance = aRecipe.getOutputChance(i); if (tChance == 10000) { - tOutput.add(GT_Utility.copyAmountUnsafe(aTime * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput.add( + GT_Utility.copyAmountUnsafe((long) aTime * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } else { // Use Normal Distribution double u = aTime * (tChance / 10000D); double e = aTime * (tChance / 10000D) * (1 - (tChance / 10000D)); Random random = new Random(); int tAmount = (int) Math.ceil(Math.sqrt(e) * random.nextGaussian() + u); - tOutput - .add(GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); + tOutput.add( + GT_Utility.copyAmountUnsafe((long) tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i))); } } return tOutput.stream() diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 2e68b12375..37495c60ea 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -4,7 +4,11 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; import static gregtech.api.enums.ItemList.Circuit_Integrated; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER; @@ -122,7 +126,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler tt.addInfo( "Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f)) + "L of Steam with 1 Coal at " - + formatNumbers(getEUt() * 40) + + formatNumbers(getEUt() * 40L) + "L/s") // ? .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") .addInfo("Solid Fuels with a burn value that is too high or too low will not work"); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 39fd7905e4..2c647aa458 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -3,8 +3,17 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import java.util.ArrayList; @@ -22,7 +31,13 @@ import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.structure.*; +import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment; +import com.gtnewhorizon.structurelib.structure.IItemSource; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.IStructureElement; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureUtility; import com.gtnewhorizon.structurelib.util.ItemStackPredicate; import gregtech.api.GregTech_API; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 102ffab30e..f31967674c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -3,7 +3,13 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Dynamo; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW; import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW_EMPTY; @@ -78,7 +84,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine protected int counter = 0; protected boolean looseFit = false; protected int overflowMultiplier = 0; - protected float[] flowMultipliers = new float[] { 1, 1, 1 }; + protected final float[] flowMultipliers = new float[] { 1, 1, 1 }; // client side stuff protected boolean mHasTurbine; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 1984d48a51..1f5bdf31d2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -1,6 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_EMPTY5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java index 568925b371..09c6d344b6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java @@ -1,6 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_EMPTY5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index 03d9de99be..d61e75eac3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -1,6 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_EMPTY5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine_Steam.calculateLooseFlow; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index df4e7e6d91..9e54fe11a5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -1,6 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_EMPTY5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 17fe1d2af3..849d0af462 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -1,7 +1,11 @@ package gregtech.common.tileentities.machines.multi; import static gregtech.api.enums.GT_Values.STEAM_PER_WATER; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_ACTIVE5; +import static gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_NEW_EMPTY5; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 3bc884f8af..e04255c28b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -3,7 +3,11 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java index e49bc4fd8c..6018cb7450 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java @@ -1,7 +1,13 @@ package gregtech.common.tileentities.machines.multi; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_HatchElement.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; import static gregtech.api.enums.GT_Values.AuthorBlueWeabo; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index 3920c8285a..2e82efa4f9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -8,7 +8,8 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_A import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -import static gregtech.api.util.GT_StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofCoil; import java.util.ArrayList; import java.util.List; @@ -234,20 +235,18 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult if (aTileEntity == null) return false; IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input tHatch) { if (mInputOnSide == 1) return false; mInputOnSide = 0; mOutputOnSide = 1; - GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity; tHatch.updateTexture(aBaseCasingIndex); tHatch.mRecipeMap = getRecipeMap(); return mInputHatches.add(tHatch); } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output tHatch) { if (mOutputOnSide == 1) return false; mInputOnSide = 1; mOutputOnSide = 0; - GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity; tHatch.updateTexture(aBaseCasingIndex); return mOutputHatches.add(tHatch); } @@ -258,20 +257,18 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult if (aTileEntity == null) return false; IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input tHatch) { if (mInputOnSide == 0) return false; mInputOnSide = 1; mOutputOnSide = 0; - GT_MetaTileEntity_Hatch_Input tHatch = (GT_MetaTileEntity_Hatch_Input) aMetaTileEntity; tHatch.updateTexture(aBaseCasingIndex); tHatch.mRecipeMap = getRecipeMap(); return mInputHatches.add(tHatch); } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output tHatch) { if (mOutputOnSide == 0) return false; mInputOnSide = 0; mOutputOnSide = 1; - GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aMetaTileEntity; tHatch.updateTexture(aBaseCasingIndex); return mOutputHatches.add(tHatch); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java index e1ef5bc55d..b0496a3061 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java @@ -1,7 +1,11 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.GT_Values.debugDriller; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index b16bd4bdea..dd688e3b0d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -1,8 +1,10 @@ package gregtech.common.tileentities.machines.multi; -import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; import static gregtech.api.enums.GT_Values.VN; import java.util.ArrayList; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java index 46ebad2173..04b62d40f6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java @@ -1,8 +1,16 @@ package gregtech.common.tileentities.machines.multi; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_Values.AuthorBlueWeabo; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; @@ -805,16 +813,15 @@ public class GT_MetaTileEntity_PCBFactory extends protected void calculateOverclockedNessMultiInternal(long aEUt, int aDuration, int mAmperage, long maxInputVoltage, boolean perfectOC) { int hatches = Math.max(getExoticEnergyHatches().size(), 1); - long zMaxInputVoltage = maxInputVoltage; long zTime = aDuration; long zEUt = aEUt; - if (zMaxInputVoltage < zEUt) { + if (maxInputVoltage < zEUt) { this.lEUt = Long.MAX_VALUE - 1; this.mMaxProgresstime = Integer.MAX_VALUE - 1; return; } - while (zEUt < zMaxInputVoltage) { + while (zEUt < maxInputVoltage) { zEUt = zEUt << 2; zTime = zTime >> (perfectOC ? 2 : 1); if (zTime <= 1) { @@ -826,12 +833,12 @@ public class GT_MetaTileEntity_PCBFactory extends zTime = 1; } - while (zEUt * mAmperage > zMaxInputVoltage * getMaxInputAmps() / hatches) { + while (zEUt * mAmperage > maxInputVoltage * getMaxInputAmps() / hatches) { zEUt = zEUt >> 2; zTime = zTime << (perfectOC ? 2 : 1); } - if (zEUt > zMaxInputVoltage) { + if (zEUt > maxInputVoltage) { zEUt = zEUt >> 2; zTime = zTime << (perfectOC ? 2 : 1); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java index 6715ceed5f..2a92fff523 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java @@ -1,12 +1,24 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; +import static gregtech.api.enums.GT_Values.AuthorColen; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DTPF_OFF; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DTPF_ON; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static java.lang.Math.*; +import static java.lang.Math.floor; +import static java.lang.Math.log; +import static java.lang.Math.pow; import java.util.ArrayList; import java.util.List; @@ -733,16 +745,16 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul if (getCoilLevel() == HeatingCoilLevel.None) return false; // Item input bus check. - if ((mInputBusses.size() < min_input_bus) || (mInputBusses.size() > max_input_bus)) return false; + if (mInputBusses.size() > max_input_bus) return false; // Item output bus check. - if ((mOutputBusses.size() < min_output_bus) || (mOutputBusses.size() > max_output_bus)) return false; + if (mOutputBusses.size() > max_output_bus) return false; // Fluid input hatch check. - if ((mInputHatches.size() < min_input_hatch) || (mInputHatches.size() > max_input_hatch)) return false; + if (mInputHatches.size() > max_input_hatch) return false; // Fluid output hatch check. - if ((mOutputHatches.size() < min_output_hatch) || (mOutputHatches.size() > max_output_hatch)) return false; + if (mOutputHatches.size() > max_output_hatch) return false; // If there is more than 1 TT energy hatch, the structure check will fail. // If there is a TT hatch and a normal hatch, the structure check will fail. diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java index 9dbaebae3c..edbb4015b7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java @@ -1,6 +1,11 @@ package gregtech.common.tileentities.machines.multi; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAnyMeta; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.block.Block; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index a8de56f0cd..1c4374fd34 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -1,9 +1,13 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PROCESSING_ARRAY; @@ -46,7 +50,11 @@ import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.*; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_CubicMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ExoticEnergyInputHelper; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; @@ -270,7 +278,7 @@ public class GT_MetaTileEntity_ProcessingArray } public boolean processRecipe(ItemStack[] tInputs, FluidStack[] tFluids, GT_Recipe.GT_Recipe_Map map) { - if (tInputs.length <= 0 && tFluids.length <= 0) return false; + if (tInputs.length == 0 && tFluids.length == 0) return false; GT_Recipe tRecipe = map.findRecipe( getBaseMetaTileEntity(), mLastRecipe, @@ -591,7 +599,7 @@ public class GT_MetaTileEntity_ProcessingArray + " x", StatCollector.translateToLocal("GT5U.PA.parallel") + ": " + EnumChatFormatting.GREEN - + GT_Utility.formatNumbers((mInventory[1] != null) ? (mInventory[1].stackSize << mMult) : 0) + + GT_Utility.formatNumbers((mInventory[1] != null) ? ((long) mInventory[1].stackSize << mMult) : 0) + EnumChatFormatting.RESET }; } @@ -645,7 +653,7 @@ public class GT_MetaTileEntity_ProcessingArray mMaxProgresstime >>= ocTimeShift; // this is effect of overclocking if (mMaxProgresstime < 1) { if (oldTime == 1) break; - xEUt *= oldTime * (perfectOC ? 1 : 2); + xEUt *= (long) oldTime * (perfectOC ? 1 : 2); break; } else { xEUt <<= 2; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index 6f025d2ce1..2a36377acc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -4,7 +4,13 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.Mods.NewHorizonsCoreMod; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; @@ -42,9 +48,6 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_PyrolyseOven> implements ISurvivalConstructable { private HeatingCoilLevel coilHeat; - // public static GT_CopiedBlockTexture mTextureULV = new - // GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0, - // Dyes.MACHINE_METAL.mRGBa); private static final int CASING_INDEX = 1090; private static final IStructureDefinition<GT_MetaTileEntity_PyrolyseOven> STRUCTURE_DEFINITION = createStructureDefinition(); @@ -169,7 +172,7 @@ public class GT_MetaTileEntity_PyrolyseOven ItemStack[] tInputs = getCompactedInputs(); FluidStack[] tFluids = getCompactedFluids(); - if (tInputs.length <= 0) return false; + if (tInputs.length == 0) return false; GT_Single_Recipe_Check.Builder tSingleRecipeCheckBuilder = null; if (mLockedToSingleRecipe) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java index eff23027ef..429a8a4ddf 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java @@ -1,12 +1,19 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.GT_Values.AuthorColen; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DTPF_OFF; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DTPF_ON; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FUSION1_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; -import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_PlasmaForge.*; +import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_PlasmaForge.DIM_BRIDGE_CASING; +import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_PlasmaForge.DIM_INJECTION_CASING; +import static gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_PlasmaForge.DIM_TRANS_CASING; import static java.lang.Math.max; import static net.minecraft.util.EnumChatFormatting.GOLD; import static net.minecraft.util.EnumChatFormatting.GRAY; |