From bde05cbe2d7ffa95a7dce10dc309788c5b0cbc72 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Mon, 9 Dec 2019 18:37:46 +0100 Subject: Updated Copyright +fixed or suppressed all warnings Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Former-commit-id: 72b19b4f3b8c4c2151559f06dc7455a045d7f28b --- .../com/github/bartimaeusnek/ASM/ASMUtils.java | 12 ++--- .../java/com/github/bartimaeusnek/ASM/BWCore.java | 3 +- .../com/github/bartimaeusnek/ASM/BWCorePlugin.java | 3 +- .../ASM/BWCoreStaticReplacementMethodes.java | 2 +- .../bartimaeusnek/ASM/BWCoreTransformer.java | 24 ++++------ .../bartimaeusnek/bartworks/API/API_REFERENCE.java | 2 +- .../bartworks/API/AcidGenFuelAdder.java | 2 +- .../bartworks/API/BioObjectAdder.java | 6 +-- .../bartworks/API/BioObjectGetter.java | 3 +- .../bartworks/API/BioRecipeAdder.java | 3 +- .../bartworks/API/BioVatLogicAdder.java | 8 ++-- .../bartimaeusnek/bartworks/API/INoiseGen.java | 2 +- .../bartimaeusnek/bartworks/API/IRadMaterial.java | 2 +- .../bartworks/API/ITileAddsInformation.java | 2 +- .../bartworks/API/ITileDropsContent.java | 4 +- .../API/ITileHasDifferentTextureSides.java | 6 +-- .../bartimaeusnek/bartworks/API/ITileWithGUI.java | 2 +- .../bartimaeusnek/bartworks/API/WerkstoffAPI.java | 3 +- .../bartworks/API/WerkstoffAdderRegistry.java | 6 +-- .../github/bartimaeusnek/bartworks/GuiHandler.java | 2 +- .../github/bartimaeusnek/bartworks/MainMod.java | 5 +- .../client/ClientEventHandler/TooltipCache.java | 6 +-- .../ClientEventHandler/TooltipEventHandler.java | 2 +- .../bartworks/client/creativetabs/BioTab.java | 2 +- .../bartworks/client/creativetabs/GT2Tab.java | 2 +- .../client/creativetabs/bartworksTab.java | 2 +- .../gui/BW_GUIContainer_HeatedWaterPump.java | 4 +- .../client/gui/BW_GUIContainer_RadLevel.java | 2 +- .../client/gui/BW_GUIContainer_RotorBlock.java | 2 +- .../client/gui/BW_GUIContainer_Windmill.java | 2 +- .../gui/GT_GUIContainer_CircuitProgrammer.java | 2 +- .../client/gui/GT_GUIContainer_Destructopack.java | 2 +- .../bartworks/client/gui/GT_GUIContainer_LESU.java | 2 +- .../client/gui/GT_GUIContainer_RadioHatch.java | 2 +- .../client/renderer/BW_GT_ItemRenderer.java | 2 +- .../client/renderer/BW_GT_Vanilla_Texture.java | 2 +- .../client/renderer/BW_Renderer_Block_Ores.java | 2 +- .../client/renderer/RendererGlasBlock.java | 2 +- .../renderer/RendererSwitchingColorFluid.java | 52 ++++++++++---------- .../client/textures/PrefixTextureLinker.java | 26 +++++++++- .../bartworks/common/blocks/BW_Blocks.java | 3 +- .../bartworks/common/blocks/BW_GlasBlocks.java | 2 +- .../common/blocks/BW_TileEntityContainer.java | 8 ++-- .../blocks/BW_TileEntityContainer_Multiple.java | 3 +- .../bartworks/common/blocks/BioFluidBlock.java | 2 +- .../bartworks/common/commands/ChangeConfig.java | 6 +-- .../bartworks/common/commands/SummonRuin.java | 2 +- .../bartworks/common/configs/ConfigHandler.java | 2 +- .../bartworks/common/items/BW_ItemBlocks.java | 8 ++-- .../bartworks/common/items/BW_SimpleWindMeter.java | 3 +- .../bartworks/common/items/BW_Stonage_Rotors.java | 3 +- .../bartworks/common/items/Circuit_Programmer.java | 4 +- .../common/items/GT_Destructopack_Item.java | 3 +- .../bartworks/common/items/GT_Rockcutter_Item.java | 9 ++-- .../bartworks/common/items/GT_Teslastaff_Item.java | 10 ++-- .../bartworks/common/items/LabModule.java | 3 +- .../bartworks/common/items/LabParts.java | 13 +++-- .../bartworks/common/items/SimpleIconItem.java | 2 +- .../bartworks/common/items/SimpleSubItemClass.java | 4 +- .../bartworks/common/loaders/BeforeGTPreload.java | 2 +- .../bartworks/common/loaders/BioCultureLoader.java | 2 +- .../bartworks/common/loaders/BioItemList.java | 2 +- .../bartworks/common/loaders/BioLabLoader.java | 2 +- .../bartworks/common/loaders/BioRecipeLoader.java | 3 +- .../bartworks/common/loaders/FluidLoader.java | 2 +- .../bartworks/common/loaders/GTNHBlocks.java | 2 +- .../bartworks/common/loaders/ItemRegistry.java | 2 +- .../bartworks/common/loaders/LoaderRegistry.java | 4 +- .../bartworks/common/loaders/RecipeLoader.java | 3 +- .../bartworks/common/net/BW_Network.java | 3 +- .../common/net/CircuitProgrammerPacket.java | 2 +- .../bartworks/common/net/OreDictCachePacket.java | 4 +- .../bartworks/common/net/OrePacket.java | 2 +- .../bartworks/common/net/RendererPacket.java | 2 +- .../bartworks/common/net/ServerJoinedPackage.java | 2 +- .../classic/BWTileEntityDimIDBridge.java | 2 +- .../common/tileentities/classic/BW_RotorBlock.java | 2 +- .../BW_TileEntity_ExperimentalFloodGate.java | 8 ++-- .../classic/BW_TileEntity_HeatedWaterPump.java | 2 +- .../classic/BW_TileEntity_InfinityTank.java | 25 +++++----- .../common/tileentities/debug/CreativeScanner.java | 2 +- .../tileentities/multis/GT_TileEntity_BioVat.java | 29 +++++------- .../multis/GT_TileEntity_CircuitAssemblyLine.java | 6 +-- .../multis/GT_TileEntity_CrackingDistillTower.java | 4 +- .../tileentities/multis/GT_TileEntity_DEHP.java | 7 +-- .../GT_TileEntity_ElectricImplosionCompressor.java | 5 +- .../tileentities/multis/GT_TileEntity_LESU.java | 12 ++--- .../multis/GT_TileEntity_ManualTrafo.java | 12 ++--- .../tileentities/multis/GT_TileEntity_THTR.java | 2 +- .../multis/GT_TileEntity_Windmill.java | 20 +++----- .../mega/GT_TileEntity_MegaBlastFurnace.java | 42 ++++++++--------- .../mega/GT_TileEntity_MegaDistillTower.java | 22 +++++++++ .../mega/GT_TileEntity_MegaProcessingArray.java | 28 +++++------ .../mega/GT_TileEntity_MegaVacuumFreezer.java | 18 +++---- .../tiered/GT_MetaTileEntity_AcidGenerator.java | 3 +- .../tiered/GT_MetaTileEntity_BioLab.java | 6 ++- .../GT_MetaTileEntity_CompressedFluidHatch.java | 2 +- .../tiered/GT_MetaTileEntity_Diode.java | 2 +- .../GT_MetaTileEntity_EnergyDistributor.java | 3 +- .../tiered/GT_MetaTileEntity_GiantOutputHatch.java | 2 +- .../tiered/GT_MetaTileEntity_RadioHatch.java | 8 ++-- .../tiered/GT_MetaTileEntity_Transistor.java | 2 +- .../bartworks/neiHandler/BW_NEI_BioLabHandler.java | 2 +- .../bartworks/neiHandler/BW_NEI_BioVatHandler.java | 7 +-- .../bartworks/neiHandler/BW_NEI_OreHandler.java | 2 +- .../bartworks/neiHandler/NEI_BW_Config.java | 2 +- .../server/EventHandler/ServerEventHandler.java | 2 +- .../container/BW_Container_HeatedWaterPump.java | 3 +- .../server/container/BW_Container_RadioHatch.java | 3 +- .../container/GT_Container_CircuitProgrammer.java | 2 +- .../container/GT_Container_Item_Destructopack.java | 2 +- .../server/container/GT_Container_LESU.java | 2 +- .../server/container/GT_Container_RadioHatch.java | 3 +- .../server/container/Slots/BW_DelSlot.java | 3 +- .../server/container/Slots/BW_FuelSlot.java | 2 +- .../bartworks/system/log/DebugLog.java | 2 +- .../bartworks/system/log/STFUGTPPLOG.java | 2 +- .../system/material/BW_MetaGeneratedFrames.java | 2 +- .../system/material/BW_MetaGeneratedOreTE.java | 4 +- .../system/material/BW_MetaGeneratedOre_Item.java | 3 +- .../material/BW_MetaGeneratedSmallOreTE.java | 22 +++++++++ .../system/material/BW_MetaGenerated_Items.java | 13 ++--- .../system/material/BW_MetaGenerated_Ores.java | 9 ++-- .../material/BW_MetaGenerated_SmallOres.java | 22 +++++++++ .../system/material/BW_NonMeta_MaterialItems.java | 2 +- .../CircuitGeneration/BW_CircuitsLoader.java | 2 +- .../material/CircuitGeneration/BW_Meta_Items.java | 18 ++++--- .../material/CircuitGeneration/CircuitData.java | 2 +- .../CircuitGeneration/CircuitImprintLoader.java | 4 +- .../CircuitGeneration/CircuitPartLoader.java | 2 +- .../material/GT_Enhancement/BWGTMetaItems.java | 27 ++++++++++- .../GT_Enhancement/GTMetaItemEnhancer.java | 22 +++++++++ .../material/GT_Enhancement/LuVTierEnhancer.java | 3 +- .../GT_Enhancement/PlatinumSludgeOverHaul.java | 13 +++-- .../bartworks/system/material/ThreadedLoader.java | 2 +- .../bartworks/system/material/Werkstoff.java | 2 +- .../bartworks/system/material/WerkstoffLoader.java | 2 +- .../processingLoaders/AdditionalRecipes.java | 10 ++-- .../processingLoaders/AfterLuVTierEnhacement.java | 2 +- .../material/processingLoaders/DownTierLoader.java | 2 +- .../processingLoaders/LoadItemContainers.java | 2 +- .../bartworks/system/oredict/OreDictAdder.java | 3 +- .../bartworks/system/oredict/OreDictHandler.java | 2 +- .../bartworks/system/oregen/BW_OreLayer.java | 2 +- .../bartworks/system/oregen/BW_WordGenerator.java | 2 +- .../system/oregen/BW_WorldGenRoss128b.java | 2 +- .../system/oregen/BW_WorldGenRoss128ba.java | 2 +- .../bartworks/system/worldgen/GT_WorldgenUtil.java | 2 +- .../bartworks/system/worldgen/MapGenRuins.java | 4 +- .../bartimaeusnek/bartworks/util/BWRecipes.java | 10 ++-- .../bartimaeusnek/bartworks/util/BW_ColorUtil.java | 2 +- .../bartimaeusnek/bartworks/util/BW_Util.java | 2 +- .../bartimaeusnek/bartworks/util/BioCulture.java | 2 +- .../bartimaeusnek/bartworks/util/BioDNA.java | 2 +- .../bartimaeusnek/bartworks/util/BioData.java | 5 +- .../bartimaeusnek/bartworks/util/BioPlasmid.java | 2 +- .../bartworks/util/ChatColorHelper.java | 2 +- .../bartworks/util/ConnectedBlocksChecker.java | 4 +- .../util/ConnectedBlocksCheckerIteration.java | 8 ++-- .../bartimaeusnek/bartworks/util/Coords.java | 10 ++-- .../bartworks/util/NEIbartworksConfig.java | 2 +- .../bartworks/util/NoiseUtil/BartsNoise.java | 2 +- .../bartworks/util/NoiseUtil/SimplexNoise.java | 10 ++-- .../github/bartimaeusnek/bartworks/util/Pair.java | 5 +- .../bartimaeusnek/crossmod/BartWorksCrossmod.java | 2 +- .../crossmod/GTpp/loader/RadioHatchCompat.java | 6 +-- .../crossmod/emt/recipe/TCRecipeHandler.java | 3 +- .../multi/GT_Industrial_Alchemic_Construct.java | 3 +- .../crossmod/emt/util/EMTHandler.java | 10 ++-- .../crossmod/galacticraft/GalacticraftProxy.java | 2 +- .../crossmod/galacticraft/PlanetsHelperClass.java | 2 +- .../galacticraft/UniversalTeleportType.java | 2 +- .../atmosphere/BWAtmosphereManager.java | 12 +++-- .../galacticraft/blocks/UniversalSpaceBlocks.java | 2 +- .../galacticraft/creativetabs/SpaceTab.java | 2 +- .../planets/AbstractWorldProviderSpace.java | 2 +- .../planets/ross128b/ChunkProviderRoss128b.java | 3 +- .../planets/ross128b/SkyProviderRoss128b.java | 2 +- .../planets/ross128b/WorldProviderRoss128b.java | 4 +- .../planets/ross128ba/ChunkProviderRoss128ba.java | 2 +- .../planets/ross128ba/WorldProviderRoss128Ba.java | 2 +- .../solarsystems/Ross128SolarSystem.java | 2 +- .../tileEntity/DysonSwarmSunReplacement.java | 22 +++++++++ .../galaxySpace/tileEntity/GalaxySpaceProxy.java | 22 +++++++++ .../crossmod/openComputers/GT_NBT_DataBase.java | 2 +- .../openComputers/TileEntity_GTDataServer.java | 2 +- .../tectech/TT_TileEntity_ManualTrafo.java | 55 +++++++++++++++------- .../crossmod/tectech/TecTechResearchLoader.java | 23 +++++++++ .../crossmod/thaumcraft/CustomAspects.java | 2 +- .../tile/GT_Multi_IndustrialCrucible.java | 2 +- .../crossmod/thaumcraft/tile/GT_WandBuffer.java | 22 ++++----- .../thaumcraft/util/ThaumcraftHandler.java | 3 +- 192 files changed, 699 insertions(+), 462 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java index f4b61a17ba..bdfdb29ca8 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/ASMUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,9 +32,9 @@ import java.io.OutputStream; public class ASMUtils { public static String matchAny(String toCompare, String... args) { - for (int i = 0; i < args.length; i++) { - if (toCompare.equalsIgnoreCase(args[i])) - return args[i]; + for (String arg : args) { + if (toCompare.equalsIgnoreCase(arg)) + return arg; } return ""; } @@ -43,8 +43,8 @@ public class ASMUtils { * Call this Method twice, one time for the Descriptor and one time for the Name. */ public static boolean isCorrectMethod(MethodNode methodNode, String... args) { - for (int i = 0; i < args.length; i++) { - if (methodNode.name.equalsIgnoreCase(args[i]) || methodNode.desc.equalsIgnoreCase(args[i])) + for (String arg : args) { + if (methodNode.name.equalsIgnoreCase(arg) || methodNode.desc.equalsIgnoreCase(arg)) return true; } return false; diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java index e6143a98d2..a4c8fe9dea 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -42,6 +42,7 @@ import java.util.List; import static com.github.bartimaeusnek.ASM.BWCoreTransformer.shouldTransform; +@SuppressWarnings("ALL") public class BWCore extends DummyModContainer { public static final String BWCORE_NAME = "BartWorks ASM Core"; diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCorePlugin.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCorePlugin.java index 97f4702d4c..3d8811142d 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCorePlugin.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCorePlugin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -67,6 +67,7 @@ public class BWCorePlugin implements IFMLLoadingPlugin { } @Override + @SuppressWarnings("rawtypes") public void injectData(Map data) { if (data.get("runtimeDeobfuscationEnabled") != null) { BWCoreTransformer.obfs = (boolean) data.get("runtimeDeobfuscationEnabled"); diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java index 505612cd35..b239563656 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreStaticReplacementMethodes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java index f880ed0321..4ec2f70142 100644 --- a/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java +++ b/src/main/java/com/github/bartimaeusnek/ASM/BWCoreTransformer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -155,9 +155,8 @@ public class BWCoreTransformer implements IClassTransformer { String field_deObfs = "locationSunPng"; String field_src = "field_110928_i"; BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]); - for (int i = 0; i < methods.size(); i++) { - MethodNode toPatch = methods.get(i); - if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs, name_Obfs, name_src) && ASMUtils.isCorrectMethod(methods.get(i), dsc_universal)) { + for (MethodNode toPatch : methods) { + if (ASMUtils.isCorrectMethod(toPatch, name_deObfs, name_Obfs, name_src) && ASMUtils.isCorrectMethod(toPatch, dsc_universal)) { BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!"); InsnList nu = new InsnList(); LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()}; @@ -225,9 +224,8 @@ public class BWCoreTransformer implements IClassTransformer { case 4 : { BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]); String name_deObfs = ""; - for (int i = 0; i < methods.size(); i++) { - MethodNode toPatch = methods.get(i); - if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs) && (methods.get(i).access & ACC_STATIC) != 0) { + for (MethodNode toPatch : methods) { + if (ASMUtils.isCorrectMethod(toPatch, name_deObfs) && (toPatch.access & ACC_STATIC) != 0) { BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!"); InsnList nu = new InsnList(); LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()}; @@ -251,10 +249,8 @@ public class BWCoreTransformer implements IClassTransformer { case 5: { BWCore.BWCORE_LOG.info("Could find: " + BWCoreTransformer.CLASSESBEEINGTRANSFORMED[id]); String name_deObfs = "getNewNoise"; - for (int i = 0; i < methods.size(); i++) { - MethodNode toPatch = methods.get(i); - - if (ASMUtils.isCorrectMethod(methods.get(i), name_deObfs)) { + for (MethodNode toPatch : methods) { + if (ASMUtils.isCorrectMethod(toPatch, name_deObfs)) { BWCore.BWCORE_LOG.info("Found " + (name_deObfs) + "! Patching!"); LabelNode[] LabelNodes = {new LabelNode(), new LabelNode()}; InsnList nu = new InsnList(); @@ -277,11 +273,11 @@ public class BWCoreTransformer implements IClassTransformer { nu.add(new VarInsnNode(ISTORE, 3)); nu.add(LabelNodes[1]); - for (int j = 1; j < methods.get(i).instructions.size(); j++) { - nu.add(methods.get(i).instructions.get(j)); + for (int j = 1; j < toPatch.instructions.size(); j++) { + nu.add(toPatch.instructions.get(j)); } - methods.get(i).instructions = nu; + toPatch.instructions = nu; break scase; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java index 7c2793f2b1..f9fcd4bd37 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/API_REFERENCE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java index 0f181a3559..9c55b47440 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java index a3c33ceac9..1035ab7d5c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -36,7 +36,7 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import java.awt.*; - +@SuppressWarnings("ALL") public final class BioObjectAdder { // @Deprecated @@ -156,7 +156,7 @@ public final class BioObjectAdder { * @return the propper Bacteria Tier (at least 0) */ public static int getBacteriaTierFromVoltageTier(int voltageTier) { - return voltageTier - 6 > 0 ? voltageTier - 6 : 0; + return Math.max(voltageTier - 6, 0); } /** diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java index edee87f534..b38fc86344 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioObjectGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,6 +32,7 @@ import net.minecraft.nbt.NBTTagCompound; import java.util.Collection; +@SuppressWarnings("ALL") public final class BioObjectGetter { public static BioCulture getBioCulture(String aName) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java index 0e40363356..30d387399c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioRecipeAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -31,6 +31,7 @@ import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; +@SuppressWarnings("ALL") public final class BioRecipeAdder { public static final int STANDART = 0; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java index a8fc8dae91..7e17d323e6 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BioVatLogicAdder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -31,11 +31,11 @@ import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.Objects; import static cpw.mods.fml.common.registry.GameRegistry.findBlock; +@SuppressWarnings("ALL") public final class BioVatLogicAdder { @@ -64,9 +64,7 @@ public final class BioVatLogicAdder { public static int getMaxSv() { int ret = MaxSV; - Iterator it = BioVatLogicAdder.RadioHatch.getMaSv().iterator(); - while (it.hasNext()) { - BioVatLogicAdder.MaterialSvPair pair = (BioVatLogicAdder.MaterialSvPair) it.next(); + for (MaterialSvPair pair : RadioHatch.getMaSv()) { if (pair.getSievert() > ret) ret = pair.getSievert(); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java index 76612ad404..8d5c0d23ae 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/INoiseGen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java index 391593d217..b4fe0923bc 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/IRadMaterial.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java index 002b175bbf..fe92654fd0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileAddsInformation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java index a84f254d8a..5e8663f907 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileDropsContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,6 +27,6 @@ import net.minecraft.inventory.ISidedInventory; public interface ITileDropsContent extends ISidedInventory { default int[] getDropSlots(){ return new int[] {0}; - }; + } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java index a9318ca7f0..9ae176d26f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileHasDifferentTextureSides.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -38,15 +38,11 @@ public interface ITileHasDifferentTextureSides { return texture[side.ordinal()]; } - ; - @SideOnly(Side.CLIENT) default IIcon getTextureForSide(int side, int meta) { return getTextureForSide(ForgeDirection.values()[side], meta); } - ; - @SideOnly(Side.CLIENT) void registerBlockIcons(IIconRegister par1IconRegister); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java index 636fcb3a31..deec80e80f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/ITileWithGUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java index 397d949e77..1dc575bd5a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAPI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,6 +26,7 @@ import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; public final class WerkstoffAPI { + @SuppressWarnings("rawtypes") public Werkstoff getWerkstoff(String aName) throws NoSuchFieldException, IllegalAccessException, ClassNotFoundException { Class w = Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader"); return (Werkstoff) w.getField(aName).get(null); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java index 6437ad1087..7efe2af842 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/WerkstoffAdderRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -32,11 +32,11 @@ public final class WerkstoffAdderRegistry implements Runnable { private WerkstoffAdderRegistry() { } - public static final WerkstoffAdderRegistry getINSTANCE() { + public static WerkstoffAdderRegistry getINSTANCE() { return INSTANCE; } - public static final void addWerkstoffAdder(Runnable adder) { + public static void addWerkstoffAdder(Runnable adder) { INSTANCE.toRun.add(adder); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java index 5476c65e72..6e46f1dbab 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index f9674b72c7..abd55ddf6e 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -108,6 +108,7 @@ public final class MainMod { public static BW_Network BW_Network_instance = new BW_Network(); @Mod.EventHandler + @SuppressWarnings("ALL") public void preInit(FMLPreInitializationEvent preinit) { if (!(API_REFERENCE.VERSION.equals(MainMod.APIVERSION))) { @@ -328,6 +329,7 @@ public final class MainMod { } } + @SuppressWarnings("ALL") private static void runMoltenUnificationEnfocement(Werkstoff werkstoff){ if (werkstoff.getGenerationFeatures().enforceUnification && werkstoff.getGenerationFeatures().hasMolten()) { try { @@ -512,6 +514,7 @@ public final class MainMod { toAdd.forEach(GT_Recipe.GT_Recipe_Map.sBlastRecipes::add); } + @SuppressWarnings("ALL") private static void addElectricImplosionCompressorRecipes() { if (eicMap == null) { eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet<>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java index f3590b4e90..14a146e01a 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -41,8 +41,8 @@ class TooltipCache { if (!tooltip.isEmpty()) { StringBuilder sb = new StringBuilder(); - for (int i = 0; i < tooltip.size(); i++) { - sb.append(tooltip.get(i)); + for (String s : tooltip) { + sb.append(s); sb.append(System.lineSeparator()); } char[] rettype = sb.toString().toCharArray(); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java index 2532357218..1f28933622 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/ClientEventHandler/TooltipEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java index 2057052be3..628b4acb96 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/BioTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java index 8f45b3d48d..03ecf155e3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java index c49fdb0aae..41ce06cc81 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java index 44dc931a23..610aeb14f7 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_HeatedWaterPump.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -49,7 +49,7 @@ public class BW_GUIContainer_HeatedWaterPump extends GuiContainer { if (this.container.fuel > 0) { this.mc.getTextureManager().bindTexture(BW_GUIContainer_HeatedWaterPump.furnaceGuiTextures); - int ik = this.container.maxfuel > 200 ? this.container.maxfuel : 200; + int ik = Math.max(this.container.maxfuel, 200); int i1 = ((this.container.fuel * 13) / ik); this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 13 - i1, 14, i1 + 1); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java index 788bcb379a..5ede1e09f0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RadLevel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java index 597fb1cb0b..94731e1833 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_RotorBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java index df4d721b02..69ec8349b9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/BW_GUIContainer_Windmill.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java index 8f31fc31db..ba0bc69c3b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java index e672eebe94..2f45e3c7c9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java index 8686cee0be..ae1187c3d0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java index 86779b71d0..9bd331c59c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_RadioHatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java index a59fb87635..3494b461a5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_ItemRenderer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java index 879274d114..4dd9bc3860 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_GT_Vanilla_Texture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java index 5bcd873fd3..7146293456 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/BW_Renderer_Block_Ores.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java index 82150c7913..74bc3e2712 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java index 0a2bf2d99c..cb0f78ffa5 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -170,27 +170,27 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler dInterpolatedV4 = dInterpolatedV; } else { float xFlow = MathHelper.sin(flowDir) * 0.25f, zFlow = MathHelper.cos(flowDir) * 0.25f; - dInterpolatedU = iconStill.getInterpolatedU((double) (8.0f + (-zFlow - xFlow) * 16.0f)); - dInterpolatedV = iconStill.getInterpolatedV((double) (8.0f + (-zFlow + xFlow) * 16.0f)); - dInterpolatedU2 = iconStill.getInterpolatedU((double) (8.0f + (-zFlow + xFlow) * 16.0f)); - dInterpolatedV2 = iconStill.getInterpolatedV((double) (8.0f + (zFlow + xFlow) * 16.0f)); - dInterpolatedU3 = iconStill.getInterpolatedU((double) (8.0f + (zFlow + xFlow) * 16.0f)); - dInterpolatedV3 = iconStill.getInterpolatedV((double) (8.0f + (zFlow - xFlow) * 16.0f)); - dInterpolatedU4 = iconStill.getInterpolatedU((double) (8.0f + (zFlow - xFlow) * 16.0f)); - dInterpolatedV4 = iconStill.getInterpolatedV((double) (8.0f + (-zFlow - xFlow) * 16.0f)); + dInterpolatedU = iconStill.getInterpolatedU(8.0f + (-zFlow - xFlow) * 16.0f); + dInterpolatedV = iconStill.getInterpolatedV(8.0f + (-zFlow + xFlow) * 16.0f); + dInterpolatedU2 = iconStill.getInterpolatedU(8.0f + (-zFlow + xFlow) * 16.0f); + dInterpolatedV2 = iconStill.getInterpolatedV(8.0f + (zFlow + xFlow) * 16.0f); + dInterpolatedU3 = iconStill.getInterpolatedU(8.0f + (zFlow + xFlow) * 16.0f); + dInterpolatedV3 = iconStill.getInterpolatedV(8.0f + (zFlow - xFlow) * 16.0f); + dInterpolatedU4 = iconStill.getInterpolatedU(8.0f + (zFlow - xFlow) * 16.0f); + dInterpolatedV4 = iconStill.getInterpolatedV(8.0f + (-zFlow - xFlow) * 16.0f); } tessellator.setBrightness(block.getMixedBrightnessForBlock(iBlockAccess, x, y, z)); tessellator.setColorOpaque_F(RendererSwitchingColorFluid.LIGHT_Y_POS * red, RendererSwitchingColorFluid.LIGHT_Y_POS * green, RendererSwitchingColorFluid.LIGHT_Y_POS * blue); - tessellator.addVertexWithUV((double) x, y + heightNW, (double) z, dInterpolatedU, dInterpolatedV); - tessellator.addVertexWithUV((double) x, y + heightSW, (double) (z + 1), dInterpolatedU2, dInterpolatedV2); - tessellator.addVertexWithUV((double) (x + 1), y + heightSE, (double) (z + 1), dInterpolatedU3, dInterpolatedV3); - tessellator.addVertexWithUV((double) (x + 1), y + heightNE, (double) z, dInterpolatedU4, dInterpolatedV4); - tessellator.addVertexWithUV((double) x, y + heightNW, (double) z, dInterpolatedU, dInterpolatedV); - tessellator.addVertexWithUV((double) (x + 1), y + heightNE, (double) z, dInterpolatedU4, dInterpolatedV4); - tessellator.addVertexWithUV((double) (x + 1), y + heightSE, (double) (z + 1), dInterpolatedU3, dInterpolatedV3); - tessellator.addVertexWithUV((double) x, y + heightSW, (double) (z + 1), dInterpolatedU2, dInterpolatedV2); + tessellator.addVertexWithUV(x, y + heightNW, z, dInterpolatedU, dInterpolatedV); + tessellator.addVertexWithUV(x, y + heightSW, z + 1, dInterpolatedU2, dInterpolatedV2); + tessellator.addVertexWithUV(x + 1, y + heightSE, z + 1, dInterpolatedU3, dInterpolatedV3); + tessellator.addVertexWithUV(x + 1, y + heightNE, z, dInterpolatedU4, dInterpolatedV4); + tessellator.addVertexWithUV(x, y + heightNW, z, dInterpolatedU, dInterpolatedV); + tessellator.addVertexWithUV(x + 1, y + heightNE, z, dInterpolatedU4, dInterpolatedV4); + tessellator.addVertexWithUV(x + 1, y + heightSE, z + 1, dInterpolatedU3, dInterpolatedV3); + tessellator.addVertexWithUV(x, y + heightSW, z + 1, dInterpolatedU2, dInterpolatedV2); } @@ -198,7 +198,7 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler rendered = true; tessellator.setBrightness(block.getMixedBrightnessForBlock(iBlockAccess, x, y - 1, z)); tessellator.setColorOpaque_F(RendererSwitchingColorFluid.LIGHT_Y_NEG * red, RendererSwitchingColorFluid.LIGHT_Y_NEG * green, RendererSwitchingColorFluid.LIGHT_Y_NEG * blue); - renderer.renderFaceYNeg(block, (double) x, y + RendererSwitchingColorFluid.RENDER_OFFSET, (double) z, this.getNullCheckedIiconOrFallbackTexture()); + renderer.renderFaceYNeg(block, x, y + RendererSwitchingColorFluid.RENDER_OFFSET, z, this.getNullCheckedIiconOrFallbackTexture()); } for (int side = 0; side < 4; ++side) { @@ -269,14 +269,14 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler } tessellator.setColorOpaque_F(RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * red, RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * green, RendererSwitchingColorFluid.LIGHT_Y_POS * sideLighting * blue); - tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, (double) u1Flow, (double) v1Flow); - tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, (double) u2Flow, (double) v2Flow); - tessellator.addVertexWithUV(dXcoord2, (double) y, dZcoord2, (double) u2Flow, (double) v3Flow); - tessellator.addVertexWithUV(dXcoord1, (double) y, dZcoord1, (double) u1Flow, (double) v3Flow); - tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, (double) u1Flow, (double) v1Flow); - tessellator.addVertexWithUV(dXcoord1, (double) y, dZcoord1, (double) u1Flow, (double) v3Flow); - tessellator.addVertexWithUV(dXcoord2, (double) y, dZcoord2, (double) u2Flow, (double) v3Flow); - tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, (double) u2Flow, (double) v2Flow); + tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, u1Flow, v1Flow); + tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, u2Flow, v2Flow); + tessellator.addVertexWithUV(dXcoord2, y, dZcoord2, u2Flow, v3Flow); + tessellator.addVertexWithUV(dXcoord1, y, dZcoord1, u1Flow, v3Flow); + tessellator.addVertexWithUV(dXcoord1, y + dHeight1, dZcoord1, u1Flow, v1Flow); + tessellator.addVertexWithUV(dXcoord1, y, dZcoord1, u1Flow, v3Flow); + tessellator.addVertexWithUV(dXcoord2, y, dZcoord2, u2Flow, v3Flow); + tessellator.addVertexWithUV(dXcoord2, y + dHeight2, dZcoord2, u2Flow, v2Flow); } } renderer.renderMinY = 0.0; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java index 29b78e568e..4294e1c89c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/textures/PrefixTextureLinker.java @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2018-2019 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.github.bartimaeusnek.bartworks.client.textures; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; @@ -25,11 +47,11 @@ public class PrefixTextureLinker implements Runnable { for (OrePrefixes prefixes : OrePrefixes.values()) { if (prefixes == OrePrefixes.rod) continue; - HashMap curr = new HashMap<>(); + HashMap curr = new HashMap<>(); if (prefixes.mTextureIndex == -1 && Werkstoff.GenerationFeatures.prefixLogic.get(prefixes) != 0) { Arrays.stream(TextureSet.class.getFields()).filter(field -> field.getName().contains("SET")).forEach(SET -> { try { - curr.put(SET.get(null), new Textures.ItemIcons.CustomIcon("materialicons/" + SET.getName().substring(4) + "/" + prefixes)); + curr.put((TextureSet) SET.get(null), new Textures.ItemIcons.CustomIcon("materialicons/" + SET.getName().substring(4) + "/" + prefixes)); } catch (IllegalAccessException e) { e.printStackTrace(); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java index cf81a296f3..9a1f342b3c 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_Blocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -79,6 +79,7 @@ public class BW_Blocks extends Block { @Override @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") public void getSubBlocks(Item item, CreativeTabs tab, List list) { for (int i = 0; i < this.textureNames.length; i++) { list.add(new ItemStack(item, 1, i)); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java index 3d6d3e41b0..195d1afb6d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_GlasBlocks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java index b6a1ee611d..4fb77d6671 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -123,9 +123,9 @@ public class BW_TileEntityContainer extends BlockContainer implements ITileAddsI TileEntity t = world.getTileEntity(x,y,z); if (t instanceof ITileDropsContent){ int[] dropSlots = ((ITileDropsContent)t).getDropSlots(); - for (int i = 0; i < dropSlots.length; i++) { - if (((ITileDropsContent)t).getStackInSlot(dropSlots[i]) != null) - world.spawnEntityInWorld(new EntityItem(world,x,y,z,((BW_TileEntity_HeatedWaterPump)t).getStackInSlot(dropSlots[i]))); + for (int dropSlot : dropSlots) { + if (((ITileDropsContent) t).getStackInSlot(dropSlot) != null) + world.spawnEntityInWorld(new EntityItem(world, x, y, z, ((BW_TileEntity_HeatedWaterPump) t).getStackInSlot(dropSlot))); } } super.breakBlock(world, x, y, z, block, meta); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java index eac3b5fd28..41525ef6d7 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BW_TileEntityContainer_Multiple.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -117,6 +117,7 @@ public class BW_TileEntityContainer_Multiple extends BlockContainer { @Override @SideOnly(Side.CLIENT) + @SuppressWarnings("unchecked") public void getSubBlocks(Item item, CreativeTabs tab, List list) { for (int i = 0; i < this.textureNames.length; i++) { list.add(new ItemStack(item, 1, i)); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java index ea1b074c69..61c93217d9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/blocks/BioFluidBlock.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java index ec85e7e1d4..d3091afb56 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/ChangeConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -41,6 +41,7 @@ public class ChangeConfig extends CommandBase { } @Override + @SuppressWarnings("rawtypes") public void processCommand(ICommandSender p_71515_1_, String[] p_71515_2_) { try{ Field f = ConfigHandler.class.getField(p_71515_2_[0]); @@ -53,7 +54,7 @@ public class ChangeConfig extends CommandBase { p_71515_1_.addChatMessage(new ChatComponentText("you need to enter a number!")); return; } - f.setInt(null, Integer.parseInt(p_71515_2_[1])); + f.setInt(null, l); } else if (c.equals(long.class)) { long l; @@ -72,7 +73,6 @@ public class ChangeConfig extends CommandBase { f.setBoolean(null,false); else { p_71515_1_.addChatMessage(new ChatComponentText("booleans need to be set to true or false")); - return; } } }catch (Exception e){ diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java index 48f7a6d236..3e410ff2d3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/commands/SummonRuin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 bartimaeusnek + * Copyright (c) 2018-2019 bartimaeusnek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associate