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/blocks | |
| 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/blocks')
20 files changed, 139 insertions, 68 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 7610bfa769..897011eba9 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -8,6 +8,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { /** diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java index c93d613936..f1fbc30236 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java @@ -14,6 +14,10 @@ import gregtech.api.enums.Textures; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings2 extends GT_Block_Casings_Abstract { public GT_Block_Casings2() { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java index 3d81a8de18..ada77814c8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings3.java @@ -7,6 +7,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings3 extends GT_Block_Casings_Abstract { public GT_Block_Casings3() { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java index 023f97d5b1..49c9c6c992 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java @@ -15,11 +15,15 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_RenderingWorld; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { /** * This mapping is used to look up which texture should be used to render the connected texture for fusion casings. - * + * <p> * This mapping is computed from that giant if ladder from #getIcon in commit * da3421547afadc49938b5b6a7f9a9679afa1d570 The exact meaning of these numbers are like black magic. Read the * original getIcon implementation to understand why it is 0, 1, etc, if that if ladder is even intelligible. @@ -48,8 +52,6 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { .addStringLocalization(getUnlocalizedName() + ".1.name", "Clean Stainless Steel Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Stable Titanium Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Titanium Firebox Casing"); - // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Fusion Casing"); - // GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Fusion Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Fusion Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Fusion Coil Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Fusion Machine Casing MK II"); @@ -163,6 +165,7 @@ public class GT_Block_Casings4 extends GT_Block_Casings_Abstract { || !mConnectedMachineTextures) { return getIcon(ordinalSide, tMeta); } + // noinspection ConstantValue // tMeta < 13 should stay because mConnectedMachineTextures can be changed if (tMeta > 8 && tMeta < 13) { int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1; switch (ordinalSide / 2) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java index d5746b4360..3a9efdbe71 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java @@ -1,6 +1,20 @@ package gregtech.common.blocks; -import static gregtech.api.enums.HeatingCoilLevel.*; +import static gregtech.api.enums.HeatingCoilLevel.EV; +import static gregtech.api.enums.HeatingCoilLevel.HV; +import static gregtech.api.enums.HeatingCoilLevel.IV; +import static gregtech.api.enums.HeatingCoilLevel.LV; +import static gregtech.api.enums.HeatingCoilLevel.LuV; +import static gregtech.api.enums.HeatingCoilLevel.MAX; +import static gregtech.api.enums.HeatingCoilLevel.MV; +import static gregtech.api.enums.HeatingCoilLevel.None; +import static gregtech.api.enums.HeatingCoilLevel.UEV; +import static gregtech.api.enums.HeatingCoilLevel.UHV; +import static gregtech.api.enums.HeatingCoilLevel.UIV; +import static gregtech.api.enums.HeatingCoilLevel.UMV; +import static gregtech.api.enums.HeatingCoilLevel.UV; +import static gregtech.api.enums.HeatingCoilLevel.UXV; +import static gregtech.api.enums.HeatingCoilLevel.ZPM; import java.util.function.Consumer; @@ -15,6 +29,10 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.IHeatingCoil; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings5 extends GT_Block_Casings_Abstract implements IHeatingCoil { public GT_Block_Casings5() { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java index d359a30df0..9bdbf256cc 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings6.java @@ -10,6 +10,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings6 extends GT_Block_Casings_Abstract { public GT_Block_Casings6() { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java index a864132549..26830a3b83 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -14,6 +14,10 @@ import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_RenderingWorld; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public static boolean mConnectedMachineTextures = true; @@ -98,6 +102,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { @Deprecated public IIcon getTurbineCasing(int meta, int iconIndex, boolean active) { + // noinspection SwitchStatementWithTooFewBranches // "if" is harder to edit return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon(); @@ -107,6 +112,7 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { } public IIcon getTurbineCasing(int meta, int iconIndex, boolean active, boolean hasTurbine) { + // noinspection SwitchStatementWithTooFewBranches // "if" is harder to edit return switch (meta) { case 9 -> active ? Textures.BlockIcons.TURBINE_ADVGASACTIVE[iconIndex].getIcon() : hasTurbine ? Textures.BlockIcons.TURBINEADVGAS[iconIndex].getIcon() @@ -134,74 +140,60 @@ public class GT_Block_Casings8 extends GT_Block_Casings_Abstract { public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int ordinalSide) { aWorld = GT_RenderingWorld.getInstance(aWorld); final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + if (tMeta != 9 || !mConnectedMachineTextures) { return getIcon(ordinalSide, tMeta); } - if (tMeta == 9) { - int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1; - switch (ordinalSide / 2) { - case 0 -> { - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) continue; - int tState; - if ((tState = isTurbineControllerWithSide( - aWorld, - xCoord + j, - yCoord, - zCoord + i, - ordinalSide)) != 0) { - return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); - } + + int tInvertLeftRightMod = ordinalSide % 2 * 2 - 1; + + switch (ordinalSide / 2) { + case 0 -> { + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + int tState; + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord, zCoord + i, ordinalSide)) + != 0) { + return getTurbineCasing(tMeta, 4 - i * 3 - j, tState == 1, tState == 2); } } } - case 1 -> { - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) continue; - int tState; - if ((tState = isTurbineControllerWithSide( - aWorld, - xCoord + j, - yCoord + i, - zCoord, - ordinalSide)) != 0) { - return getTurbineCasing( - tMeta, - 4 + i * 3 - j * tInvertLeftRightMod, - tState == 1, - tState == 2); - } + } + case 1 -> { + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + int tState; + if ((tState = isTurbineControllerWithSide(aWorld, xCoord + j, yCoord + i, zCoord, ordinalSide)) + != 0) { + return getTurbineCasing( + tMeta, + 4 + i * 3 - j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } - case 2 -> { - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - if (i == 0 && j == 0) continue; - int tState; - if ((tState = isTurbineControllerWithSide( - aWorld, - xCoord, - yCoord + i, - zCoord + j, - ordinalSide)) != 0) { - return getTurbineCasing( - tMeta, - 4 + i * 3 + j * tInvertLeftRightMod, - tState == 1, - tState == 2); - } + } + case 2 -> { + for (int i = -1; i < 2; i++) { + for (int j = -1; j < 2; j++) { + if (i == 0 && j == 0) continue; + int tState; + if ((tState = isTurbineControllerWithSide(aWorld, xCoord, yCoord + i, zCoord + j, ordinalSide)) + != 0) { + return getTurbineCasing( + tMeta, + 4 + i * 3 + j * tInvertLeftRightMod, + tState == 1, + tState == 2); } } } } - return switch (tMeta) { - case 9 -> Textures.BlockIcons.MACHINE_CASING_ADVANCEDGAS.getIcon(); - default -> Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); - }; } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java index 3aa1756d0c..bc6aca6255 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings9.java @@ -9,6 +9,10 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Block_Casings9 extends GT_Block_Casings_Abstract { public GT_Block_Casings9() { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java index cef97ecb95..59144666df 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings_Abstract.java @@ -24,6 +24,9 @@ import gregtech.api.items.GT_Generic_Block; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; +/** + * The base class for casings. Casings are the blocks that are mainly used to build multiblocks. + */ public abstract class GT_Block_Casings_Abstract extends GT_Generic_Block implements gregtech.api.interfaces.IHasIndexedTexture { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 1849994e02..a78fe5b70d 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -25,7 +25,11 @@ import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SoundResource; +import gregtech.api.enums.Textures; import gregtech.api.items.GT_Generic_Block; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_LanguageManager; @@ -174,18 +178,12 @@ public class GT_Block_Reinforced extends GT_Generic_Block { case 3 -> { return Textures.BlockIcons.BLOCK_TSREIN.getIcon(); } - case 4 -> { + case 4, 6, 7 -> { return Blocks.coal_block.getIcon(0, 0); } case 5 -> { return Textures.BlockIcons.COVER_WOOD_PLATE.getIcon(); } - case 6 -> { - return Blocks.coal_block.getIcon(0, 0); - } - case 7 -> { - return Blocks.coal_block.getIcon(0, 0); - } case 8 -> { return Textures.BlockIcons.BLOCK_STEELPREIN.getIcon(); } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java index 0cfa6477fd..0852e67ecf 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones_Abstract.java @@ -24,7 +24,10 @@ import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OreDictNames; +import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.items.GT_Generic_Block; import gregtech.api.util.GT_ModHandler; diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java index cd2f818b37..1a86a2e534 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings1 extends GT_Item_Casings_Abstract { public GT_Item_Casings1(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java index ec30251560..f98c169c7f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings2.java @@ -6,6 +6,10 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings2 extends GT_Item_Casings_Abstract { public GT_Item_Casings2(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java index fdcb5dbd86..861774d96f 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings3.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings3 extends GT_Item_Casings_Abstract { public GT_Item_Casings3(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java index 5665150407..e2badca2cb 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings4.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings4 extends GT_Item_Casings_Abstract { public GT_Item_Casings4(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java index ae40636eaf..3b3ab68cb1 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings5.java @@ -11,6 +11,10 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.util.GT_LanguageManager; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings5 extends GT_Item_Casings_Abstract { public GT_Item_Casings5(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java index f5250e73da..af533acfa8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings6.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings6 extends GT_Item_Casings_Abstract { public GT_Item_Casings6(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java index 3130006a50..e3f3bbdf97 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings8.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings8 extends GT_Item_Casings_Abstract { public GT_Item_Casings8(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java index f413ffdfb8..678a2424be 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings9.java @@ -2,6 +2,10 @@ package gregtech.common.blocks; import net.minecraft.block.Block; +/** + * The casings are split into separate files because they are registered as regular blocks, and a regular block can have + * 16 subtypes at most. + */ public class GT_Item_Casings9 extends GT_Item_Casings_Abstract { public GT_Item_Casings9(Block block) { diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 5bd6d0b62f..f3e9ab1bc8 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/ |
