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 | |
| 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')
132 files changed, 1310 insertions, 531 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 01dc86de8e..38ed683523 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -52,7 +52,10 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.SoundResource; import gregtech.api.gui.GT_GUIColorOverride; import gregtech.api.gui.modularui.FallbackableSteamTexture; import gregtech.api.interfaces.tileentity.ICoverable; @@ -74,7 +77,14 @@ import gregtech.api.util.GT_Utility; import gregtech.api.util.WorldSpawnedEventBuilder; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.entities.GT_Entity_Arrow_Potion; -import gregtech.common.render.*; +import gregtech.common.render.GT_CapeRenderer; +import gregtech.common.render.GT_FlaskRenderer; +import gregtech.common.render.GT_FluidDisplayStackRenderer; +import gregtech.common.render.GT_MetaGenerated_Tool_Renderer; +import gregtech.common.render.GT_MultiTile_Renderer; +import gregtech.common.render.GT_PollutionRenderer; +import gregtech.common.render.GT_Renderer_Block; +import gregtech.common.render.GT_Renderer_Entity_Arrow; import gregtech.common.render.items.GT_MetaGenerated_Item_Renderer; import gregtech.common.tileentities.debug.GT_MetaTileEntity_AdvDebugStructureWriter; import gregtech.loaders.ExtraIcons; diff --git a/src/main/java/gregtech/common/GT_Network.java b/src/main/java/gregtech/common/GT_Network.java index 253f2025ba..4e6aab914d 100644 --- a/src/main/java/gregtech/common/GT_Network.java +++ b/src/main/java/gregtech/common/GT_Network.java @@ -19,7 +19,23 @@ import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.internal.FMLProxyPacket; import cpw.mods.fml.relauncher.Side; import gregtech.api.enums.GT_Values; -import gregtech.api.net.*; +import gregtech.api.net.GT_Packet; +import gregtech.api.net.GT_Packet_Block_Event; +import gregtech.api.net.GT_Packet_ClientPreference; +import gregtech.api.net.GT_Packet_GtTileEntityGuiRequest; +import gregtech.api.net.GT_Packet_MultiTileEntity; +import gregtech.api.net.GT_Packet_Pollution; +import gregtech.api.net.GT_Packet_RequestCoverData; +import gregtech.api.net.GT_Packet_SendCoverData; +import gregtech.api.net.GT_Packet_SetConfigurationCircuit; +import gregtech.api.net.GT_Packet_Sound; +import gregtech.api.net.GT_Packet_TileEntity; +import gregtech.api.net.GT_Packet_TileEntityCover; +import gregtech.api.net.GT_Packet_TileEntityCoverGUI; +import gregtech.api.net.GT_Packet_TileEntityCoverNew; +import gregtech.api.net.GT_Packet_UpdateItem; +import gregtech.api.net.GT_Packet_WirelessRedstoneCover; +import gregtech.api.net.IGT_NetworkHandler; import gregtech.common.blocks.GT_Packet_Ores; import gregtech.common.net.MessageSetFlaskCapacity; import io.netty.buffer.ByteBuf; @@ -73,7 +89,7 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> } @Override - protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) throws Exception { + protected void encode(ChannelHandlerContext aContext, GT_Packet aPacket, List<Object> aOutput) { final ByteBuf tBuf = Unpooled.buffer() .writeByte(aPacket.getPacketID()); aPacket.encode(tBuf); @@ -86,8 +102,7 @@ public class GT_Network extends MessageToMessageCodec<FMLProxyPacket, GT_Packet> } @Override - protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput) - throws Exception { + protected void decode(ChannelHandlerContext aContext, FMLProxyPacket aPacket, List<Object> aOutput) { final ByteArrayDataInput aData = ByteStreams.newDataInput( aPacket.payload() .array()); diff --git a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java index 7a113bdfb3..c60378ca5e 100644 --- a/src/main/java/gregtech/common/GT_PlayerActivityLogger.java +++ b/src/main/java/gregtech/common/GT_PlayerActivityLogger.java @@ -26,8 +26,9 @@ public class GT_PlayerActivityLogger implements Runnable { } } buffer.clear(); + // TODO: swap from sleep to event bus Thread.sleep(10000L); } - } catch (Throwable e) {} + } catch (Throwable ignored) {} } } diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index ff32ba956f..405c968baa 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -180,9 +180,6 @@ public class GT_Pollution { // Poison effects if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { - // AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, - // tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); - // List<EntityLiving> tEntitys = aWorld.getEntitiesWithinAABB(EntityLiving.class, chunk); for (EntityLivingBase tEnt : tEntitys) { if (tEnt instanceof EntityPlayerMP && ((EntityPlayerMP) tEnt).capabilities.isCreativeMode) continue; @@ -292,14 +289,12 @@ public class GT_Pollution { } if (sourRain && world.isRaining() - && (tBlock == Blocks.stone || tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) + && (tBlock == Blocks.gravel || tBlock == Blocks.cobblestone) && world.getBlock(x, y + 1, z) == Blocks.air && world.canBlockSeeTheSky(x, y, z)) { - if (tBlock == Blocks.stone) { - world.setBlock(x, y, z, Blocks.cobblestone); - } else if (tBlock == Blocks.cobblestone) { + if (tBlock == Blocks.cobblestone) { world.setBlock(x, y, z, Blocks.gravel); - } else if (tBlock == Blocks.gravel) { + } else { world.setBlock(x, y, z, Blocks.sand); } } @@ -372,7 +367,7 @@ public class GT_Pollution { /** * Get the pollution in specified chunk - * + * * @param w world to look in. can be a client world, but that limits the knowledge to what server side send us * @param chunkX chunk coordinate X, i.e. blockX >> 4 * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index d5ba06a7fa..6fc3f41d12 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -7,14 +7,35 @@ import static gregtech.api.enums.FluidState.MOLTEN; import static gregtech.api.enums.FluidState.PLASMA; import static gregtech.api.enums.GT_Values.W; import static gregtech.api.enums.GT_Values.debugEntityCramming; -import static gregtech.api.enums.Mods.*; +import static gregtech.api.enums.Mods.AdvancedSolarPanel; +import static gregtech.api.enums.Mods.AppliedEnergistics2; +import static gregtech.api.enums.Mods.Avaritia; +import static gregtech.api.enums.Mods.BetterLoadingScreen; +import static gregtech.api.enums.Mods.DraconicEvolution; +import static gregtech.api.enums.Mods.ElectroMagicTools; +import static gregtech.api.enums.Mods.EnderIO; +import static gregtech.api.enums.Mods.Forestry; +import static gregtech.api.enums.Mods.GTPlusPlus; +import static gregtech.api.enums.Mods.GalacticraftCore; +import static gregtech.api.enums.Mods.GalaxySpace; +import static gregtech.api.enums.Mods.GanysSurface; +import static gregtech.api.enums.Mods.GraviSuite; +import static gregtech.api.enums.Mods.GregTech; +import static gregtech.api.enums.Mods.IguanaTweaksTinkerConstruct; +import static gregtech.api.enums.Mods.MagicalCrops; +import static gregtech.api.enums.Mods.Names; +import static gregtech.api.enums.Mods.Railcraft; +import static gregtech.api.enums.Mods.TaintedMagic; +import static gregtech.api.enums.Mods.Thaumcraft; +import static gregtech.api.enums.Mods.ThaumicTinkerer; +import static gregtech.api.enums.Mods.TwilightForest; +import static gregtech.api.enums.Mods.WitchingGadgets; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sWiremillRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeConstants.UniversalChemical; import static gregtech.api.util.GT_Util.LAST_BROKEN_TILEENTITY; import java.io.File; -import java.lang.reflect.InvocationTargetException; import java.text.DateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -122,7 +143,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_UO_DimensionList; import gregtech.api.objects.ItemData; @@ -1323,8 +1343,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG public void onServerStarted() { GregTech_API.sWirelessRedstone.clear(); - GT_FluidStack.fixAllThoseFuckingFluidIDs(); - GT_Log.out.println( "GT_Mod: Cleaning up all OreDict Crafting Recipes, which have an empty List in them, since they are never meeting any Condition."); List<IRecipe> tList = CraftingManager.getInstance() @@ -1530,7 +1548,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ForgeEventFactory.onPlayerDestroyItem(aEvent.entityPlayer, aStack); } } - return; } } @@ -2910,7 +2927,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG GT_Values.cls_enabled = true; try { GT_CLS_Compat.stepMaterialsCLS(mEvents, progressBar); - } catch (IllegalAccessException | InvocationTargetException e) { + } catch (IllegalAccessException e) { GT_FML_LOGGER.catching(e); } } else GT_Proxy.stepMaterialsVanilla(this.mEvents, progressBar); @@ -3028,9 +3045,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG @SubscribeEvent public void onItemTooltip(ItemTooltipEvent event) { - if (event.itemStack == null) { - return; - } else { + if (event.itemStack != null) { ItemStack aStackTemp = event.itemStack; GT_ItemStack aStack = new GT_ItemStack(aStackTemp); if (providesProtection(aStackTemp)) { diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index b518b94923..f4510f9ea0 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -27,8 +27,13 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.ItemData; -import gregtech.api.util.*; +import gregtech.api.util.GT_AssemblyLineUtils; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; +import gregtech.api.util.GT_RecipeBuilder; +import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_IntegratedCircuit_Item; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; @@ -1307,6 +1312,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { int tExplosives = Math.min(aInput2, 64); int tGunpowder = tExplosives << 1; // Worst int tDynamite = Math.max(1, tExplosives >> 1); // good + @SuppressWarnings("UnnecessaryLocalVariable") int tTNT = tExplosives; // Slightly better int tITNT = Math.max(1, tExplosives >> 2); // the best // new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2); diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index c5275ef3a1..6804beb402 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -120,7 +120,7 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { GT_LanguageManager.addStringLocalization("tc.aspect.radio", "Radiation"); } - private static final AspectList getAspectList(List<TC_Aspects.TC_AspectStack> aAspects) { + private static AspectList getAspectList(List<TC_Aspects.TC_AspectStack> aAspects) { AspectList rAspects = new AspectList(); TC_Aspects.TC_AspectStack tAspect; for (Iterator<TC_Aspects.TC_AspectStack> i$ = aAspects.iterator(); i$.hasNext(); rAspects diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index f522ff5895..17a5662c09 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -37,7 +37,7 @@ public class GT_UndergroundOil { /** * Effectively just call {@code undergroundOil(te, -1)} for you - * + * * @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te) { @@ -49,7 +49,7 @@ public class GT_UndergroundOil { /** * Effectively just call {@code undergroundOil(chunk, -1)} for you - * + * * @see #undergroundOil(World, int, int, float) */ public static FluidStack undergroundOilReadInformation(Chunk chunk) { @@ -73,7 +73,7 @@ public class GT_UndergroundOil { /** * Pump fluid or read info. - * + * * @param w a remote World. For a WorldClient it will always tell you null * @param chunkX chunk coordinate X, i.e. blockX >> 4 * @param chunkZ chunk coordinate Z, i.e. blockZ >> 4 @@ -121,7 +121,7 @@ public class GT_UndergroundOil { /** * Get the deposit as if it is never exploited - * + * * @return UO fluid kind and amount, or null if nothing here. */ public static Pair<GT_UO_Fluid, Integer> getPristineAmount(World world, int chunkX, int chunkZ) { diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 3b64655f05..5528b4ac63 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -57,9 +57,6 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd); this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd); - // this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon); - // this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars); - // this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY)); short mMaxY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)); if (mMaxY < (this.mMinY + 9)) { @@ -152,26 +149,18 @@ public class GT_Worldgen_GT_Ore_Layer extends GT_Worldgen { int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) { if (mWorldGenName.equals("NoOresInVein")) { if (debugOrevein) GT_Log.out.println(" NoOresInVein"); - // This is a special empty orevein + // Return a special empty orevein return ORE_PLACED; } if (!isGenerationAllowed( aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) - || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { - /* - * // Debug code, but spams log if (debugOrevein) { GT_Log.out.println( "Wrong dimension" ); } - */ + || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : ~aDimensionType)) { + // The following code can be used for debugging, but it spams in logs + // if (debugOrevein) { GT_Log.out.println( "Wrong dimension" ); } return WRONG_DIMENSION; } - /* - * if (!((aWorld.provider.getDimensionName().equalsIgnoreCase("Overworld")) || - * (aWorld.provider.getDimensionName().equalsIgnoreCase("Nether"))||(aWorld.provider.getDimensionName(). - * equalsIgnoreCase("Underdark"))||(aWorld.provider.getDimensionName().equalsIgnoreCase("Twilight Forest"))||( - * aWorld.provider.getDimensionName().equalsIgnoreCase("Underdark"))||(aWorld.provider.getDimensionName(). - * equalsIgnoreCase("The End")))) return WRONG_DIMENSION; - */ if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) { return WRONG_BIOME; diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java index 5a461dab9c..c8219e8361 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java @@ -76,7 +76,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces extends GT_Worldgen { aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) - || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) { + || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : ~aDimensionType)) { return false; } int count = 0; diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java index 17e47cb138..835f9d5c67 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java +++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java @@ -257,9 +257,7 @@ public class GT_Worldgen_Stone extends GT_Worldgen_Ore { double zCalc = ((double) (iZ - tZ) * zSize); zCalc = zCalc * zCalc; leftHandSize = zCalc + xCalc + yCalc; - if (leftHandSize > rightHandSide) { - continue; - } else { + if (leftHandSize <= rightHandSide) { // Yay! We can actually place a block now. (this part copied from original code) Block tTargetedBlock = aWorld.getBlock(iX, iY, iZ); if (tTargetedBlock instanceof GT_Block_Ores_Abstract) { diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index be0eb4e9ea..c731042390 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -492,9 +492,7 @@ public class GT_Worldgenerator implements IWorldGenerator { tRandomWeight -= tWorldGen.mWeight; if (tRandomWeight <= 0) { try { - // if ((tWorldGen.mEndAsteroid && tDimensionType == 1) || (tWorldGen.mAsteroid && - // tDimensionType == -30)) { - if (tWorldGen.mEndAsteroid && tDimensionType == 1) { + if (tWorldGen.mEndAsteroid) { primaryMeta = tWorldGen.mPrimaryMeta; secondaryMeta = tWorldGen.mSecondaryMeta; betweenMeta = tWorldGen.mBetweenMeta; @@ -513,11 +511,7 @@ public class GT_Worldgenerator implements IWorldGenerator { int tX = mX * 16 + aRandom.nextInt(16); int tY = 50 + aRandom.nextInt(200 - 50); int tZ = mZ * 16 + aRandom.nextInt(16); - if (tDimensionType == 1) { - mSize = aRandom.nextInt(endMaxSize - endMinSize); - // } else if (tDimensionName.equals("Asteroids")) { - // mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize)); - } + mSize = aRandom.nextInt(endMaxSize - endMinSize); if ((mWorld.getBlock(tX, tY, tZ) .isAir(mWorld, tX, tY, tZ))) { float randomRadian = aRandom.nextFloat() * (float) Math.PI; diff --git a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java index d4aa78ecf3..b264737677 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java @@ -1,6 +1,6 @@ package gregtech.common.bees; -import java.awt.*; +import java.awt.Color; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java index 4609f11aa0..496aff29ca 100644 --- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java +++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java @@ -9,11 +9,22 @@ import org.apache.commons.lang3.reflect.FieldUtils; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.arboriculture.EnumTreeChromosome; -import forestry.api.genetics.*; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.EnumTolerance; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IAlleleBoolean; +import forestry.api.genetics.IAlleleInteger; +import forestry.api.genetics.IAlleleTolerance; +import forestry.api.genetics.IChromosomeType; import forestry.api.lepidopterology.EnumButterflyChromosome; import forestry.apiculture.flowers.FlowerProvider; import forestry.core.config.Constants; -import forestry.core.genetics.alleles.*; +import forestry.core.genetics.alleles.AlleleBoolean; +import forestry.core.genetics.alleles.AlleleHelper; +import forestry.core.genetics.alleles.AlleleInteger; +import forestry.core.genetics.alleles.AlleleTolerance; +import forestry.core.genetics.alleles.EnumAllele; +import forestry.core.genetics.alleles.IAlleleValue; import forestry.core.utils.vect.IVect; import forestry.plugins.PluginManager; import gregtech.GT_Mod; @@ -151,10 +162,10 @@ public class GT_AlleleHelper extends AlleleHelper { return; } - // uncomment this once all addon mods are using the allele registration with IChromosomeType + // TODO: uncomment this once all addon mods are using the allele registration with IChromosomeType // Collection<IChromosomeType> validTypes = AlleleManager.alleleRegistry.getChromosomeTypes(allele); // if (validTypes.size() > 0 && !validTypes.contains(chromosomeType)) { - // throw new IllegalArgumentException("Allele can't applied to this Chromosome type. Expected: " + validTypes + // throw new IllegalArgumentException("Allele can't be applied to this Chromosome type. Expected: " + validTypes // + " Got: " + chromosomeType); // } @@ -162,8 +173,7 @@ public class GT_AlleleHelper extends AlleleHelper { } @Override - public <T extends Enum<T> & IChromosomeType> void set(IAllele[] alleles, T chromosomeType, - @SuppressWarnings("rawtypes") IAlleleValue value) { + public <T extends Enum<T> & IChromosomeType> void set(IAllele[] alleles, T chromosomeType, IAlleleValue value) { set(alleles, chromosomeType, get(value)); } diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java index 17a764e2b9..e8b2d5b8c6 100644 --- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java +++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java @@ -8,7 +8,11 @@ import net.minecraft.world.World; import org.apache.commons.lang3.reflect.FieldUtils; -import forestry.api.apiculture.*; +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.IAlleleBeeSpecies; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.apiculture.IBeeModifier; import forestry.api.core.IClimateProvider; import forestry.api.genetics.IAllele; import forestry.api.genetics.IGenome; 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/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -38,7 +38,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Item; import gregtech.api.util.GT_ItsNotMyFaultException; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.storage.*; +import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; +import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumTank; +import gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperTank; public class GT_Item_Machines extends ItemBlock implements IFluidContainerItem { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index 4b5fe62dcf..8391724c75 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -218,7 +218,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior { } else { int x = (adjSlot - step); if (x > SLOT_ID_MASK) return createVar(SLOT_ID_MASK, 0, EXPORT_MASK); - else if (x < 1) return createVar(0, +step - adjSlot + 1, 0); + else if (x < 1) return createVar(0, step - adjSlot + 1, 0); else return createVar(x, 0, EXPORT_MASK); } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java index 92d1aca0d7..b10ca4f493 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -40,7 +40,7 @@ public class GT_Cover_Drain extends GT_CoverBehavior { public int doCoverThings(ForgeDirection side, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { if ((aCoverVariable % 3 > 1) && ((aTileEntity instanceof IMachineProgress))) { - if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 3 < 2) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()) { return aCoverVariable; } } @@ -58,7 +58,7 @@ public class GT_Cover_Drain extends GT_CoverBehavior { side, Materials.Water.getFluid( aTileEntity.getWorld() - .isThundering() ? tAmount * 2 : tAmount), + .isThundering() ? tAmount * 2L : tAmount), true); } } diff --git a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java index 219cafdaf1..d5121a38ad 100644 --- a/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java +++ b/src/main/java/gregtech/common/entities/GT_EntityFXPollution.java @@ -41,7 +41,7 @@ public class GT_EntityFXPollution extends EntityFX { if (this.particleAge++ >= this.particleMaxAge) { this.setDead(); } else { - this.motionY += -5.0E-4D; + this.motionY -= 5.0E-4D; this.moveEntity(this.motionX, this.motionY, this.motionZ); if (this.posY == this.prevPosY) { this.motionX *= 1.1D; diff --git a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java index c5ca19fdad..5fd35bb8f5 100644 --- a/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java +++ b/src/main/java/gregtech/common/entities/GT_Entity_Arrow.java @@ -20,7 +20,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.S2BPacketChangeGameState; import net.minecraft.potion.Potion; -import net.minecraft.util.*; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayerFactory; @@ -124,15 +128,15 @@ public class GT_Entity_Arrow extends EntityArrow { this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ) .expand(1.0D, 1.0D, 1.0D)); double tLargestDistance = Double.MAX_VALUE; - for (Entity tAllPotentiallyHitEntity : tAllPotentiallyHitEntities) { - Entity entity1 = tAllPotentiallyHitEntity; - if ((entity1.canBeCollidedWith()) && ((entity1 != tShootingEntity) || (this.ticksInAir >= 5))) { - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(0.3D, 0.3D, 0.3D); + for (Entity potentiallyHitEntity : tAllPotentiallyHitEntities) { + if ((potentiallyHitEntity.canBeCollidedWith()) + && ((potentiallyHitEntity != tShootingEntity) || (this.ticksInAir >= 5))) { + AxisAlignedBB axisalignedbb1 = potentiallyHitEntity.boundingBox.expand(0.3D, 0.3D, 0.3D); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) { double tDistance = vec31.distanceTo(movingobjectposition1.hitVec); if (tDistance < tLargestDistance) { - tHitEntity = entity1; + tHitEntity = potentiallyHitEntity; tLargestDistance = tDistance; } } @@ -243,7 +247,7 @@ public class GT_Entity_Arrow extends EntityArrow { : null, tHitLivingEntity, this.mArrow); - if ((tShootingEntity != null) && (tHitLivingEntity != tShootingEntity) + if ((tHitLivingEntity != tShootingEntity) && ((tHitLivingEntity instanceof EntityPlayer)) && ((tShootingEntity instanceof EntityPlayerMP))) { ((EntityPlayerMP) tShootingEntity).playerNetServerHandler diff --git a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java index 8dcf845bd1..91be04d6f6 100644 --- a/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java +++ b/src/main/java/gregtech/common/gui/modularui/uifactory/SelectItemUIFactory.java @@ -70,7 +70,7 @@ public class SelectItemUIFactory { /** * Constructor for a dialog to select an item from given list. Given callback may be called zero or more times * depending on user action. - * + * * @param header Header text * @param headerItem ItemStack to use as Dialog icon * @param selectedCallback callback upon selected diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java index f3231ac94c..cb746ca32e 100644 --- a/src/main/java/gregtech/common/items/CombType.java +++ b/src/main/java/gregtech/common/items/CombType.java @@ -216,7 +216,6 @@ public enum CombType { public final int chance; private final int id; - private final String name; private final String localizedName; private final int[] color; @@ -228,16 +227,16 @@ public enum CombType { ItemComb.Voltage voltage) { if (id < 0 && !"INVALIDCOMB".equals(pName)) throw new IllegalArgumentException(); this.id = id; - this.name = pName; this.voltage = voltage; this.material = material; this.chance = chance; this.showInList = show; this.color = new int[] { color1, color2 }; this.localizedName = GT_LanguageManager.addStringLocalization( - "comb." + this.name, - this.name.substring(0, 1) - .toUpperCase() + this.name.substring(1) + " Comb"); + "comb." + pName, + pName.substring(0, 1) + .toUpperCase() + pName.substring(1) + + " Comb"); } public void setHidden() { diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 76c5de859c..0dc5000e7a 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -50,7 +50,7 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo private static final String aTextEmptyRow = " "; private static final List<ItemStack> ALL_VARIANTS = new ArrayList<>(); - protected IIcon[] mIconDamage = new IIcon[25]; + protected final IIcon[] mIconDamage = new IIcon[25]; public GT_IntegratedCircuit_Item() { super("integrated_circuit", "Programmed Circuit", ""); @@ -189,22 +189,14 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item implements INetwo public void addAdditionalToolTips(List<String> aList, ItemStack aStack, EntityPlayer aPlayer) { super.addAdditionalToolTips(aList, aStack, aPlayer); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".configuration") - .toString(), - "Configuration: ") + getConfigurationString(getDamage(aStack))); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".configuration", "Configuration: ") + + getConfigurationString(getDamage(aStack))); aList.add( - GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".tooltip.0") - .toString(), - "Right click to reconfigure")); + GT_LanguageManager + .addStringLocalization(getUnlocalizedName() + ".tooltip.0", "Right click to reconfigure")); aList.add( GT_LanguageManager.addStringLocalization( - new StringBuilder().append(getUnlocalizedName()) - .append(".tooltip.1") - .toString(), + getUnlocalizedName() + ".tooltip.1", "Needs a screwdriver or circuit programming tool")); } diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 3555bf1335..34b922b43d 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -1,7 +1,37 @@ package gregtech.common.items; import static gregtech.api.enums.Mods.GalacticraftMars; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.COVER_WOOD_PLATE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ARM; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_CONTROLLER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_CONVEYOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_CRAFTING; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_DRAIN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ENERGYDETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUIDDETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FLUID_STORAGE_MONITOR0; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ITEMDETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_MAINTENANCE_DETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PUMP; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_REDSTONE_RECEIVER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_REDSTONE_TRANSMITTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SCREEN_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SHUTTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_VALVE; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_8V; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_EV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_HV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_IV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_LV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_LuV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_MV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UV; +import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_ZPM; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCannerRecipes; @@ -9,7 +39,19 @@ import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCompressorRecipes; import static gregtech.api.util.GT_RecipeBuilder.MINUTES; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeBuilder.TICKS; -import static gregtech.client.GT_TooltipHandler.Tier.*; +import static gregtech.client.GT_TooltipHandler.Tier.ERV; +import static gregtech.client.GT_TooltipHandler.Tier.EV; +import static gregtech.client.GT_TooltipHandler.Tier.HV; +import static gregtech.client.GT_TooltipHandler.Tier.IV; +import static gregtech.client.GT_TooltipHandler.Tier.LV; +import static gregtech.client.GT_TooltipHandler.Tier.LuV; +import static gregtech.client.GT_TooltipHandler.Tier.MAX; +import static gregtech.client.GT_TooltipHandler.Tier.MV; +import static gregtech.client.GT_TooltipHandler.Tier.ULV; +import static gregtech.client.GT_TooltipHandler.Tier.UMV; +import static gregtech.client.GT_TooltipHandler.Tier.UV; +import static gregtech.client.GT_TooltipHandler.Tier.UXV; +import static gregtech.client.GT_TooltipHandler.Tier.ZPM; import static gregtech.client.GT_TooltipHandler.registerTieredTooltip; import java.util.Collection; @@ -52,8 +94,43 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import gregtech.common.covers.*; -import gregtech.common.items.behaviors.*; +import gregtech.common.covers.GT_Cover_Arm; +import gregtech.common.covers.GT_Cover_ControlsWork; +import gregtech.common.covers.GT_Cover_Conveyor; +import gregtech.common.covers.GT_Cover_Crafting; +import gregtech.common.covers.GT_Cover_DoesWork; +import gregtech.common.covers.GT_Cover_Drain; +import gregtech.common.covers.GT_Cover_EUMeter; +import gregtech.common.covers.GT_Cover_FluidLimiter; +import gregtech.common.covers.GT_Cover_FluidRegulator; +import gregtech.common.covers.GT_Cover_FluidStorageMonitor; +import gregtech.common.covers.GT_Cover_Fluidfilter; +import gregtech.common.covers.GT_Cover_ItemFilter; +import gregtech.common.covers.GT_Cover_ItemMeter; +import gregtech.common.covers.GT_Cover_LiquidMeter; +import gregtech.common.covers.GT_Cover_NeedMaintainance; +import gregtech.common.covers.GT_Cover_PlayerDetector; +import gregtech.common.covers.GT_Cover_Pump; +import gregtech.common.covers.GT_Cover_RedstoneReceiverExternal; +import gregtech.common.covers.GT_Cover_RedstoneReceiverInternal; +import gregtech.common.covers.GT_Cover_RedstoneTransmitterExternal; +import gregtech.common.covers.GT_Cover_RedstoneTransmitterInternal; +import gregtech.common.covers.GT_Cover_Screen; +import gregtech.common.covers.GT_Cover_Shutter; +import gregtech.common.covers.GT_Cover_SolarPanel; +import gregtech.common.covers.GT_Cover_SteamRegulator; +import gregtech.common.covers.GT_Cover_SteamValve; +import gregtech.common.items.behaviors.Behaviour_Arrow_Potion; +import gregtech.common.items.behaviors.Behaviour_Cover_Tool; +import gregtech.common.items.behaviors.Behaviour_DataOrb; +import gregtech.common.items.behaviors.Behaviour_DataStick; +import gregtech.common.items.behaviors.Behaviour_Lighter; +import gregtech.common.items.behaviors.Behaviour_PrintedPages; +import gregtech.common.items.behaviors.Behaviour_Scanner; +import gregtech.common.items.behaviors.Behaviour_SensorKit; +import gregtech.common.items.behaviors.Behaviour_Sonictron; +import gregtech.common.items.behaviors.Behaviour_Spray_Color; +import gregtech.common.items.behaviors.Behaviour_WrittenBook; public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { @@ -684,11 +761,6 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); - // GT_ModHandler.addCraftingRecipe(ItemList.Shape_Empty.get(1L, new Object[0]), - // GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.BUFFERED | - // GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hf", "PP", "PP", - // 'P', OrePrefixes.plate.get(Materials.Steel)}); - ItemList.Shape_Mold_Plate.set(addItem(tLastID = 301, "Mold (Plate)", "Mold for making Plates")); ItemList.Shape_Mold_Casing.set(addItem(tLastID = 302, "Mold (Casing)", "Mold for making Item Casings")); ItemList.Shape_Mold_Gear.set(addItem(tLastID = 303, "Mold (Gear)", "Mold for making Gears")); @@ -1349,10 +1421,6 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { ItemList.Ingot_Heavy3 .set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3")); - // GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), - // GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"BhB", "CAS", "B B", 'B', - // OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', - // OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel)}); } ItemList.Ingot_IridiumAlloy.set( addItem( @@ -1362,16 +1430,6 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L))); - // GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[]{"IAI", - // "ADA", "IAI", 'D', GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) - // ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', - // OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); - // GT_ModHandler.addCraftingRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), - // GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"IAI", "ADA", "IAI", 'D', - // GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? - // OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), 'A', - // OrePrefixes.plateAlloy.get("Advanced"), 'I', OrePrefixes.plate.get(Materials.Iridium)}); - ItemList.Paper_Printed_Pages.set( addItem( tLastID = 481, diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java index 5e339b51d5..d652b68714 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java @@ -1,7 +1,12 @@ package gregtech.common.items; import static gregtech.api.enums.Mods.Forestry; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ADVANCED_REDSTONE_RECEIVER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ADVANCED_REDSTONE_TRANSMITTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_WIRELESS_FLUID_DETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_WIRELESS_ITEM_DETECTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_WIRELESS_MAINTENANCE_DETECTOR; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCompressorRecipes; import static gregtech.api.util.GT_RecipeBuilder.MINUTES; @@ -23,7 +28,15 @@ import net.minecraft.potion.Potion; import net.minecraft.world.World; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.MaterialsUEVplus; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.TierEU; import gregtech.api.items.GT_MetaGenerated_Item_X32; import gregtech.api.objects.ItemData; import gregtech.api.render.TextureFactory; diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java index 8218195e32..e0fdb1911d 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -3,11 +3,29 @@ package gregtech.common.items; import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UEV; import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UHV; import static gregtech.api.enums.Textures.BlockIcons.SOLARPANEL_UIV; -import static gregtech.client.GT_TooltipHandler.Tier.*; +import static gregtech.client.GT_TooltipHandler.Tier.EV; +import static gregtech.client.GT_TooltipHandler.Tier.HV; +import static gregtech.client.GT_TooltipHandler.Tier.IV; +import static gregtech.client.GT_TooltipHandler.Tier.LV; +import static gregtech.client.GT_TooltipHandler.Tier.LuV; +import static gregtech.client.GT_TooltipHandler.Tier.MAX; +import static gregtech.client.GT_TooltipHandler.Tier.MV; +import static gregtech.client.GT_TooltipHandler.Tier.UEV; +import static gregtech.client.GT_TooltipHandler.Tier.UHV; +import static gregtech.client.GT_TooltipHandler.Tier.UIV; +import static gregtech.client.GT_TooltipHandler.Tier.ULV; +import static gregtech.client.GT_TooltipHandler.Tier.UMV; +import static gregtech.client.GT_TooltipHandler.Tier.UV; +import static gregtech.client.GT_TooltipHandler.Tier.UXV; +import static gregtech.client.GT_TooltipHandler.Tier.ZPM; import static gregtech.client.GT_TooltipHandler.registerTieredTooltip; 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.SubTag; +import gregtech.api.enums.TC_Aspects; import gregtech.api.items.GT_MetaGenerated_Item_X32; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_OreDictUnificator; @@ -28,18 +46,18 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { INSTANCE = this; Object[] o = new Object[0]; - /** + /* * circuit boards tier 1-7: coated circuit board / wood plate + resin Plastic Circuit Board / Plastic + Copper * Foil + Sulfuric Acid phenolic circuit board /carton+glue+chemical bath epoxy circuit board /epoxy plate + * copper foil + sulfuric acid fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil - * + sulfurci acid wetware lifesupport board / fiberglass CB + teflon + + * + sulfuric acid wetware lifesupport board / fiberglass CB + teflon + */ ItemList.Circuit_Board_Wetware .set(addItem(6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); ItemList.Circuit_Board_Plastic.set(addItem(7, "Plastic Circuit Board", "A Good Board", o)); ItemList.Circuit_Board_Bio.set(addItem(8, "Bio Circuit Board", "Bio genetic mutated Board", o)); - /** + /* * electronic components: vacuum tube (glass tube + red alloy cables) basic electronic circuits normal+smd coils * diodes normal+smd transistors normal+smd capacitors normal+smd Glass Fibers */ @@ -142,16 +160,13 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Parts_InductorSMD.get(1L), true); - /** + /* * ICs Lenses made from perfect crystals first instead of plates Monocrystalline silicon ingot * (normal+glowstone+naquadah) EBF, normal silicon no EBF need anymore wafer(normal+glowstone+naquadah) cut mono * silicon ingot in cutting machine - * * Integrated Logic Circuit(8bit DIP) RAM NAND Memory NOR Memory CPU (4 sizes) SoCs(2 sizes, high tier cheap low * tech component) Power IC/High Power IC/Ultra High power - * * nanotube interconnected circuit (H-IC + nanotubes) - * * quantum chips */ ItemList.Circuit_Silicon_Ingot.set(addItem(30, "Monocrystalline Silicon Boule", "Raw Circuit", o)); @@ -229,7 +244,7 @@ public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { ItemList.Circuit_Wafer_Bioware.set(addItem(188, "Living Bio Wafer", "Raw Circuit", o)); ItemList.Circuit_Parts_Chip_Bioware.set(addItem(189, "Living Bio Chip", "Needed for Circuits", o)); - /** + /* * Engraved Crystal Chip Engraved Lapotron Chip Crystal CPU SoCrystal stem cells (disassemble eggs) */ ItemList.Circuit_Chip_CrystalSoC2 diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index 5ea7dadfa6..f7d9bbb236 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -5,12 +5,61 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.ToolDictNames; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import gregtech.common.tools.*; -import gregtech.common.tools.pocket.*; +import gregtech.common.tools.GT_Tool_Axe; +import gregtech.common.tools.GT_Tool_BranchCutter; +import gregtech.common.tools.GT_Tool_ButcheryKnife; +import gregtech.common.tools.GT_Tool_BuzzSaw; +import gregtech.common.tools.GT_Tool_Chainsaw_HV; +import gregtech.common.tools.GT_Tool_Chainsaw_LV; +import gregtech.common.tools.GT_Tool_Chainsaw_MV; +import gregtech.common.tools.GT_Tool_Crowbar; +import gregtech.common.tools.GT_Tool_Drill_HV; +import gregtech.common.tools.GT_Tool_Drill_LV; +import gregtech.common.tools.GT_Tool_Drill_MV; +import gregtech.common.tools.GT_Tool_File; +import gregtech.common.tools.GT_Tool_HardHammer; +import gregtech.common.tools.GT_Tool_Hoe; +import gregtech.common.tools.GT_Tool_JackHammer; +import gregtech.common.tools.GT_Tool_Knife; +import gregtech.common.tools.GT_Tool_Mortar; +import gregtech.common.tools.GT_Tool_Pickaxe; +import gregtech.common.tools.GT_Tool_Plow; +import gregtech.common.tools.GT_Tool_Plunger; +import gregtech.common.tools.GT_Tool_RollingPin; +import gregtech.common.tools.GT_Tool_Saw; +import gregtech.common.tools.GT_Tool_Scoop; +import gregtech.common.tools.GT_Tool_Screwdriver; +import gregtech.common.tools.GT_Tool_Screwdriver_LV; +import gregtech.common.tools.GT_Tool_Sense; +import gregtech.common.tools.GT_Tool_Shovel; +import gregtech.common.tools.GT_Tool_SoftHammer; +import gregtech.common.tools.GT_Tool_Soldering_Iron; +import gregtech.common.tools.GT_Tool_Sword; +import gregtech.common.tools.GT_Tool_Turbine_Huge; +import gregtech.common.tools.GT_Tool_Turbine_Large; +import gregtech.common.tools.GT_Tool_Turbine_Normal; +import gregtech.common.tools.GT_Tool_Turbine_Small; +import gregtech.common.tools.GT_Tool_UniversalSpade; +import gregtech.common.tools.GT_Tool_WireCutter; +import gregtech.common.tools.GT_Tool_Wrench; +import gregtech.common.tools.GT_Tool_Wrench_HV; +import gregtech.common.tools.GT_Tool_Wrench_LV; +import gregtech.common.tools.GT_Tool_Wrench_MV; +import gregtech.common.tools.pocket.GT_Tool_Pocket_BranchCutter; +import gregtech.common.tools.pocket.GT_Tool_Pocket_File; +import gregtech.common.tools.pocket.GT_Tool_Pocket_Knife; +import gregtech.common.tools.pocket.GT_Tool_Pocket_Multitool; +import gregtech.common.tools.pocket.GT_Tool_Pocket_Saw; +import gregtech.common.tools.pocket.GT_Tool_Pocket_Screwdriver; +import gregtech.common.tools.pocket.GT_Tool_Pocket_WireCutter; public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index ac2eba776c..024b089812 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -19,7 +19,12 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; import gregtech.api.items.GT_Generic_Item; import gregtech.api.util.GT_LanguageManager; -import shedar.mods.ic2.nuclearcontrol.api.*; +import shedar.mods.ic2.nuclearcontrol.api.CardState; +import shedar.mods.ic2.nuclearcontrol.api.ICardWrapper; +import shedar.mods.ic2.nuclearcontrol.api.IPanelDataSource; +import shedar.mods.ic2.nuclearcontrol.api.IRemoteSensor; +import shedar.mods.ic2.nuclearcontrol.api.PanelSetting; +import shedar.mods.ic2.nuclearcontrol.api.PanelString; public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor, IPanelDataSource { diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index 9a8adb5cab..791bc336ff 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -1556,12 +1556,13 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { addFluidExtractorProcess(CombType.FLUORINE, Materials.Fluorine.getGas(250), Voltage.MV); addFluidExtractorProcess(CombType.OXYGEN, Materials.Oxygen.getGas(500), Voltage.MV); // Organic part 2, unknown liquid - // yes, unknowwater. Its not my typo, its how it is spelled. Stupid game. + // yes, unknowwater. It's not a typo, it's how it is spelled. Stupid game. addFluidExtractorProcess(CombType.UNKNOWNWATER, FluidRegistry.getFluidStack("unknowwater", 250), Voltage.ZPM); - /** + /* + * TODO: update this comment * The Centrifuge Recipes for Infused Shards and Nether/End-Shard from the Infused Shard Line are below the - * NobleGas Lines for Xenon and co. in Gt_MachineRecipeLoader.java In Lines 1525 - **/ + * NobleGas Lines for Xenon and co. in GT_MachineRecipeLoader.java In Lines 1525 + */ } /** @@ -1845,19 +1846,19 @@ public class ItemComb extends Item implements IGT_ItemWithMaterialRenderer { int fluidAmount = this.getFluidAmount(); return switch (this.getVoltageFromEU()) { case 0 -> - /** ULV **/ + /* ULV */ Materials.Water.getFluid(fluidAmount); case 1 -> - /** LV **/ + /* LV */ Materials.SulfuricAcid.getFluid(fluidAmount); case 2 -> - /** MV **/ + /* MV */ Materials.HydrochloricAcid.getFluid(fluidAmount); case 3 -> - /** HV **/ + /* HV */ Materials.PhosphoricAcid.getFluid(fluidAmount); case 4 -> - /** EV **/ + /* EV */ Materials.HydrofluoricAcid.getFluid(this.getFluidAmount()); default -> Materials.PhthalicAcid.getFluid(fluidAmount); }; diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java index 305993c0d0..bb37e1e933 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Cover_Tool.java @@ -18,7 +18,10 @@ import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.*; +import gregtech.api.util.GT_CoverBehaviorBase; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.ISerializableObject; public class Behaviour_Cover_Tool extends Behaviour_None { diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java index 8893245639..ae0627446c 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataOrb.java @@ -67,7 +67,7 @@ public class Behaviour_DataOrb extends Behaviour_None { for (int i = 0; i < tNBT_ItemList.tagCount(); i++) { NBTTagCompound tag = tNBT_ItemList.getCompoundTagAt(i); byte slot = tag.getByte("Slot"); - if ((slot >= 0) && (slot < tInventory.length)) { + if (slot >= 0) { tInventory[slot] = GT_Utility.loadItem(tag); } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java index 13e6622b47..e9db3195c2 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_DataStick.java @@ -38,15 +38,9 @@ public class Behaviour_DataStick extends Behaviour_None { aList.add("Rocket Schematic Tier: " + sTier); } else if (sTier >= 100) { switch (sTier) { - case 100 -> { - aList.add("Moonbuggy Schematic"); - } - case 101 -> { - aList.add("Cargo-Rocket Schematic"); - } - case 102 -> { - aList.add("Astro-Miner Schematic"); - } + case 100 -> aList.add("Moonbuggy Schematic"); + case 101 -> aList.add("Cargo-Rocket Schematic"); + case 102 -> aList.add("Astro-Miner Schematic"); } } long lastUpdate = GT_Utility.ItemNBT.getNBT(aStack) diff --git a/src/main/java/gregtech/common/misc/GT_Command.java b/src/main/java/gregtech/common/misc/GT_Command.java index 11019e3723..3d3b2eb39e 100644 --- a/src/main/java/gregtech/common/misc/GT_Command.java +++ b/src/main/java/gregtech/common/misc/GT_Command.java @@ -2,7 +2,8 @@ package gregtech.common.misc; import java.lang.reflect.Field; import java.math.BigInteger; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import java.util.stream.Stream; import net.minecraft.command.CommandBase; diff --git a/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java b/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java index 63cf6cfa60..dc87c3f520 100644 --- a/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java +++ b/src/main/java/gregtech/common/misc/GlobalEnergyWorldSavedData.java @@ -1,8 +1,15 @@ package gregtech.common.misc; -import static gregtech.common.misc.GlobalVariableStorage.*; - -import java.io.*; +import static gregtech.common.misc.GlobalVariableStorage.GlobalEnergy; +import static gregtech.common.misc.GlobalVariableStorage.GlobalEnergyName; +import static gregtech.common.misc.GlobalVariableStorage.GlobalEnergyTeam; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.math.BigInteger; import java.util.HashMap; diff --git a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java index 4370e5f919..4b0be2051a 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java @@ -2,7 +2,20 @@ package gregtech.common.misc.spaceprojects; import static gregtech.common.misc.spaceprojects.SpaceProjectManager.spaceTeamProjects; import static gregtech.common.misc.spaceprojects.SpaceProjectManager.spaceTeams; -import static gregtech.common.misc.spaceprojects.enums.JsonVariables.*; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.MAP_MAP; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.MAP_PAIR; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.MAP_PROJECT; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.MAP_UUID; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PAIR_LEFT; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PAIR_RIGHT; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PROJECT_CURRENT_STAGE; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PROJECT_CURRENT_UPGRADE; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PROJECT_LOCATION; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PROJECT_NAME; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.PROJECT_UPGRADES_BUILT; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.UPGRADE_CURRENT_STAGE; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.UPGRADE_NAME; +import static gregtech.common.misc.spaceprojects.enums.JsonVariables.UPGRADE_PROJECT_PARENT; import java.io.File; import java.io.FileReader; diff --git a/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java b/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java index 9fc3bd955b..835a57f277 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/base/SP_Upgrade.java @@ -334,7 +334,7 @@ public class SP_Upgrade implements ISP_Upgrade { @Override public SP_Upgrade copy() { - SP_Upgrade copy = new SP_Upgrade().setUpgradeName(name) + return new SP_Upgrade().setUpgradeName(name) .setUpgradeUnlocalizedName(unlocalizedName) .setUpgradeBuildTime(buildTime) .setUpgradeFluidsCost(fluidsCost) @@ -342,7 +342,6 @@ public class SP_Upgrade implements ISP_Upgrade { .setUpgradeRequirements(requirements) .setUpgradeTotalStages(totalStages) .setUpgradeVoltage(voltage); - return copy; } @Override diff --git a/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java b/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java index 6009f77d0c..896c7e1052 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/commands/SPM_Command.java @@ -145,7 +145,7 @@ public class SPM_Command extends CommandBase { switch (arguments.length) { case 1 -> autoComplete.addAll(Arrays.asList(getSubCommands())); case 2 -> { - filter = arguments.length == 1 ? "" : arguments[1].trim(); + filter = arguments[1].trim(); if (arguments[0].equals(LIST)) { autoComplete.addAll(Arrays.asList(getListArguments())); } else if (arguments[0].equals(COPY) || arguments[0].equals(RESET)) { @@ -155,7 +155,7 @@ public class SPM_Command extends CommandBase { } } case 3 -> { - filter = arguments.length == 2 ? "" : arguments[2].trim(); + filter = arguments[2].trim(); if (arguments[1].equals(ALL)) {} else if (arguments[0].equals(LIST)) { autoComplete.addAll(Arrays.asList(getPlayers())); } else { @@ -163,7 +163,7 @@ public class SPM_Command extends CommandBase { } } case 4 -> { - filter = arguments.length == 3 ? "" : arguments[3].trim(); + filter = arguments[3].trim(); if (arguments[0].equals(UNLOCK_UPGRADE)) { ISpaceProject project = SpaceProjectManager.getProject(arguments[2]); if (project != null) { diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java index 5d94add40d..70dee3269d 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java @@ -1,8 +1,15 @@ package gregtech.common.misc.spaceprojects.enums; import static gregtech.api.enums.Mods.GregTech; -import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.*; -import static gregtech.common.misc.spaceprojects.enums.StarType.*; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.AsteroidBelt; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.DwarfPlanet; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.GasGiant; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.IceGiant; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.NaturalSatellite; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.Planet; +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.Star; +import static gregtech.common.misc.spaceprojects.enums.StarType.GClass; +import static gregtech.common.misc.spaceprojects.enums.StarType.NotAStar; import com.gtnewhorizons.modularui.api.drawable.UITexture; diff --git a/src/main/java/gregtech/common/misc/spaceprojects/interfaces/ISpaceProject.java b/src/main/java/gregtech/common/misc/spaceprojects/interfaces/ISpaceProject.java index 369c7c8c7a..51ae03ff30 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/interfaces/ISpaceProject.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/interfaces/ISpaceProject.java @@ -76,7 +76,7 @@ public interface ISpaceProject { Map<String, ISP_Upgrade> getUpgradesBuiltMap(); /** - * @return + * @return all built upgrades */ Collection<ISP_Upgrade> getAllBuiltUpgrades(); @@ -374,7 +374,7 @@ public interface ISpaceProject { /** * Sets the current stage of the upgrade * - * @param stage + * @param stage the stage to set */ void setUpgradeCurrentStage(int stage); diff --git a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java index 8663758535..c54d0be060 100644 --- a/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java +++ b/src/main/java/gregtech/common/redstonecircuits/GT_Circuit_Pulser.java @@ -34,17 +34,16 @@ public class GT_Circuit_Pulser extends GT_CircuitryBehavior { @Override public void onTick(int[] aCircuitData, IRedstoneCircuitBlock aRedstoneCircuitBlock) { - byte tRedstone = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) + byte redstoneSignal = aCircuitData[1] == 0 ? getWeakestNonZeroRedstone(aRedstoneCircuitBlock) : getStrongestRedstone(aRedstoneCircuitBlock); if (aCircuitData[4] == 0) { - aCircuitData[5] = tRedstone; + aCircuitData[5] = redstoneSignal; } - if ((tRedstone > 0) || (aCircuitData[4] > 0)) { - int tmp40_39 = 4; - int[] tmp40_38 = aCircuitData; - int tmp42_41 = tmp40_38[tmp40_39]; - tmp40_38[tmp40_39] = (tmp42_41 + 1); - if ((tmp42_41 >= aCircuitData[0]) && (tRedstone <= 0)) { + if ((redstoneSignal > 0) || (aCircuitData[4] > 0)) { + int index = 4; + int tmp42_41 = aCircuitData[index]; + aCircuitData[index] = (tmp42_41 + 1); + if ((tmp42_41 >= aCircuitData[0]) && (redstoneSignal <= 0)) { aCircuitData[4] = 0; } } diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java index cf52641962..2c0eb91068 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Tool_Renderer.java @@ -171,36 +171,12 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (tIcon != null) { Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { - GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); - } else { - ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); - } + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } if (tOverlay != null) { Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { - GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); - } else { - ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); - } + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } } } @@ -226,36 +202,12 @@ public class GT_MetaGenerated_Tool_Renderer implements IItemRenderer { if (tIcon != null) { Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { - GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); - } else { - ItemRenderer.renderItemIn2D( - Tessellator.instance, - tIcon.getMaxU(), - tIcon.getMinV(), - tIcon.getMinU(), - tIcon.getMaxV(), - tIcon.getIconWidth(), - tIcon.getIconHeight(), - 0.0625F); - } + GT_RenderUtil.renderItemIcon(tIcon, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } if (tOverlay != null) { Minecraft.getMinecraft().renderEngine.bindTexture(aIcon.getTextureFile()); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - if (aType.equals(IItemRenderer.ItemRenderType.INVENTORY)) { - GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); - } else { - ItemRenderer.renderItemIn2D( - Tessellator.instance, - tOverlay.getMaxU(), - tOverlay.getMinV(), - tOverlay.getMinU(), - tOverlay.getMaxV(), - tOverlay.getIconWidth(), - tOverlay.getIconHeight(), - 0.0625F); - } + GT_RenderUtil.renderItemIcon(tOverlay, 16.0D, 0.001D, 0.0F, 0.0F, -1.0F); } } } diff --git a/src/main/java/gregtech/common/render/GT_RenderUtil.java b/src/main/java/gregtech/common/render/GT_RenderUtil.java index e98f573b94..533380fe53 100644 --- a/src/main/java/gregtech/common/render/GT_RenderUtil.java +++ b/src/main/java/gregtech/common/render/GT_RenderUtil.java @@ -26,24 +26,12 @@ public class GT_RenderUtil { public static void renderBlockIcon(RenderBlocks aRenderer, Block aBlock, double aX, double aY, double aZ, IIcon aIcon, ForgeDirection side) { switch (side) { - case DOWN -> { - aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); - } - case UP -> { - aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); - } - case NORTH -> { - aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); - } - case SOUTH -> { - aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); - } - case WEST -> { - aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); - } - case EAST -> { - aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); - } + case DOWN -> aRenderer.renderFaceYNeg(aBlock, aX, aY, aZ, aIcon); + case UP -> aRenderer.renderFaceYPos(aBlock, aX, aY, aZ, aIcon); + case NORTH -> aRenderer.renderFaceZNeg(aBlock, aX, aY, aZ, aIcon); + case SOUTH -> aRenderer.renderFaceZPos(aBlock, aX, aY, aZ, aIcon); + case WEST -> aRenderer.renderFaceXNeg(aBlock, aX, aY, aZ, aIcon); + case EAST -> aRenderer.renderFaceXPos(aBlock, aX, aY, aZ, aIcon); } } diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java index 9c65a50f20..e6a0ed750b 100644 --- a/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_GeneratedItem_Renderer.java @@ -1,7 +1,14 @@ package gregtech.common.render.items; -import static gregtech.api.enums.ItemList.*; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Aluminium; import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Chrome; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Iridium; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Neutronium; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Osmium; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_StainlessSteel; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Steel; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_Titanium; +import static gregtech.api.enums.ItemList.Large_Fluid_Cell_TungstenSteel; import javax.annotation.Nullable; diff --git a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java index 8a81dfc2f4..727064d3ea 100644 --- a/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java +++ b/src/main/java/gregtech/common/render/items/GT_GeneratedMaterial_Renderer.java @@ -36,7 +36,7 @@ public class GT_GeneratedMaterial_Renderer implements IItemRenderer { * Handle special fluid display rendering. Return false if does not need such kind of handling. Note: annotations * should not be rendered here. Only render the fluid texture. Parameters are values passed from * {@link IItemRenderer#renderItem(ItemRenderType, ItemStack, Object...)} verbatim. Do not modify the argument. - * + * <p> * While this is called, BLEND and ALPHA_TEST is on. It is expected that these remain enabled while exit. * * @return true if did special fluid display rendering. false otherwise. diff --git a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java index 97f5096948..58a238ac07 100644 --- a/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java +++ b/src/main/java/gregtech/common/render/items/GaiaSpiritRenderer.java @@ -1,6 +1,6 @@ package gregtech.common.render.items; -import java.awt.*; +import java.awt.Color; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.Tessellator; diff --git a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java index 37724a9020..1f9cfcb78c 100644 --- a/src/main/java/gregtech/common/render/items/UniversiumRenderer.java +++ b/src/main/java/gregtech/common/render/items/UniversiumRenderer.java @@ -21,6 +21,7 @@ import gregtech.api.enums.ItemList; import gregtech.api.interfaces.IGT_ItemWithMaterialRenderer; import singulariteam.eternalsingularity.render.CosmicRenderStuffs; +@SuppressWarnings("RedundantLabeledSwitchRuleCodeBlock") public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { private static final float cosmicOpacity = 2.5f; @@ -238,7 +239,6 @@ public class UniversiumRenderer extends GT_GeneratedMaterial_Renderer { } case INVENTORY -> { CosmicRenderStuffs.setLightLevel(10.2f); - return; } default -> { CosmicRenderStuffs.setLightLevel(1.0f); diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 89b48cd6a1..d136ec9e71 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -41,7 +41,7 @@ public class GT_MetaTileEntity_Boiler_Solar extends GT_MetaTileEntity_Boiler { + "Calcifies over time, reducing Steam output to %sL/s%n" + "Break and replace to descale"); protected final Config mConfig; - protected int basicTemperatureMod = 5; // Base Celsius gain or loss + protected final int basicTemperatureMod = 5; // Base Celsius gain or loss private int mRunTimeTicks = 0; public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) { diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java index df7028c232..1132a0d53e 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java @@ -1,6 +1,26 @@ package gregtech.common.tileentities.generators; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BACK; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BACK_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_SIDE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_TOP; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.DIESEL_GENERATOR_TOP_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.block.Block; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java index f1f366052c..771dc36788 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java @@ -1,6 +1,26 @@ package gregtech.common.tileentities.generators; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BACK; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BACK_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BACK_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BOTTOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_BOTTOM_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_SIDE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_TOP; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_TOP_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.GAS_TURBINE_TOP_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java index feba20b3b1..fe6b334260 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java @@ -3,7 +3,17 @@ package gregtech.common.tileentities.generators; import static gregtech.api.enums.ConfigCategories.machineconfig; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.Mods.Thaumcraft; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_DRAGONEGG; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_DRAGONEGG_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASING_MAGIC_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import static net.minecraft.util.EnumChatFormatting.GRAY; import static net.minecraft.util.EnumChatFormatting.GREEN; diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java index c4075ca9b2..babb4925bb 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_NaquadahReactor.java @@ -1,6 +1,25 @@ package gregtech.common.tileentities.generators; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_GLOW; import net.minecraftforge.common.util.ForgeDirection; @@ -51,24 +70,12 @@ public class GT_MetaTileEntity_NaquadahReactor extends GT_MetaTileEntity_BasicGe public GT_Recipe.GT_Recipe_Map getRecipes() { GT_Recipe.GT_Recipe_Map ret; switch (mTier) { - case 4 -> { - ret = GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels; - } - case 5 -> { - ret = GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels; - } - case 6 -> { - ret = GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels; - } - case 7 -> { - ret = GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels; - } - case 8 -> { - ret = GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels; - } - default -> { - ret = null; - } + case 4 -> ret = GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels; + case 5 -> ret = GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels; + case 6 -> ret = GT_Recipe.GT_Recipe_Map.sHugeNaquadahReactorFuels; + case 7 -> ret = GT_Recipe.GT_Recipe_Map.sExtremeNaquadahReactorFuels; + case 8 -> ret = GT_Recipe.GT_Recipe_Map.sUltraHugeNaquadahReactorFuels; + default -> ret = null; } return ret; } diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index 28962b69a0..bfc4529ffe 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -1,6 +1,26 @@ package gregtech.common.tileentities.generators; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAYS_ENERGY_OUT; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BACK; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BACK_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BACK_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BOTTOM; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BOTTOM_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_BOTTOM_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_FRONT; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_FRONT_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_SIDE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_SIDE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_TOP; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_TOP_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.STEAM_TURBINE_TOP_GLOW; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java index 5fed27a86c..a362044695 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_InputBus_ME.java @@ -26,7 +26,12 @@ import com.gtnewhorizons.modularui.api.math.Color; import com.gtnewhorizons.modularui.api.math.Size; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; -import com.gtnewhorizons.modularui.common.widget.*; +import com.gtnewhorizons.modularui.common.widget.ButtonWidget; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; +import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; +import com.gtnewhorizons.modularui.common.widget.SlotGroup; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; +import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget; import appeng.api.config.Actionable; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java index 0a58dbf1b6..1aad12a936 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_OutputBus_ME.java @@ -47,7 +47,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus_ME extends GT_MetaTileEntity_Hatc private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; - IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance() + final IItemList<IAEItemStack> itemCache = GregTech_API.mAE2 ? AEApi.instance() .storage() .createItemList() : null; long lastOutputTick = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java index cc4911425b..080796a2fd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java +++ b/src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_Hatch_Output_ME.java @@ -51,7 +51,7 @@ public class GT_MetaTileEntity_Hatch_Output_ME extends GT_MetaTileEntity_Hatch_O private BaseActionSource requestSource = null; private AENetworkProxy gridProxy = null; - IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance() + final IItemList<IAEFluidStack> fluidCache = GregTech_API.mAE2 ? AEApi.instance() .storage() .createFluidList() : null; long lastOutputTick = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 089713f01a..e5948fdae8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_GLOW; import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation; import java.util.ArrayList; @@ -36,8 +51,8 @@ import ic2.core.Ic2Items; public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_BasicMachine { boolean ready = false; - int radius; - int step; + final int radius; + final int step; int cX; int cZ; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java index fdadb44a23..bc6e87c53b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_BOXINATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_GLOW; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index 974036625b..d4a32e13b8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -2,7 +2,22 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.AuthorKuba; import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_INDUSTRIAL_APIARY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_INDUSTRIAL_APIARY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_INDUSTRIAL_APIARY_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_INDUSTRIAL_APIARY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_INDUSTRIAL_APIARY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_INDUSTRIAL_APIARY_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_INDUSTRIAL_APIARY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_INDUSTRIAL_APIARY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_INDUSTRIAL_APIARY_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_INDUSTRIAL_APIARY; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_INDUSTRIAL_APIARY_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_INDUSTRIAL_APIARY_GLOW; import static gregtech.api.metatileentity.BaseTileEntity.STALLED_STUTTERING_TOOLTIP; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; import static gregtech.api.util.GT_Utility.moveMultipleItemStacks; @@ -11,7 +26,12 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.lang.reflect.Field; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; import net.minecraft.block.Block; @@ -51,9 +71,30 @@ import com.mojang.authlib.GameProfile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import forestry.api.apiculture.*; +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.apiculture.EnumBeeType; +import forestry.api.apiculture.FlowerManager; +import forestry.api.apiculture.IAlleleBeeAcceleratableEffect; +import forestry.api.apiculture.IAlleleBeeEffect; +import forestry.api.apiculture.IAlleleBeeSpecies; +import forestry.api.apiculture.IApiaristTracker; +import forestry.api.apiculture.IBee; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.apiculture.IBeeHousingInventory; +import forestry.api.apiculture.IBeeListener; +import forestry.api.apiculture.IBeeModifier; +import forestry.api.apiculture.IBeeRoot; +import forestry.api.apiculture.IBeekeepingLogic; +import forestry.api.apiculture.IBeekeepingMode; import forestry.api.arboriculture.EnumGermlingType; -import forestry.api.core.*; +import forestry.api.core.BiomeHelper; +import forestry.api.core.EnumHumidity; +import forestry.api.core.EnumTemperature; +import forestry.api.core.ForestryAPI; +import forestry.api.core.IErrorLogic; +import forestry.api.core.IErrorState; import forestry.api.genetics.AlleleManager; import forestry.api.genetics.IEffectData; import forestry.api.genetics.IIndividual; @@ -84,7 +125,7 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM static final int drone = 6; private static Field AlleleBeeEffectThrottledField; - IBeeRoot beeRoot = (IBeeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootBees"); + final IBeeRoot beeRoot = (IBeeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootBees"); public int mSpeed = 0; public boolean mLockedSpeed = true; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 9416391fc5..87d84f7ca7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -1,7 +1,22 @@ package gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MASSFAB; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_MASSFAB; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_MASSFAB; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_MASSFAB_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_MASSFAB_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_MASSFAB_GLOW; import java.util.Arrays; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java index 0327b5f7f5..7ec1a0bfbe 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_GLOW; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index 1d9b6f61e1..295cb01ead 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_REPLICATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_REPLICATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_REPLICATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_REPLICATOR_GLOW; import java.util.HashMap; import java.util.NoSuchElementException; @@ -31,12 +46,13 @@ public class GT_MetaTileEntity_Replicator extends GT_MetaTileEntity_BasicMachine private static int sHeaviestElementMass = 0; static { - // put overrides here - // ex. - // MASS_OVERRIDES.put(Materials.get("cake"),Materials.get("cake").getMass()); - // MASS_OVERRIDES.put(Materials.get("otherCake"),1235234L); - // MASS_OVERRIDES.put(Materials.Kalendrite,1235234L); - // MASS_OVERRIDES.put(Materials.Kalendrite,Materials.Kalendrite.getMass()*2); + /* + * Put overrides here. For instance: + * MASS_OVERRIDES.put(Materials.get("cake"),Materials.get("cake").getMass()); + * MASS_OVERRIDES.put(Materials.get("otherCake"),1235234L); + * MASS_OVERRIDES.put(Materials.Kalendrite,1235234L); + * MASS_OVERRIDES.put(Materials.Kalendrite,Materials.Kalendrite.getMass()*2); + */ } public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java index 751ab7f57d..3e6d3065f0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_GLOW; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index 508b9b07b4..0882276aa5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -1,9 +1,24 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.GT_Values.*; +import static gregtech.api.enums.GT_Values.D1; import static gregtech.api.enums.Mods.GalacticraftCore; import static gregtech.api.enums.Mods.GalacticraftMars; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_SCANNER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_SCANNER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_SCANNER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_SCANNER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_SCANNER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_SCANNER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_SCANNER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_SCANNER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_SCANNER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_SCANNER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_SCANNER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_SCANNER_GLOW; import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes; import java.util.Objects; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index 02a2c2da99..a4d4077796 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.basic; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_GLOW; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index a0d56a683a..0e682a8dae 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -74,9 +74,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank public int mTargetX = 0; public int mTargetY = 0; public int mTargetZ = 0; - public int mTargetD = Integer.MIN_VALUE; // 0 + public int mTargetD = Integer.MIN_VALUE; public boolean mDebug = false; - // public boolean hasEgg = false; public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) { super( @@ -97,12 +96,10 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank super(aName, aTier, 3, aDescription, aTextures); } - private static float weightCalculation(Entity aEntity) { - try { - if ((aEntity instanceof EntityFX)) { - return -1.0F; - } - } catch (Throwable e) {} + private static float calculateWeight(Entity aEntity) { + if ((aEntity instanceof EntityFX)) { + return -1.0F; + } if ((aEntity instanceof EntityFishHook)) { return -1.0F; } @@ -180,7 +177,6 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank @Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { if (aBaseMetaTileEntity.isClientSide()) return true; - // this.hasEgg = checkForEgg(); GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); return true; } @@ -273,33 +269,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank this.mTargetZ = aBaseMetaTileEntity.getZCoord(); this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId; } - // this.hasEgg = checkForEgg(); } } - // public boolean checkForEgg() { - // for (byte i = -5; i <= 5; i = (byte) (i + 1)) { - // for (byte j = -5; j <= 5; j = (byte) (j + 1)) { - // for (byte k = -5; k <= 5; k = (byte) (k + 1)) { - // if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) { - // return true; - // } - // } - // } - // } - // return false; - // } - public boolean hasDimensionalTeleportCapability() { - return this.mDebug || - // ( - sInterDimensionalTeleportAllowed // && - // ( - // this.hasEgg || - // mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000 - // ) - // ) - ; + return this.mDebug || sInterDimensionalTeleportAllowed; } public boolean isDimensionalTeleportAvailable() { @@ -363,9 +337,8 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank for (Object tObject : entities_in_box) { if (((tObject instanceof Entity tEntity)) && (!((Entity) tObject).isDead)) { - // GT_FML_LOGGER.info("teleport"+(Math.pow(tDistance, 1.5))); if (getBaseMetaTileEntity().decreaseStoredEnergyUnits( - (long) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), + (long) (Math.pow(tDistance, 1.5) * calculateWeight(tEntity) * sFPowerMultiplyer), false)) { if (tEntity.ridingEntity != null) { 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; diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java index 35e006b9be..e9db6c2256 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java @@ -1,13 +1,18 @@ package gregtech.common.tileentities.machines.multiblock; import static com.google.common.primitives.Ints.saturatedCast; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ENERGY_IN; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_IN; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.FLUID_OUT; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_IN; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.ITEM_OUT; +import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.NOTHING; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import java.util.stream.Collectors; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -271,8 +276,7 @@ public class AdvChemicalReactor extends ComplexParallelController<AdvChemicalRea .filter( itemStack -> processWhitelists.get(outputIndex) .contains(getWhitelistString(itemStack))) - .collect(Collectors.toList()) - .toArray(new ItemStack[0])); + .toArray(ItemStack[]::new)); } // Output remaining items if (processingLogic.getOutputItems(index) != null && processingLogic.getOutputItems(index).length > 0) { @@ -298,8 +302,7 @@ public class AdvChemicalReactor extends ComplexParallelController<AdvChemicalRea .filter( fluidStack -> processWhitelists.get(outputIndex) .contains(getWhitelistString(fluidStack))) - .collect(Collectors.toList()) - .toArray(new FluidStack[0])); + .toArray(FluidStack[]::new)); } // Output remaining fluids if (processingLogic.getOutputFluids(index) != null && processingLogic.getOutputFluids(index).length > 0) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java index db06a65139..13f60da821 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/CokeOven.java @@ -127,12 +127,10 @@ public class CokeOven extends Controller<CokeOven> implements PollutionLogicHost int titleWidth = 0, titleHeight = 0; if (NetworkUtils.isClient()) { final FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer; - // noinspection unchecked final List<String> titleLines = fontRenderer .listFormattedStringToWidth(title, getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2); titleWidth = titleLines.size() > 1 ? getGUIWidth() - (TAB_PADDING + TITLE_PADDING) * 2 : fontRenderer.getStringWidth(title); - // noinspection PointlessArithmeticExpression titleHeight = titleLines.size() * fontRenderer.FONT_HEIGHT + (titleLines.size() - 1); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java index c2209cbe27..4a84c1503f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java +++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/logic/CokeOvenProcessingLogic.java @@ -35,7 +35,7 @@ public class CokeOvenProcessingLogic extends ProcessingLogic { return false; } input.stackSize -= 1; - setDuration(NORMAL_RECIPE_TIME * timeMultiplier); + setDuration((long) NORMAL_RECIPE_TIME * timeMultiplier); setOutputItems(output); return originalStackSize > input.stackSize; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java index 8da0679a0c..4e2de30c82 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java index 462d184c19..754c6fe773 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_ALLOY_SMELTER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_ALLOY_SMELTER_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index 016e6ec2d4..b6bba6e153 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index bf98ddb1ae..7b0e725bb1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_COMPRESSOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_COMPRESSOR_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index b1d1734d67..4a4a9d5a0a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index 96d4961364..b877491f24 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_EXTRACTOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_EXTRACTOR_GLOW; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java index 42010f8073..c7f47f92c4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_GLOW; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.block.Block; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java index ad0296b14a..4ab1e517cb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_HAMMER_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_HAMMER_GLOW; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.block.Block; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java index 143de92ff4..a5328a5e85 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java @@ -1,6 +1,20 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_GLOW; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java index 662a28a6e6..ddde300d99 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java @@ -1,6 +1,20 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_FURNACE_GLOW; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index cb27b33882..cd70e0cbd9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_GLOW; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 7d1f264561..a2fe809077 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -1,6 +1,21 @@ package gregtech.common.tileentities.machines.steam; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_GLOW; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java index f5f4d15be8..7d1d49ee02 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java @@ -174,7 +174,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @SuppressWarnings("unchecked") @Override - public IItemList<IAEItemStack> getAvailableItems(@SuppressWarnings("rawtypes") final IItemList out) { + public IItemList<IAEItemStack> getAvailableItems(final IItemList out) { ItemStack storedStack = getItemStack(); if (storedStack != null) { AEItemStack s = AEItemStack.create(storedStack); diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java index a6fdb1a0cd..7beae18d74 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java @@ -1,6 +1,9 @@ package gregtech.common.tileentities.storage; -import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_QTANK_GLOW; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; import java.util.List; |
