aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java118
-rw-r--r--src/Java/gtPlusPlus/GTplusplus_Secondary.java130
-rw-r--r--src/Java/gtPlusPlus/api/analytics/AnalyticsLoggingPlugin.java10
-rw-r--r--src/Java/gtPlusPlus/api/analytics/SegmentAnalytics.java4
-rw-r--r--src/Java/gtPlusPlus/api/objects/CSPRNG.java8
-rw-r--r--src/Java/gtPlusPlus/api/objects/Logger.java139
-rw-r--r--src/Java/gtPlusPlus/core/block/ModBlocks.java5
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java102
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java13
-rw-r--r--src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java4
-rw-r--r--src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java15
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java6
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java25
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java21
-rw-r--r--src/Java/gtPlusPlus/core/commands/CommandMath.java50
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java27
-rw-r--r--src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java6
-rw-r--r--src/Java/gtPlusPlus/core/config/ConfigHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java6
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_ModularityTable.java21
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_ProjectTable.java16
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_TradeTable.java17
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_Workbench.java40
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java40
-rw-r--r--src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java4
-rw-r--r--src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java6
-rw-r--r--src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java391
-rw-r--r--src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java5
-rw-r--r--src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java3
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java6
-rw-r--r--src/Java/gtPlusPlus/core/handler/BookHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java4
-rw-r--r--src/Java/gtPlusPlus/core/handler/GuiHandler.java10
-rw-r--r--src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java8
-rw-r--r--src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java6
-rw-r--r--src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java20
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java11
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java10
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/SneakManager.java4
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java50
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java8
-rw-r--r--src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java14
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java35
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java6
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java6
-rw-r--r--src/Java/gtPlusPlus/core/item/base/CoreItem.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java34
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java12
-rw-r--r--src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java3
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java8
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java3
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java8
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java10
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java153
-rw-r--r--src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java8
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java12
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java58
-rw-r--r--src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java1
-rw-r--r--src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java1
-rw-r--r--src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java13
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java34
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java30
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java14
-rw-r--r--src/Java/gtPlusPlus/core/lib/LoadedMods.java92
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java17
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java303
-rw-r--r--src/Java/gtPlusPlus/core/material/MaterialGenerator.java32
-rw-r--r--src/Java/gtPlusPlus/core/material/MaterialStack.java10
-rw-r--r--src/Java/gtPlusPlus/core/material/ORES.java84
-rw-r--r--src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java1
-rw-r--r--src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java14
-rw-r--r--src/Java/gtPlusPlus/core/material/state/MaterialState.java3
-rw-r--r--src/Java/gtPlusPlus/core/proxy/ClientProxy.java17
-rw-r--r--src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java4
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java54
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_General.java10
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java30
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java4
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java8
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java8
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java18
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java4
-rw-r--r--src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java4
-rw-r--r--src/Java/gtPlusPlus/core/recipe/common/CI.java7
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotBlueprint.java6
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java33
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java11
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotGtTool.java6
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java6
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java6
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java4
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java10
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java12
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java14
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java38
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java17
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java42
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java141
-rw-r--r--src/Java/gtPlusPlus/core/util/array/AutoMap.java77
-rw-r--r--src/Java/gtPlusPlus/core/util/array/Quad.java33
-rw-r--r--src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java4
-rw-r--r--src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java10
-rw-r--r--src/Java/gtPlusPlus/core/util/enchanting/EnchantingUtils.java6
-rw-r--r--src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java29
-rw-r--r--src/Java/gtPlusPlus/core/util/geo/GeoUtils.java14
-rw-r--r--src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java14
-rw-r--r--src/Java/gtPlusPlus/core/util/inventory/InventoryUtils.java10
-rw-r--r--src/Java/gtPlusPlus/core/util/item/ItemUtils.java47
-rw-r--r--src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java28
-rw-r--r--src/Java/gtPlusPlus/core/util/math/MathUtils.java7
-rw-r--r--src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java4
-rw-r--r--src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java8
-rw-r--r--src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java12
-rw-r--r--src/Java/gtPlusPlus/core/util/player/PlayerCache.java16
-rw-r--r--src/Java/gtPlusPlus/core/util/player/PlayerUtils.java12
-rw-r--r--src/Java/gtPlusPlus/core/util/player/UtilsMining.java18
-rw-r--r--src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java140
-rw-r--r--src/Java/gtPlusPlus/core/util/recipe/shapeless/ShapelessUtils.java6
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java46
-rw-r--r--src/Java/gtPlusPlus/core/util/wrapper/var.java4
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java11
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java37
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java91
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java68
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldPollutedDirt.java4
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldSludgeFluid.java98
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java13
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java4
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java142
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java412
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java272
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java53
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java55
-rw-r--r--src/Java/gtPlusPlus/nei/GT_NEI_DefaultHandler.java2
-rw-r--r--src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java2
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/Preloader_ClassTransformer.java5
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java19
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java30
-rw-r--r--src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java30
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java83
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java77
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java88
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java30
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java53
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java29
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java34
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java25
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java28
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java61
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java96
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java60
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java41
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java208
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_CatalyticReactor.java54
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCuttingMachine.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java82
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java34
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java56
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java77
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java79
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java292
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java60
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java58
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java42
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java142
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java44
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java153
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java33
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java35
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java57
-rw-r--r--src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java78
-rw-r--r--src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java78
-rw-r--r--src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/common/ItemBlockThaumcraft.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/common/tile/TCTileEntities.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java13
-rw-r--r--src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java12
288 files changed, 5424 insertions, 2880 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 6d28dd3662..f72d51205a 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -1,23 +1,25 @@
package gtPlusPlus;
-import static gtPlusPlus.core.lib.CORE.DEBUG;
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableCustomCapes;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableUpdateChecker;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Collection;
-import cpw.mods.fml.common.*;
+import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.Materials;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map;
import gtPlusPlus.api.analytics.SegmentAnalytics;
import gtPlusPlus.api.analytics.SegmentHelper;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.commands.CommandMath;
import gtPlusPlus.core.common.CommonProxy;
@@ -27,6 +29,7 @@ import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
import gtPlusPlus.core.handler.events.BlockEventHandler;
import gtPlusPlus.core.handler.events.LoginEventHandler;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.geo.GeoUtils;
import gtPlusPlus.core.util.item.ItemUtils;
@@ -35,7 +38,7 @@ import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
-import net.minecraft.client.Minecraft;
+import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader;
import net.minecraft.item.Item;
import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.oredict.OreDictionary;
@@ -47,9 +50,12 @@ public class GTplusplus implements ActionListener {
//Mod Instance
@Mod.Instance(CORE.MODID)
public static GTplusplus instance;
+
+ //Material Loader
+ public static GT_Material_Loader mGregMatLoader;
//GT_Proxy instance
- protected static Meta_GT_Proxy gregtechproxy;
+ protected static Meta_GT_Proxy mGregProxy;
//GT++ Proxy Instances
@SidedProxy(clientSide = "gtPlusPlus.core.proxy.ClientProxy", serverSide = "gtPlusPlus.core.proxy.ServerProxy")
@@ -58,28 +64,28 @@ public class GTplusplus implements ActionListener {
// Loads Textures
@SideOnly(value = Side.CLIENT)
public static void loadTextures() {
- Utils.LOG_INFO("Loading some textures on the client.");
+ Logger.INFO("Loading some textures on the client.");
// Tools
- Utils.LOG_WARNING("Processing texture: " + TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile().getResourcePath());
+ Logger.WARNING("Processing texture: " + TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile().getResourcePath());
// Blocks
- Utils.LOG_WARNING("Processing texture: " + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath());
+ Logger.WARNING("Processing texture: " + TexturesGtBlock.Casing_Machine_Dimensional.getTextureFile().getResourcePath());
}
// Pre-Init
@Mod.EventHandler
public void preInit(final FMLPreInitializationEvent event) {
- Utils.LOG_INFO("Loading " + CORE.name + " V" + CORE.VERSION);
+ Logger.INFO("Loading " + CORE.name + " V" + CORE.VERSION);
if(!Utils.isServer()){
enableCustomCapes = true;
- //Get Graphics Mode.
- CORE.mFancyGraphics = Minecraft.isFancyGraphicsEnabled();
}
//Give this a go mate.
initAnalytics();
+ setupMaterialBlacklist();
+ //setupMaterialWhitelist();
//HTTP Requests
CORE.MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase();
@@ -91,13 +97,13 @@ public class GTplusplus implements ActionListener {
//Check for Dev
CORE.DEVENV = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
if (enableUpdateChecker){
- Utils.LOG_INFO("Latest is " + CORE.MASTER_VERSION + ". Updated? " + Utils.isModUpToDate());
+ Logger.INFO("Latest is " + CORE.MASTER_VERSION + ". Updated? " + Utils.isModUpToDate());
}
//Utils.LOG_INFO("User's Country: " + CORE.USER_COUNTRY);
// FirstCall();
Utils.registerEvent(new LoginEventHandler());
- Utils.LOG_INFO("Login Handler Initialized");
+ Logger.INFO("Login Handler Initialized");
@@ -111,7 +117,7 @@ public class GTplusplus implements ActionListener {
proxy.registerNetworkStuff();
//Set Variables for Fluorite Block handling
- Utils.LOG_INFO("Setting some Variables for the block break event handler.");
+ Logger.INFO("Setting some Variables for the block break event handler.");
BlockEventHandler.oreLimestone = OreDictionary.getOres("oreLimestone");
BlockEventHandler.blockLimestone = OreDictionary.getOres("limestone");
BlockEventHandler.fluoriteOre = ItemUtils.getSimpleStack(Item.getItemFromBlock(ModBlocks.blockOreFluorite));
@@ -122,19 +128,12 @@ public class GTplusplus implements ActionListener {
@Mod.EventHandler
public void postInit(final FMLPostInitializationEvent event) {
proxy.postInit(event);
-
- if (DEBUG) {
- this.dumpGtRecipeMap(Gregtech_Recipe_Map.sChemicalDehydratorRecipes);
- this.dumpGtRecipeMap(Gregtech_Recipe_Map.sCokeOvenRecipes);
- this.dumpGtRecipeMap(Gregtech_Recipe_Map.sMatterFab2Recipes);
- this.dumpGtRecipeMap(Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes);
- }
BookHandler.runLater();
- Utils.LOG_INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- Utils.LOG_INFO("| Recipes succesfully Loaded: " + RegistrationHandler.recipesSuccess + " | Failed: "
+ Logger.INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+ Logger.INFO("| Recipes succesfully Loaded: " + RegistrationHandler.recipesSuccess + " | Failed: "
+ RegistrationHandler.recipesFailed + " |");
- Utils.LOG_INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- Utils.LOG_INFO("Finally, we are finished. Have some cripsy bacon as a reward.");
+ Logger.INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+ Logger.INFO("Finally, we are finished. Have some cripsy bacon as a reward.");
}
@EventHandler
@@ -151,11 +150,9 @@ public class GTplusplus implements ActionListener {
public void serverStopping(final FMLServerStoppingEvent event) {
//Flush all data to Server at the end of the day.
if (SegmentAnalytics.sAnalyticsMasterList.size() > 0){
- int i=0;
for (SegmentAnalytics sa : SegmentAnalytics.sAnalyticsMasterList.values()){
sa.flushDataFinal();
SegmentAnalytics.LOG("Cleaned up Analytics Data for player "+sa.mLocalName+".");
- i++;
}
}
@@ -168,26 +165,69 @@ public class GTplusplus implements ActionListener {
protected void dumpGtRecipeMap(final GT_Recipe_Map r) {
final Collection<GT_Recipe> x = r.mRecipeList;
- Utils.LOG_INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug.");
+ Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug.");
for (final GT_Recipe newBo : x) {
- Utils.LOG_INFO("========================");
- Utils.LOG_INFO("Dumping Input: " + ItemUtils.getArrayStackNames(newBo.mInputs));
- Utils.LOG_INFO("Dumping Inputs " + ItemUtils.getFluidArrayStackNames(newBo.mFluidInputs));
- Utils.LOG_INFO("Dumping Duration: " + newBo.mDuration);
- Utils.LOG_INFO("Dumping EU/t: " + newBo.mEUt);
- Utils.LOG_INFO("Dumping Output: " + ItemUtils.getArrayStackNames(newBo.mOutputs));
- Utils.LOG_INFO("Dumping Output: " + ItemUtils.getFluidArrayStackNames(newBo.mFluidOutputs));
- Utils.LOG_INFO("========================");
+ Logger.INFO("========================");
+ Logger.INFO("Dumping Input: " + ItemUtils.getArrayStackNames(newBo.mInputs));
+ Logger.INFO("Dumping Inputs " + ItemUtils.getFluidArrayStackNames(newBo.mFluidInputs));
+ Logger.INFO("Dumping Duration: " + newBo.mDuration);
+ Logger.INFO("Dumping EU/t: " + newBo.mEUt);
+ Logger.INFO("Dumping Output: " + ItemUtils.getArrayStackNames(newBo.mOutputs));
+ Logger.INFO("Dumping Output: " + ItemUtils.getFluidArrayStackNames(newBo.mFluidOutputs));
+ Logger.INFO("========================");
}
}
private static final void initAnalytics(){
SegmentAnalytics.isEnabled = CORE.ConfigSwitches.enableUpdateChecker;
- if (PlayerUtils.isPlayerAlkalus()){
+ if (!Utils.isServer() && PlayerUtils.isPlayerAlkalus()){
SegmentAnalytics.isEnabled = true;
+ }
+ new SegmentHelper();
+ }
+
+ private static final boolean setupMaterialBlacklist(){
+ int ID = 0;
+ Material.invalidMaterials.put(ID++, Materials._NULL);
+ Material.invalidMaterials.put(ID++, Materials.Clay);
+ Material.invalidMaterials.put(ID++, Materials.Phosphorus);
+ Material.invalidMaterials.put(ID++, Materials.Steel);
+ Material.invalidMaterials.put(ID++, Materials.Bronze);
+ Material.invalidMaterials.put(ID++, Materials.Hydrogen);
+ //Infused TC stuff
+ Material.invalidMaterials.put(ID++, Materials.InfusedAir);
+ Material.invalidMaterials.put(ID++, Materials.InfusedEarth);
+ Material.invalidMaterials.put(ID++, Materials.InfusedFire);
+ Material.invalidMaterials.put(ID++, Materials.InfusedWater);
+
+ //EIO Materials
+ Material.invalidMaterials.put(ID++, Materials.SoulSand);
+ Material.invalidMaterials.put(ID++, Materials.EnderPearl);
+ Material.invalidMaterials.put(ID++, Materials.EnderEye);
+ Material.invalidMaterials.put(ID++, Materials.Redstone);
+ Material.invalidMaterials.put(ID++, Materials.Glowstone);
+ Material.invalidMaterials.put(ID++, Materials.Soularium);
+ Material.invalidMaterials.put(ID++, Materials.PhasedIron);
+
+ if (Material.invalidMaterials.size() > 0){
+ return true;
}
+ return false;
- new SegmentHelper();
+ }
+
+ private void setupMaterialWhitelist() {
+
+ mGregMatLoader = new GT_Material_Loader();
+
+ //Non GTNH Materials
+ if (!CORE.GTNH){
+ //Mithril - Random Dungeon Loot
+ mGregMatLoader.enableMaterial(Materials.Mithril);
+ }
+
+ //Force - Alloying
+ mGregMatLoader.enableMaterial(Materials.Force);
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/GTplusplus_Secondary.java b/src/Java/gtPlusPlus/GTplusplus_Secondary.java
index 0b6506095e..f69a5f2881 100644
--- a/src/Java/gtPlusPlus/GTplusplus_Secondary.java
+++ b/src/Java/gtPlusPlus/GTplusplus_Secondary.java
@@ -1,31 +1,24 @@
package gtPlusPlus;
import java.io.File;
-import java.util.Random;
import cofh.mod.ChildMod;
-import cpw.mods.fml.common.*;
+import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.CustomProperty;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.material.ORES;
import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
import gtPlusPlus.core.world.darkworld.biome.Biome_DarkWorld;
-import gtPlusPlus.core.world.darkworld.block.blockDarkWorldGround;
-import gtPlusPlus.core.world.darkworld.block.blockDarkWorldPollutedDirt;
-import gtPlusPlus.core.world.darkworld.block.blockDarkWorldPortal;
-import gtPlusPlus.core.world.darkworld.block.blockDarkWorldPortalFrame;
-import gtPlusPlus.core.world.darkworld.item.itemDarkWorldPortalTrigger;
+import gtPlusPlus.core.world.darkworld.block.DarkWorldContentLoader;
+import gtPlusPlus.core.world.darkworld.gen.gt.WorldGen_GT_Base;
import gtPlusPlus.xmod.gregtech.HANDLER_GT;
import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.config.Configuration;
@@ -35,101 +28,126 @@ name = "GT++ Dark World",
version = CORE.VERSION,
dependencies = "after:Miscutils;after:Gregtech",
customProperties = @CustomProperty(k = "cofhversion", v = "true")))
-public class GTplusplus_Secondary implements IFuelHandler, IWorldGenerator{
+public class GTplusplus_Secondary {
public static final String MODID2 = "GT++ Dark World";
public static final String VERSION2 = "0.1";
// Dark World Handler
- Biome_DarkWorld DarkWorld_Biome;
- Dimension_DarkWorld DarkWorld_Dimension;
+ protected static volatile Biome_DarkWorld DarkWorld_Biome;
+ protected static volatile Dimension_DarkWorld DarkWorld_Dimension;
public static int globalDarkWorldPortalSpawnTimer = 0;
- @EventHandler
- public void load(final FMLInitializationEvent e) {
- Utils.LOG_INFO("Begin resource allocation for " + MODID2 + " V" + VERSION2);
-
- //Load Dark World and Biome
- GameRegistry.registerFuelHandler(this);
- GameRegistry.registerWorldGenerator(this, 1);
- DarkWorld_Biome.load();
- DarkWorld_Dimension.load();
-
- }
-
// Pre-Init
@Mod.EventHandler
public void preInit(final FMLPreInitializationEvent event) {
- Utils.LOG_INFO("Loading " + MODID2 + " V" + VERSION2);
+ Logger.INFO("Loading " + MODID2 + " V" + VERSION2);
//Setup
setVars();
- DarkWorld_Biome = new Biome_DarkWorld();
+ setDarkBiome(new Biome_DarkWorld());
DarkWorld_Dimension = new Dimension_DarkWorld();
// Load Dark World
- DarkWorld_Biome.instance = GTplusplus.instance;
+ getDarkBiome().instance = GTplusplus.instance;
DarkWorld_Dimension.instance = GTplusplus.instance;
- DarkWorld_Biome.preInit(event);
+ getDarkBiome().preInit(event);
DarkWorld_Dimension.preInit(event);
//Load/Set Custom Ore Gen
HANDLER_GT.sCustomWorldgenFile = new GTPP_Config(new Configuration(new File(new File(event.getModConfigurationDirectory(), "GTplusplus"), "WorldGeneration.cfg")));
}
+
+ @EventHandler
+ public void load(final FMLInitializationEvent e) {
+ Logger.INFO("Begin resource allocation for " + MODID2 + " V" + VERSION2);
+
+ //Run Ore Material Handler
+ GenerateOreMaterials();
+
+ //Load Dark World and Biome
+ //GameRegistry.registerFuelHandler(this);
+ GameRegistry.registerWorldGenerator(new WorldGen_GT_Base(), 50);
+ getDarkBiome().load();
+ DarkWorld_Dimension.load();
+
+ }
+ private void GenerateOreMaterials() {
+ MaterialGenerator.generate(ORES.CROCROITE);
+ MaterialGenerator.generate(ORES.GEIKIELITE);
+ MaterialGenerator.generate(ORES.NICHROMITE);
+ MaterialGenerator.generate(ORES.TITANITE);
+ MaterialGenerator.generate(ORES.ZIMBABWEITE);
+ MaterialGenerator.generate(ORES.ZIRCONILITE);
+ }
+
void setVars(){
- Dimension_DarkWorld.DIMID = DimensionManager.getNextFreeDimId();
- Dimension_DarkWorld.portalBlock = new blockDarkWorldPortal();
- Dimension_DarkWorld.portalItem = (itemDarkWorldPortalTrigger) (new itemDarkWorldPortalTrigger().setUnlocalizedName("dimensionDarkWorld_trigger"));
- Item.itemRegistry.addObject(423, "dimensionDarkWorld_trigger", Dimension_DarkWorld.portalItem);
- Dimension_DarkWorld.blockTopLayer = new blockDarkWorldGround();
- Dimension_DarkWorld.blockSecondLayer = new blockDarkWorldPollutedDirt();
- GameRegistry.registerBlock(Dimension_DarkWorld.blockTopLayer, "blockDarkWorldGround");
- GameRegistry.registerBlock(Dimension_DarkWorld.blockSecondLayer, "blockDarkWorldGround2");
- Blocks.fire.setFireInfo(Dimension_DarkWorld.blockTopLayer, 30, 20);
- Dimension_DarkWorld.blockPortalFrame = new blockDarkWorldPortalFrame();
- GameRegistry.registerBlock(Dimension_DarkWorld.blockPortalFrame, "blockDarkWorldPortalFrame");
+ if (DimensionManager.isDimensionRegistered(Dimension_DarkWorld.DIMID)){
+ Dimension_DarkWorld.DIMID = DimensionManager.getNextFreeDimId();
+ }
+
+ /*
+ * Set World Generation Values
+ */
+
+ WorldGen_GT_Base.oreveinPercentage = 75;
+ WorldGen_GT_Base.oreveinAttempts = 64;
+ WorldGen_GT_Base.oreveinMaxPlacementAttempts = 8;
+ if (CORE.DEBUG || CORE.DEVENV){
+ WorldGen_GT_Base.debugWorldGen = true;
+ }
+
+ DarkWorldContentLoader.run();
}
@EventHandler
public void serverLoad(FMLServerStartingEvent event) {
- DarkWorld_Biome.serverLoad(event);
+ getDarkBiome().serverLoad(event);
DarkWorld_Dimension.serverLoad(event);
}
- @Override
+ /*@Override
public int getBurnTime(ItemStack fuel) {
if (DarkWorld_Biome.addFuel(fuel) != 0)
return DarkWorld_Biome.addFuel(fuel);
if (DarkWorld_Dimension.addFuel(fuel) != 0)
return DarkWorld_Dimension.addFuel(fuel);
return 0;
- }
+ }*/
- @Override
+ /*@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
chunkX = chunkX * 16;
- chunkZ = chunkZ * 16;
- if (world.provider.dimensionId == -1) {
- DarkWorld_Biome.generateNether(world, random, chunkX, chunkZ);
- }
- if (world.provider.dimensionId == 0) {
+ chunkZ = chunkZ * 16;
+
+ if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) {
DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ);
}
+
+ //What does this even do?
if (world.provider.dimensionId == -1) {
- DarkWorld_Dimension.generateNether(world, random, chunkX, chunkZ);
+ DarkWorld_Biome.generateNether(world, random, chunkX, chunkZ);
}
if (world.provider.dimensionId == 0) {
-
+ DarkWorld_Biome.generateSurface(world, random, chunkX, chunkZ);
}
- }
+ }*/
@EventHandler
public static void postInit(final FMLPostInitializationEvent e) {
- Utils.LOG_INFO("Finished loading Dark World plugin for GT++.");
+ Logger.INFO("Finished loading Dark World plugin for GT++.");
+ }
+
+ public static synchronized Biome_DarkWorld getDarkBiome() {
+ return DarkWorld_Biome;
+ }
+
+ public static synchronized void setDarkBiome(Biome_DarkWorld darkWorld_Biome) {
+ DarkWorld_Biome = darkWorld_Biome;
}
}
diff --git a/src/Java/gtPlusPlus/api/analytics/AnalyticsLoggingPlugin.java b/src/Java/gtPlusPlus/api/analytics/AnalyticsLoggingPlugin.java
index ff7d050a9e..2423eaa65c 100644
--- a/src/Java/gtPlusPlus/api/analytics/AnalyticsLoggingPlugin.java
+++ b/src/Java/gtPlusPlus/api/analytics/AnalyticsLoggingPlugin.java
@@ -6,7 +6,7 @@ import com.segment.analytics.Log;
import com.segment.analytics.Plugin;
import com.segment.analytics.messages.Message;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
/**
* A {@link Plugin} implementation that redirects client logs to standard output and logs callback
@@ -16,22 +16,22 @@ public class AnalyticsLoggingPlugin implements Plugin {
@Override public void configure(Analytics.Builder builder) {
builder.log(new Log() {
@Override public void print(Level level, String format, Object... args) {
- Utils.LOG_WARNING(level + ":\t" + String.format(format, args));
+ Logger.WARNING(level + ":\t" + String.format(format, args));
}
@Override public void print(Level level, Throwable error, String format, Object... args) {
- Utils.LOG_WARNING(level + ":\t" + String.format(format, args));
+ Logger.WARNING(level + ":\t" + String.format(format, args));
//Utils.LOG_WARNING(error);
}
});
builder.callback(new Callback() {
@Override public void success(Message message) {
- Utils.LOG_WARNING("Uploaded " + message);
+ Logger.WARNING("Uploaded " + message);
}
@Override public void failure(Message message, Throwable throwable) {
- Utils.LOG_WARNING("Could not upload " + message);
+ Logger.WARNING("Could not upload " + message);
//Utils.LOG_WARNING(throwable);
}
});
diff --git a/src/Java/gtPlusPlus/api/analytics/SegmentAnalytics.java b/src/Java/gtPlusPlus/api/analytics/SegmentAnalytics.java
index cdd38fd374..c4ef82b9ef 100644
--- a/src/Java/gtPlusPlus/api/analytics/SegmentAnalytics.java
+++ b/src/Java/gtPlusPlus/api/analytics/SegmentAnalytics.java
@@ -10,6 +10,8 @@ import java.util.concurrent.Phaser;
import com.mojang.authlib.GameProfile;
import com.segment.analytics.Analytics;
+
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
@@ -212,7 +214,7 @@ public class SegmentAnalytics {
// Non-Dev Comments
public static void LOG(final String s) {
if (CORE.DEBUG){
- Utils.getLogger().info("[Analytics] "+s);
+ Logger.getLogger().info("[Analytics] "+s);
}
}
diff --git a/src/Java/gtPlusPlus/api/objects/CSPRNG.java b/src/Java/gtPlusPlus/api/objects/CSPRNG.java
index 6b78eaccfc..e55a650b67 100644
--- a/src/Java/gtPlusPlus/api/objects/CSPRNG.java
+++ b/src/Java/gtPlusPlus/api/objects/CSPRNG.java
@@ -34,14 +34,13 @@
*/
package gtPlusPlus.api.objects;
+import java.math.BigInteger;
+import java.security.SecureRandom;
import java.util.Random;
import gtPlusPlus.api.interfaces.IRandomGenerator;
import gtPlusPlus.core.util.Utils;
-import java.security.SecureRandom;
-import java.math.BigInteger;
-
/**
* The Blum-Blum-Shub random number generator.
*
@@ -205,7 +204,8 @@ public class CSPRNG extends Random implements IRandomGenerator {
*
* @return int
*/
- public int next(int numBits) {
+ @Override
+ public int next(int numBits) {
// TODO: find out how many LSB one can extract per cycle.
// it is more than one.
int result = 0;
diff --git a/src/Java/gtPlusPlus/api/objects/Logger.java b/src/Java/gtPlusPlus/api/objects/Logger.java
new file mode 100644
index 0000000000..7ed5dbde3a
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/objects/Logger.java
@@ -0,0 +1,139 @@
+package gtPlusPlus.api.objects;
+
+import org.apache.logging.log4j.LogManager;
+
+import cpw.mods.fml.common.FMLLog;
+import cpw.mods.fml.relauncher.FMLRelaunchLog;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.proxy.ClientProxy;
+
+public class Logger {
+
+ // Logging Functions
+ public static final org.apache.logging.log4j.Logger modLogger = Logger.makeLogger();
+
+ // Generate GT++ Logger
+ public static org.apache.logging.log4j.Logger makeLogger() {
+ final org.apache.logging.log4j.Logger gtPlusPlusLogger = LogManager.getLogger("GT++");
+ return gtPlusPlusLogger;
+ }
+
+ public static final org.apache.logging.log4j.Logger getLogger(){
+ return modLogger;
+ }
+
+ // Non-Dev Comments
+ public static void INFO(final String s) {
+ modLogger.info(s);
+ }
+
+ // Non-Dev Comments
+ public static void MACHINE_INFO(final String s) {
+
+ boolean localPlayer = false;
+ try {
+ if (ClientProxy.playerName != null){
+ if (ClientProxy.playerName.toLowerCase().contains("draknyte1")){
+ localPlayer = true;
+ }
+ }
+ }
+ catch (final Throwable t){
+
+ }
+
+ if (CORE.ConfigSwitches.MACHINE_INFO || localPlayer) {
+ final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2);
+ modLogger.info("Machine Info: " + s + " | " + name1);
+ }
+ }
+
+ // Developer Comments
+ public static void WARNING(final String s) {
+ if (CORE.DEBUG) {
+ modLogger.warn(s);
+ }
+ }
+
+ // Errors
+ public static void ERROR(final String s) {
+ if (CORE.DEBUG) {
+ modLogger.fatal(s);
+ }
+ }
+
+ // Developer Logger
+ public static void SPECIFIC_WARNING(final String whatToLog, final String msg, final int line) {
+ // if (!CORE.DEBUG){
+ FMLLog.warning("GT++ |" + line + "| " + whatToLog + " | " + msg);
+ // }
+ }
+
+ // ASM Comments
+ public static void LOG_ASM(final String s) {
+ FMLRelaunchLog.info("", s);
+ }
+
+
+
+
+
+
+
+
+
+
+ /**
+ * Special Loggers
+ */
+
+ /**
+ * Special Logger for Bee related content
+ */
+ public static void BEES(final String s) {
+ modLogger.info("[Bees] "+s);
+ }
+ /**
+ * Special Logger for Debugging Bee related content
+ */
+ public static void DEBUG_BEES(final String s) {
+ if (CORE.DEVENV || CORE.DEBUG)
+ modLogger.info("[Debug][Bees] "+s);
+ }
+
+
+
+ /**
+ * Special Logger for Materials related content
+ */
+ public static void MATERIALS(final String s) {
+ modLogger.info("[Materials] "+s);
+ }
+ /**
+ * Special Logger for Debugging Materials related content
+ */
+ public static void DEBUG_MATERIALS(final String s) {
+ if (CORE.DEVENV || CORE.DEBUG)
+ modLogger.info("[Debug][Materials] "+s);
+ }
+
+ /**
+ * Special Logger for Bee related content
+ */
+ public static void REFLECTION(final String s) {
+ if (CORE.DEVENV || CORE.DEBUG)
+ modLogger.info("[Reflection] "+s);
+ }
+
+
+ /**
+ * Special Logger for Darkworld related content
+ */
+ public static void WORLD(final String s) {
+ if (CORE.DEVENV || CORE.DEBUG)
+ modLogger.info("[WorldGen] "+s);
+ }
+
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java
index 81d3a84dc9..cbd21a8888 100644
--- a/src/Java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.block;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
import gtPlusPlus.core.block.base.BlockBaseOre;
import gtPlusPlus.core.block.general.BlockCompressedObsidian;
@@ -66,7 +67,7 @@ public final class ModBlocks {
public static Block blockNet;
public static void init() {
- Utils.LOG_INFO("Initializing Blocks.");
+ Logger.INFO("Initializing Blocks.");
//blockGriefSaver = new TowerDevice().setBlockName("blockGriefSaver").setCreativeTab(AddToCreativeTab.tabBlock).setBlockTextureName("blockDefault");
registerBlocks();
@@ -74,7 +75,7 @@ public final class ModBlocks {
public static void registerBlocks(){
- Utils.LOG_INFO("Registering Blocks.");
+ Logger.INFO("Registering Blocks.");
GameRegistry.registerBlock(MatterFabricatorEffectBlock = new LightGlass(Material.glass, false).setHardness(0.1F).setBlockTextureName(CORE.MODID + ":" + "blockMFEffect").setStepSound(Block.soundTypeGlass), "blockMFEffect");
//Fluids
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java
new file mode 100644
index 0000000000..6f837e8709
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseFluid.java
@@ -0,0 +1,102 @@
+package gtPlusPlus.core.block.base;
+
+import java.util.Random;
+
+import cofh.lib.render.particle.EntityDropParticleFX;
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.Optional;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.item.base.itemblock.ItemBlockMeta;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.BlockFluidClassic;
+import net.minecraftforge.fluids.Fluid;
+
+public class BlockBaseFluid extends BlockFluidClassic {
+
+ private final String name;
+ private final IIcon textureArray[] = new IIcon[6];
+
+ protected float particleRed = 1.0F;
+ protected float particleGreen = 1.0F;
+ protected float particleBlue = 1.0F;
+
+ public BlockBaseFluid(String materialName, Fluid fluid, Material material) {
+ super(fluid, material);
+ this.setLightOpacity(2);
+ this.name = Utils.sanitizeString(materialName);
+ this.setBlockName("fluid"+this.name);
+ this.setCreativeTab(AddToCreativeTab.tabBlock);
+ GameRegistry.registerBlock(this, ItemBlockMeta.class, "fluid"+this.name);
+ }
+
+ public BlockFluidClassic setParticleColor(int arg0) {
+ return this.setParticleColor((arg0 >> 16 & 255) / 255.0F, (arg0 >> 8 & 255) / 255.0F,
+ (arg0 >> 0 & 255) / 255.0F);
+ }
+
+ public BlockFluidClassic setParticleColor(float arg0, float arg1, float arg2) {
+ this.particleRed = arg0;
+ this.particleGreen = arg1;
+ this.particleBlue = arg2;
+ return this;
+ }
+
+ @Override
+ public boolean canCreatureSpawn(EnumCreatureType arg0, IBlockAccess arg1, int arg2, int arg3, int arg4) {
+ return false;
+ }
+
+ public boolean preInit() {
+ return true;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int side, int meta) {
+ return side <= 1 ? this.textureArray[0] : this.textureArray[1];
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister iicon) {
+ this.textureArray[0] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Still");
+ this.textureArray[1] = iicon.registerIcon(CORE.MODID + ":" + "fluid/" + "Fluid_" + this.name + "_Flow");
+ //IconRegistry.addIcon("Fluid" + this.name, this.modName + ":fluid/Fluid_" + this.name + "_Still", arg0);
+ //IconRegistry.addIcon("Fluid" + this.name + "1", this.modName + ":fluid/Fluid_" + this.name + "_Flow", arg0);
+ }
+
+ @Override
+ @Optional.Method(modid = "CoFHCore")
+ @SideOnly(Side.CLIENT)
+ public void randomDisplayTick(World arg0, int arg1, int arg2, int arg3, Random arg4) {
+ super.randomDisplayTick(arg0, arg1, arg2, arg3, arg4);
+ double arg5 = arg1 + arg4.nextFloat();
+ double arg7 = arg2 - 1.05D;
+ double arg9 = arg3 + arg4.nextFloat();
+ if (super.density < 0) {
+ arg7 = arg2 + 2.1D;
+ }
+
+ if (arg4.nextInt(20) == 0
+ && arg0.isSideSolid(arg1, arg2 + super.densityDir, arg3,
+ super.densityDir == -1 ? ForgeDirection.UP : ForgeDirection.DOWN)
+ && !arg0.getBlock(arg1, arg2 + 2 * super.densityDir, arg3).getMaterial().blocksMovement()) {
+ EntityDropParticleFX arg11 = new EntityDropParticleFX(arg0, arg5, arg7, arg9, this.particleRed,
+ this.particleGreen, this.particleBlue, super.densityDir);
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(arg11);
+ }
+
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
index ff2f06d2d2..9c58e1a930 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
@@ -8,26 +8,31 @@ import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock;
import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
-import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.world.IBlockAccess;
public class BlockBaseModular extends BasicBlock{
+ protected Material blockMaterial;
+
protected int blockColour;
protected BlockTypes thisBlock;
protected String thisBlockMaterial;
protected final String thisBlockType;
-
+ public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) {
+ this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, blockType, colour, 2);
+ }
+
public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) {
- this(unlocalizedName, blockMaterial, Material.iron, blockType, colour, 2);
+ this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2);
}
- public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) {
+ public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) {
super(unlocalizedName, vanillaMaterial);
this.setHarvestLevel(blockType.getHarvestTool(), miningLevel);
this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture());
diff --git a/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java b/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java
index 8ac4e2df8d..ea3d9c3ee9 100644
--- a/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java
+++ b/src/Java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java
@@ -7,10 +7,10 @@ import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.general.TileEntityReverter;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -266,7 +266,7 @@ public class TowerDevice extends Block {
public TileEntity createTileEntity(final World world, final int metadata)
{
if (metadata == 0) {
- Utils.LOG_INFO("I have been created. [Antigriefer]"+this.getLocalizedName());
+ Logger.INFO("I have been created. [Antigriefer]"+this.getLocalizedName());
return new TileEntityReverter();
}
return null;
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java
index 1b4c5ebd01..bd41980325 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_ModularityTable.java
@@ -5,10 +5,10 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -70,7 +70,7 @@ public class Machine_ModularityTable extends BlockContainer
final TileEntity te = world.getTileEntity(x, y, z);
if ((te != null) && (te instanceof TileEntityModularityTable)){
player.openGui(GTplusplus.instance, 1, world, x, y, z);
- Utils.LOG_INFO("Player opened GUI");
+ Logger.INFO("Player opened GUI");
return true;
}
return false;
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
index 939015adf7..712d32aba7 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
@@ -6,11 +6,11 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import ic2.core.item.tool.ItemToolWrench;
@@ -95,7 +95,7 @@ public class Machine_ProjectTable extends BlockContainer
player.openGui(GTplusplus.instance, 0, world, x, y, z);
return true;
}
- Utils.LOG_INFO("Holding a Wrench, doing wrench things instead.");
+ Logger.INFO("Holding a Wrench, doing wrench things instead.");
}
return false;
}
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
index 724b438b13..4cad0977ed 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
@@ -3,10 +3,10 @@ package gtPlusPlus.core.block.machine;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.base.BlockBaseNBT;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EnumCreatureType;
@@ -55,7 +55,7 @@ public class Machine_TradeTable extends BlockBaseNBT
return true;
}
else {
- Utils.LOG_INFO("Bad TE");
+ Logger.INFO("Bad TE");
}
return false;
}
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
index b5c54ad9a8..06df4ca480 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
@@ -6,11 +6,11 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import ic2.core.item.tool.ItemToolWrench;
@@ -95,7 +95,7 @@ public class Machine_Workbench extends BlockContainer
player.openGui(GTplusplus.instance, 3, world, x, y, z);
return true;
}
- Utils.LOG_INFO("Holding a Wrench, doing wrench things instead.");
+ Logger.INFO("Holding a Wrench, doing wrench things instead.");
}
return false;
}
diff --git a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java
index ab56e11a9a..72693e3de7 100644
--- a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java
+++ b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java
@@ -65,7 +65,8 @@ public class ModelStaballoyConstruct extends ModelIronGolem
/**
* Sets the models various rotation angles then renders the model.
*/
- public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
+ @Override
+ public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
{
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_);
this.ironGolemHead.render(p_78088_7_);
@@ -81,7 +82,8 @@ public class ModelStaballoyConstruct extends ModelIronGolem
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
* "far" arms and legs can swing at most.
*/
- public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_)
+ @Override
+ public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_)
{
this.ironGolemHead.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI);
this.ironGolemHead.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI);
@@ -95,15 +97,16 @@ public class ModelStaballoyConstruct extends ModelIronGolem
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
- public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
+ @Override
+ public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_)
{
EntityIronGolem entityirongolem = (EntityIronGolem)p_78086_1_;
int i = entityirongolem.getAttackTimer();
if (i > 0)
{
- this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
- this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_4_, 10.0F);
+ this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F);
+ this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a(i - p_78086_4_, 10.0F);
}
else
{
@@ -111,7 +114,7 @@ public class ModelStaballoyConstruct extends ModelIronGolem
if (j > 0)
{
- this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float)j, 70.0F);
+ this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a(j, 70.0F);
this.ironGolemLeftArm.rotateAngleX = 0.0F;
}
else
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java b/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java
index bbbde96c8e..42071428a7 100644
--- a/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java
@@ -4,8 +4,8 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.texture.TextureMap;
@@ -19,7 +19,7 @@ public class RenderMiningExplosivesPrimed extends Render {
public RenderMiningExplosivesPrimed(){
this.shadowSize = 0.5F;
- Utils.LOG_INFO("Rendering Mining Explosion. 1");
+ Logger.INFO("Rendering Mining Explosion. 1");
}
/**
@@ -29,7 +29,7 @@ public class RenderMiningExplosivesPrimed extends Render {
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(final EntityTNTPrimed entity, final double p_76986_2_, final double p_76986_4_, final double p_76986_6_, final float p_76986_8_, final float p_76986_9_){
- Utils.LOG_INFO("Rendering Mining Explosion. 2");
+ Logger.INFO("Rendering Mining Explosion. 2");
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
float f2;
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java b/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java
index 378d03f1df..e86a3fa7ab 100644
--- a/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java
@@ -1,5 +1,8 @@
package gtPlusPlus.core.client.renderer;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.Tessellator;
@@ -12,8 +15,6 @@ import net.minecraft.item.ItemPotion;
import net.minecraft.potion.PotionHelper;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
@SideOnly(Side.CLIENT)
public class RenderPotionthrow extends Render
@@ -38,7 +39,8 @@ public class RenderPotionthrow extends Render
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
- public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
+ @Override
+ public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
IIcon iicon = this.mRenderItem.getIconFromDamage(this.mDamage);
@@ -54,9 +56,9 @@ public class RenderPotionthrow extends Render
if (iicon == ItemPotion.func_94589_d("bottle_splash"))
{
int i = PotionHelper.func_77915_a(((EntityPotion)p_76986_1_).getPotionDamage(), false);
- float f2 = (float)(i >> 16 & 255) / 255.0F;
- float f3 = (float)(i >> 8 & 255) / 255.0F;
- float f4 = (float)(i & 255) / 255.0F;
+ float f2 = (i >> 16 & 255) / 255.0F;
+ float f3 = (i >> 8 & 255) / 255.0F;
+ float f4 = (i & 255) / 255.0F;
GL11.glColor3f(f2, f3, f4);
GL11.glPushMatrix();
this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
@@ -73,7 +75,8 @@ public class RenderPotionthrow extends Render
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
- protected ResourceLocation getEntityTexture(Entity p_110775_1_)
+ @Override
+ protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return TextureMap.locationItemsTexture;
}
@@ -91,10 +94,10 @@ public class RenderPotionthrow extends Render
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
p_77026_1_.startDrawingQuads();
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
- p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
- p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
- p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
- p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
+ p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
+ p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
+ p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
+ p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
p_77026_1_.draw();
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java
index 20a3a0b2f4..8de64eef26 100644
--- a/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java
@@ -1,5 +1,8 @@
package gtPlusPlus.core.client.renderer;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.client.model.ModelStaballoyConstruct;
@@ -8,13 +11,9 @@ import gtPlusPlus.core.lib.CORE;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.*;
import net.minecraft.init.Blocks;
import net.minecraft.util.ResourceLocation;
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
@SideOnly(Side.CLIENT)
public class RenderStaballoyConstruct extends RenderLiving {
@@ -37,7 +36,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
*/
public void doRender(EntityStaballoyConstruct p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
- super.doRender((EntityLiving) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
/**
@@ -51,7 +50,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
protected void rotateCorpse(EntityStaballoyConstruct p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
- if ((double) p_77043_1_.limbSwingAmount >= 0.01D) {
+ if (p_77043_1_.limbSwingAmount >= 0.01D) {
float f3 = 13.0F;
float f4 = p_77043_1_.limbSwing - p_77043_1_.limbSwingAmount * (1.0F - p_77043_4_) + 6.0F;
float f5 = (Math.abs(f4 % f3 - f3 * 0.5F) - f3 * 0.25F) / (f3 * 0.25F);
@@ -74,7 +73,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
int i = p_77029_1_.getBrightnessForRender(p_77029_2_);
int j = i % 65536;
int k = i / 65536;
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.field_147909_c.renderBlockAsItem(Blocks.red_flower, 0, 1.0F);
@@ -91,15 +90,18 @@ public class RenderStaballoyConstruct extends RenderLiving {
* void func_76986_a(T entity, double d, double d1, double d2, float f,
* float f1). But JAD is pre 1.5 so doesn't do that.
*/
+ @Override
public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
+ @Override
protected void renderEquippedItems(EntityLivingBase p_77029_1_, float p_77029_2_) {
this.renderEquippedItems((EntityStaballoyConstruct) p_77029_1_, p_77029_2_);
}
+ @Override
protected void rotateCorpse(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
this.rotateCorpse((EntityStaballoyConstruct) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
}
@@ -112,6 +114,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
* void func_76986_a(T entity, double d, double d1, double d2, float f,
* float f1). But JAD is pre 1.5 so doesn't do that.
*/
+ @Override
public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
float p_76986_8_, float p_76986_9_) {
this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
@@ -121,6 +124,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
+ @Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return this.getEntityTexture((EntityStaballoyConstruct) p_110775_1_);
}
@@ -133,6 +137,7 @@ public class RenderStaballoyConstruct extends RenderLiving {
* void func_76986_a(T entity, double d, double d1, double d2, float f,
* float f1). But JAD is pre 1.5 so doesn't do that.
*/
+ @Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
float p_76986_9_) {
this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
diff --git a/src/Java/gtPlusPlus/core/commands/CommandMath.java b/src/Java/gtPlusPlus/core/commands/CommandMath.java
index 966f73c589..27c963bf81 100644
--- a/src/Java/gtPlusPlus/core/commands/CommandMath.java
+++ b/src/Java/gtPlusPlus/core/commands/CommandMath.java
@@ -3,7 +3,7 @@ package gtPlusPlus.core.commands;
import java.util.ArrayList;
import java.util.List;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
@@ -82,23 +82,23 @@ public class CommandMath implements ICommand
System.out.println("Processing on Server side - Home Teleport engaged by: "+P.getDisplayName());
final int XP_TOTAL = P.experienceTotal;
- Utils.LOG_WARNING("Total Xp:" + XP_TOTAL);
+ Logger.WARNING("Total Xp:" + XP_TOTAL);
final ChunkCoordinates X = P.getPlayerCoordinates();
- Utils.LOG_WARNING("Player Location: "+X);
+ Logger.WARNING("Player Location: "+X);
ChunkCoordinates Y = null;
- Utils.LOG_WARNING("Bed Location: "+Y);
+ Logger.WARNING("Bed Location: "+Y);
try {
if (P.getBedLocation(0) == null){
Y = W.getSpawnPoint();
- Utils.LOG_WARNING("Spawn Location: "+Y);
+ Logger.WARNING("Spawn Location: "+Y);
}
else if (P.getBedLocation(0) != null){
Y = P.getBedLocation(0);
- Utils.LOG_WARNING("Bed Location: "+Y);
+ Logger.WARNING("Bed Location: "+Y);
}
else {
Y = W.getSpawnPoint();
- Utils.LOG_WARNING("Spawn Location: "+Y);
+ Logger.WARNING("Spawn Location: "+Y);
}
}
catch(final NullPointerException e) {
@@ -106,37 +106,37 @@ public class CommandMath implements ICommand
}
if (Y == null) {
Y = W.getSpawnPoint();
- Utils.LOG_WARNING("Spawn Location: "+Y);
+ Logger.WARNING("Spawn Location: "+Y);
}
final int x1 = X.posX;
- Utils.LOG_WARNING("X1: "+x1);
+ Logger.WARNING("X1: "+x1);
final int x2 = Y.posX;
- Utils.LOG_WARNING("X2: "+x2);
+ Logger.WARNING("X2: "+x2);
final int y1 = X.posY;
- Utils.LOG_WARNING("Y1: "+y1);
+ Logger.WARNING("Y1: "+y1);
final int y2 = Y.posY;
- Utils.LOG_WARNING("Y2: "+y2);
+ Logger.WARNING("Y2: "+y2);
final int z1 = X.posZ;
- Utils.LOG_WARNING("Z1: "+z1);
+ Logger.WARNING("Z1: "+z1);
final int z2 = Y.posZ;
- Utils.LOG_WARNING("Z2: "+z2);
+ Logger.WARNING("Z2: "+z2);
final double d = Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1))+((z2-z1)*(z2-z1)));
final String xpCost = String.valueOf((int)(d*0.15));
- Utils.LOG_WARNING("d:" + d);
- Utils.LOG_WARNING("-----------------------------------------");
- Utils.LOG_WARNING("Actual math formulae");
- Utils.LOG_WARNING(String.valueOf(d));
- Utils.LOG_WARNING("-----------------------------------------");
- Utils.LOG_WARNING("Xp Cost based on answer B.");
- Utils.LOG_WARNING(String.valueOf(d*0.15) + " | " + String.valueOf(xpCost));
- Utils.LOG_WARNING("-----------------------------------------");
- Utils.LOG_WARNING("Xp Total");
- Utils.LOG_WARNING(String.valueOf(XP_TOTAL));
- Utils.LOG_WARNING("-----------------------------------------");
+ Logger.WARNING("d:" + d);
+ Logger.WARNING("-----------------------------------------");
+ Logger.WARNING("Actual math formulae");
+ Logger.WARNING(String.valueOf(d));
+ Logger.WARNING("-----------------------------------------");
+ Logger.WARNING("Xp Cost based on answer B.");
+ Logger.WARNING(String.valueOf(d*0.15) + " | " + String.valueOf(xpCost));
+ Logger.WARNING("-----------------------------------------");
+ Logger.WARNING("Xp Total");
+ Logger.WARNING(String.valueOf(XP_TOTAL));
+ Logger.WARNING("-----------------------------------------");
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index 1360932dfb..11be6f5f2d 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -4,6 +4,7 @@ import static gtPlusPlus.core.lib.CORE.DEBUG;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.entity.InternalEntityRegistry;
@@ -34,12 +35,12 @@ public class CommonProxy {
Utils.registerEvent(this);
if (LoadedMods.Gregtech){
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Utils.LOG_INFO("We're using Gregtech 5.09 Experimental.");
+ Logger.INFO("We're using Gregtech 5.09 Experimental.");
}
else {
- Utils.LOG_INFO("We're using Gregtech 5.08 or an earlier fork.");
+ Logger.INFO("We're using Gregtech 5.08 or an earlier fork.");
}
- Utils.LOG_INFO("Setting up our own GT_Proxy.");
+ Logger.INFO("Setting up our own GT_Proxy.");
GtProxy = new Meta_GT_Proxy();
}
else {
@@ -48,27 +49,27 @@ public class CommonProxy {
}
public void preInit(final FMLPreInitializationEvent e) {
- Utils.LOG_INFO("Doing some house cleaning.");
+ Logger.INFO("Doing some house cleaning.");
LoadedMods.checkLoaded();
- Utils.LOG_INFO("Making sure we're ready to party!");
+ Logger.INFO("Making sure we're ready to party!");
if (!DEBUG){
- Utils.LOG_WARNING("Development mode not enabled.");
+ Logger.WARNING("Development mode not enabled.");
}
else if (DEBUG){
- Utils.LOG_INFO("Development mode enabled.");
+ Logger.INFO("Development mode enabled.");
}
else {
- Utils.LOG_WARNING("Development mode not set.");
+ Logger.WARNING("Development mode not set.");
}
AddToCreativeTab.initialiseTabs();
COMPAT_IntermodStaging.preInit();
BookHandler.run();
//Registration of entities and renderers
- Utils.LOG_INFO("[Proxy] Calling Entity registrator.");
+ Logger.INFO("[Proxy] Calling Entity registrator.");
registerEntities();
- Utils.LOG_INFO("[Proxy] Calling Tile Entity registrator.");
+ Logger.INFO("[Proxy] Calling Tile Entity registrator.");
registerTileEntities();
@@ -103,7 +104,7 @@ public class CommonProxy {
* End of Subscribe Event registration.
*/
- Utils.LOG_INFO("[Proxy] Calling Render registrator.");
+ Logger.INFO("[Proxy] Calling Render registrator.");
registerRenderThings();
//Compat Handling
@@ -113,7 +114,7 @@ public class CommonProxy {
}
public void postInit(final FMLPostInitializationEvent e) {
- Utils.LOG_INFO("Cleaning up, doing postInit.");
+ Logger.INFO("Cleaning up, doing postInit.");
PlayerCache.initCache();
//Circuits
@@ -126,7 +127,7 @@ public class CommonProxy {
if (!CORE.burnables.isEmpty()){
BurnableFuelHandler fuelHandler = new BurnableFuelHandler();
GameRegistry.registerFuelHandler(fuelHandler);
- Utils.LOG_INFO("[Fuel Handler] Registering "+fuelHandler.getClass().getName());
+ Logger.INFO("[Fuel Handler] Registering "+fuelHandler.getClass().getName());
}
//Compat Handling
diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
index c365a19231..55a0a8ac10 100644
--- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
+++ b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
@@ -1,9 +1,9 @@
package gtPlusPlus.core.common.compat;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.general.*;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
public class COMPAT_Baubles {
@@ -17,7 +17,7 @@ public class COMPAT_Baubles {
}
public static void baublesLoaded(){
- Utils.LOG_INFO("Baubles Found - Loading Wearables.");
+ Logger.INFO("Baubles Found - Loading Wearables.");
ModItems.itemPersonalCloakingDevice = new ItemCloakingDevice(0);
//itemPersonalCloakingDeviceCharged = new ItemCloakingDevice(0).set;
ModItems.itemPersonalHealingDevice = new ItemHealingDevice();
@@ -27,7 +27,7 @@ public class COMPAT_Baubles {
}
public static void baublesNotLoaded(){
- Utils.LOG_INFO("Baubles Not Found - Skipping Resources.");
+ Logger.INFO("Baubles Not Found - Skipping Resources.");
}
}
diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
index c86b12b51b..641a4c0956 100644
--- a/src/Java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
@@ -1,8 +1,7 @@
package gtPlusPlus.core.config;
import static gtPlusPlus.core.item.general.RF2EU_Battery.rfPerEU;
-import static gtPlusPlus.core.lib.CORE.DARKBIOME_ID;
-import static gtPlusPlus.core.lib.CORE.DEBUG;
+import static gtPlusPlus.core.lib.CORE.*;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.*;
import static gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator.BlacklistedTileEntiyClassNames;
@@ -151,6 +150,7 @@ public class ConfigHandler {
"Disables Zombie Reinforcement on hard difficutly.");
//Biomes
+ DARKWORLD_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension.");
DARKBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension.");
//Blacklisted Accelerator TileEntities
diff --git a/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java b/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java
index ffa778a8c6..e45d708761 100644
--- a/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java
+++ b/src/Java/gtPlusPlus/core/container/Container_HeliumGenerator.java
@@ -1,11 +1,11 @@
package gtPlusPlus.core.container;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.InventoryHeliumGenerator;
import gtPlusPlus.core.slots.SlotFuelRod;
import gtPlusPlus.core.slots.SlotNoInput;
import gtPlusPlus.core.tileentities.general.TileEntityHeliumGenerator;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -54,7 +54,7 @@ public class Container_HeliumGenerator extends Container {
{
for (var7 = 0; var7 < 3; ++var7)
{
- Utils.LOG_INFO("Adding slots at var:"+(o)+" x:"+(8 + var7 * 18)+" y:"+(9 + var6 * 18));
+ Logger.INFO("Adding slots at var:"+(o)+" x:"+(8 + var7 * 18)+" y:"+(9 + var6 * 18));
this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 8 + (var7 * 18), 18 + (var6 * 18)));
this.slotStorage[o] = o;
o++;
@@ -66,7 +66,7 @@ public class Container_HeliumGenerator extends Container {
{
for (var7 = 0; var7 < 3; ++var7)
{
- Utils.LOG_INFO("Adding slots at var:"+(o)+" x:"+(90+8+(var7 * 18))+" y:"+(9 + var6 * 18));
+ Logger.INFO("Adding slots at var:"+(o)+" x:"+(90+8+(var7 * 18))+" y:"+(9 + var6 * 18));
this.addSlotToContainer(new SlotFuelRod(this.inventoryChest, o, 116 + (var7 * 18), 18 + (var6 * 18)));
this.slotStorage[o] = o;
o++;
diff --git a/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java b/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java
index d870750039..cfa1eed690 100644
--- a/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java
+++ b/src/Java/gtPlusPlus/core/container/Container_ModularityTable.java
@@ -1,20 +1,16 @@
package gtPlusPlus.core.container;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.modulartable.InventoryModularMain;
import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput;
-import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain;
-import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput;
import gtPlusPlus.core.slots.*;
import gtPlusPlus.core.tileentities.machines.TileEntityModularityTable;
-import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.*;
-import net.minecraft.inventory.SlotCrafting;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
-import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World;
public class Container_ModularityTable extends Container {
@@ -41,7 +37,7 @@ public class Container_ModularityTable extends Container {
this.inventoryOutputs = tile.inventoryOutputs;
this.tile_entity.setContainer(this);
this.mRecipeTime = this.tile_entity.getRecipeTime();
- Utils.LOG_INFO("Container: "+this.mRecipeTime);
+ Logger.INFO("Container: "+this.mRecipeTime);
int var6;
int var7;
@@ -103,6 +99,7 @@ public class Container_ModularityTable extends Container {
/**
* Called when the container is closed.
*/
+ @Override
public void onContainerClosed(EntityPlayer p_75134_1_){
super.onContainerClosed(p_75134_1_);
if (!this.worldObj.isRemote){
@@ -131,21 +128,21 @@ public class Container_ModularityTable extends Container {
}
if (aSlotIndex == 0){
- Utils.LOG_INFO("Player Clicked on the bauble slot");
+ Logger.INFO("Player Clicked on the bauble slot");
//TODO
}
else if (aSlotIndex == 1){
- Utils.LOG_INFO("Player Clicked on the upgrade slot");
+ Logger.INFO("Player Clicked on the upgrade slot");
//TODO
}
else if (aSlotIndex == 2){
- Utils.LOG_INFO("Player Clicked on the output slot");
+ Logger.INFO("Player Clicked on the output slot");
//TODO
}
else {
for (final int x : this.slotGrid){
if (aSlotIndex == x){
- Utils.LOG_INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
+ Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java b/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java
index 25e6756f71..dabe97ea45 100644
--- a/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java
+++ b/src/Java/gtPlusPlus/core/container/Container_ProjectTable.java
@@ -1,15 +1,14 @@
package gtPlusPlus.core.container;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain;
import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput;
import gtPlusPlus.core.slots.*;
import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.*;
-import net.minecraft.inventory.SlotCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World;
@@ -93,7 +92,8 @@ public class Container_ProjectTable extends Container {
/**
* Callback for when the crafting matrix is changed.
*/
- public void onCraftMatrixChanged(IInventory p_75130_1_)
+ @Override
+ public void onCraftMatrixChanged(IInventory p_75130_1_)
{
this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
}
@@ -101,7 +101,8 @@ public class Container_ProjectTable extends Container {
/**
* Called when the container is closed.
*/
- public void onContainerClosed(EntityPlayer p_75134_1_){
+ @Override
+ public void onContainerClosed(EntityPlayer p_75134_1_){
super.onContainerClosed(p_75134_1_);
if (!this.worldObj.isRemote){
for (int i = 0; i < 9; ++i){
@@ -122,16 +123,16 @@ public class Container_ProjectTable extends Container {
}
if (aSlotIndex == 0){
- Utils.LOG_INFO("Player Clicked on the Data Stick slot");
+ Logger.INFO("Player Clicked on the Data Stick slot");
//TODO
}if (aSlotIndex == 1){
- Utils.LOG_INFO("Player Clicked on the output slot");
+ Logger.INFO("Player Clicked on the output slot");
//TODO
}
for (final int x : this.slotGrid){
if (aSlotIndex == x){
- Utils.LOG_INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
+ Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
}
}
}
@@ -212,6 +213,7 @@ public class Container_ProjectTable extends Container {
}
//Can merge Slot
+ @Override
public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_){
return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_);
}
diff --git a/src/Java/gtPlusPlus/core/container/Container_TradeTable.java b/src/Java/gtPlusPlus/core/container/Container_TradeTable.java
index e79a51f242..271dc8ef2c 100644
--- a/src/Java/gtPlusPlus/core/container/Container_TradeTable.java
+++ b/src/Java/gtPlusPlus/core/container/Container_TradeTable.java
@@ -1,14 +1,16 @@
package gtPlusPlus.core.container;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.tradetable.InventoryTradeMain;
import gtPlusPlus.core.inventories.tradetable.InventoryTradeOutput;
-import gtPlusPlus.core.slots.*;
+import gtPlusPlus.core.slots.SlotGeneric;
+import gtPlusPlus.core.slots.SlotNoInput;
import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.*;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -35,7 +37,7 @@ public class Container_TradeTable extends Container {
this.tile_entity.setContainer(this);
if (te.isServerSide())
- Utils.LOG_INFO("Container - "+te.mOwnerName);
+ Logger.INFO("Container - "+te.mOwnerName);
int var6;
int var7;
@@ -88,6 +90,7 @@ public class Container_TradeTable extends Container {
/**
* Called when the container is closed.
*/
+ @Override
public void onContainerClosed(EntityPlayer p_75134_1_){
super.onContainerClosed(p_75134_1_);
if (!this.worldObj.isRemote){
@@ -109,16 +112,16 @@ public class Container_TradeTable extends Container {
}
if (aSlotIndex == 0){
- Utils.LOG_INFO("Player Clicked on the Data Stick slot");
+ Logger.INFO("Player Clicked on the Data Stick slot");
//TODO
}if (aSlotIndex == 1){
- Utils.LOG_INFO("Player Clicked on the output slot");
+ Logger.INFO("Player Clicked on the output slot");
//TODO
}
for (final int x : this.slotGrid){
if (aSlotIndex == x){
- Utils.LOG_INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
+ Logger.INFO("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/container/Container_Workbench.java b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
index 92398c12dd..e3b7e9d614 100644
--- a/src/Java/gtPlusPlus/core/container/Container_Workbench.java
+++ b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
@@ -1,13 +1,13 @@
package gtPlusPlus.core.container;
import gregtech.api.gui.GT_Slot_Holo;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.interfaces.IItemBlueprint;
import gtPlusPlus.core.inventories.*;
import gtPlusPlus.core.item.general.ItemBlueprint;
import gtPlusPlus.core.slots.*;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -185,74 +185,74 @@ public class Container_Workbench extends Container {
}
if (aSlotIndex == this.slotOutput){
- Utils.LOG_WARNING("Player Clicked on the output slot");
+ Logger.WARNING("Player Clicked on the output slot");
//TODO
}
for (final int x : this.slotHolo){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid");
if (x == 1){
- Utils.LOG_WARNING("Player Clicked Blueprint slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid");
}
else if (x == 2){
- Utils.LOG_WARNING("Player Clicked Right Arrow slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid");
if (this.inventoryHolo.getStackInSlot(1) != null){
- Utils.LOG_WARNING("Found an ItemStack.");
+ Logger.WARNING("Found an ItemStack.");
if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){
- Utils.LOG_WARNING("Found a blueprint.");
+ Logger.WARNING("Found a blueprint.");
final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1);
final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem();
if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){
- Utils.LOG_WARNING("Output slot was not empty.");
- Utils.LOG_WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one.");
+ Logger.WARNING("Output slot was not empty.");
+ Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one.");
tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0));
final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint);
this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint);
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint)));
+ Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint)));
}
else {
if (tempItemBlueprint.hasBlueprint(tempBlueprint)){
- Utils.LOG_WARNING("Blueprint already holds a recipe.");
+ Logger.WARNING("Blueprint already holds a recipe.");
}
else {
- Utils.LOG_WARNING("Output slot was empty.");
+ Logger.WARNING("Output slot was empty.");
}
}
}
else {
- Utils.LOG_WARNING("ItemStack found was not a blueprint.");
+ Logger.WARNING("ItemStack found was not a blueprint.");
}
}
else {
- Utils.LOG_WARNING("No ItemStack found in Blueprint slot.");
+ Logger.WARNING("No ItemStack found in Blueprint slot.");
}
}
else if (x == 3){
- Utils.LOG_WARNING("Player Clicked Big [P] slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid");
}
else if (x == 4){
- Utils.LOG_WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid");
}
else if (x == 5){
- Utils.LOG_WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid");
}
}
}
for (final int x : this.slotCrafting){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
}
}
for (final int x : this.slotStorage){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid");
}
}
for (final int x : this.slotTools){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java b/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java
index 4fefb8b3f5..453b965bc7 100644
--- a/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java
+++ b/src/Java/gtPlusPlus/core/container/Container_WorkbenchAdvanced.java
@@ -1,13 +1,13 @@
package gtPlusPlus.core.container;
import gregtech.api.gui.GT_Slot_Holo;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.interfaces.IItemBlueprint;
import gtPlusPlus.core.inventories.*;
import gtPlusPlus.core.item.general.ItemBlueprint;
import gtPlusPlus.core.slots.*;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -151,74 +151,74 @@ public class Container_WorkbenchAdvanced extends Container {
}
if (aSlotIndex == this.slotOutput){
- Utils.LOG_WARNING("Player Clicked on the output slot");
+ Logger.WARNING("Player Clicked on the output slot");
//TODO
}
for (final int x : this.slotHolo){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the Holo Grid");
if (x == 1){
- Utils.LOG_WARNING("Player Clicked Blueprint slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Blueprint slot in the Holo Grid");
}
else if (x == 2){
- Utils.LOG_WARNING("Player Clicked Right Arrow slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Right Arrow slot in the Holo Grid");
if (this.inventoryHolo.getStackInSlot(1) != null){
- Utils.LOG_WARNING("Found an ItemStack.");
+ Logger.WARNING("Found an ItemStack.");
if (this.inventoryHolo.getStackInSlot(1).getItem() instanceof IItemBlueprint){
- Utils.LOG_WARNING("Found a blueprint.");
+ Logger.WARNING("Found a blueprint.");
final ItemStack tempBlueprint = this.inventoryHolo.getStackInSlot(1);
final ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem();
if ((this.inventoryHolo.getStackInSlot(0) != null) && !tempItemBlueprint.hasBlueprint(tempBlueprint)){
- Utils.LOG_WARNING("Output slot was not empty.");
- Utils.LOG_WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one.");
+ Logger.WARNING("Output slot was not empty.");
+ Logger.WARNING("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one.");
tempItemBlueprint.setBlueprint(this.inventoryHolo.getStackInSlot(1), this.craftMatrix, this.inventoryHolo.getStackInSlot(0));
final ItemStack newTempBlueprint = ItemUtils.getSimpleStack(tempItemBlueprint);
this.inventoryHolo.setInventorySlotContents(1, newTempBlueprint);
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint)));
+ Logger.WARNING(ItemUtils.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint)));
}
else {
if (tempItemBlueprint.hasBlueprint(tempBlueprint)){
- Utils.LOG_WARNING("Blueprint already holds a recipe.");
+ Logger.WARNING("Blueprint already holds a recipe.");
}
else {
- Utils.LOG_WARNING("Output slot was empty.");
+ Logger.WARNING("Output slot was empty.");
}
}
}
else {
- Utils.LOG_WARNING("ItemStack found was not a blueprint.");
+ Logger.WARNING("ItemStack found was not a blueprint.");
}
}
else {
- Utils.LOG_WARNING("No ItemStack found in Blueprint slot.");
+ Logger.WARNING("No ItemStack found in Blueprint slot.");
}
}
else if (x == 3){
- Utils.LOG_WARNING("Player Clicked Big [P] slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Big [P] slot in the Holo Grid");
}
else if (x == 4){
- Utils.LOG_WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Transfer to Crafting Grid slot in the Holo Grid");
}
else if (x == 5){
- Utils.LOG_WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid");
+ Logger.WARNING("Player Clicked Transfer to Storage Grid slot in the Holo Grid");
}
}
}
for (final int x : this.slotCrafting){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the crafting Grid");
}
}
for (final int x : this.slotStorage){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the storage Grid");
}
}
for (final int x : this.slotTools){
if (aSlotIndex == x){
- Utils.LOG_WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid");
+ Logger.WARNING("Player Clicked slot "+aSlotIndex+" in the tool Grid");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
index 5eb6e91812..5233c876e9 100644
--- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
+++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
@@ -2,19 +2,19 @@ package gtPlusPlus.core.entity;
import cpw.mods.fml.common.registry.EntityRegistry;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
import gtPlusPlus.core.entity.projectile.EntityHydrofluoricAcidPotion;
import gtPlusPlus.core.entity.projectile.EntitySulfuricAcidPotion;
import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
-import gtPlusPlus.core.util.Utils;
public class InternalEntityRegistry {
static int mEntityID = 0;
public static void registerEntities(){
- Utils.LOG_INFO("Registering GT++ Entities.");
+ Logger.INFO("Registering GT++ Entities.");
//EntityRegistry.registerModEntity(EntityMiningChargePrimed.class, "MiningCharge", 3, Main.modInstance, 64, 20, true);
EntityRegistry.registerModEntity(EntityPrimedMiningExplosive.class, "MiningCharge", mEntityID++, GTplusplus.instance, 64, 20, true);
EntityRegistry.registerModEntity(EntitySulfuricAcidPotion.class, "throwablePotionSulfuric", mEntityID++, GTplusplus.instance, 64, 20, true);
diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java b/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
index 13ecf99bc1..4e2a4c4439 100644
--- a/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
+++ b/src/Java/gtPlusPlus/core/entity/monster/EntitySickBlaze.java
@@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.entity.projectile.EntityToxinballSmall;
import net.minecraft.entity.Entity;
import net.minecraft.entity.SharedMonsterAttributes;
-import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@@ -216,4 +215,9 @@ public class EntitySickBlaze extends EntityMob {
protected boolean isValidLightLevel() {
return true;
}
+
+ @Override
+ public int getMaxSpawnedInChunk() {
+ return 8;
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java
index 2cbd00bf2c..cd7878273f 100644
--- a/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java
+++ b/src/Java/gtPlusPlus/core/entity/monster/EntityStaballoyConstruct.java
@@ -1,45 +1,78 @@
package gtPlusPlus.core.entity.monster;
+import java.lang.reflect.Field;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.core.world.explosions.ExplosionHandler;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.*;
+import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.*;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
import net.minecraft.village.Village;
import net.minecraft.world.World;
public class EntityStaballoyConstruct extends EntityIronGolem {
- /** deincrements, and a distance-to-home check is done at 0 */
- private int homeCheckTimer;
- Village villageObj;
- private int attackTimer;
- private int holdRoseTick;
+
+ /*
+ * Determines whether or not the entity is in a fluid at all.
+ */
+ private volatile boolean inFluid = false;
+ private volatile boolean mReflectFirstUpdate = true;
+ private volatile boolean isReadyToExplode = false;
+ private volatile int fuse = 60;
+ private volatile int attackTimer;
public EntityStaballoyConstruct(World world) {
super(world);
+ this.experienceValue = 250;
this.setSize(1.4F, 2.9F);
this.getNavigator().setAvoidsWater(true);
+ this.getNavigator().setBreakDoors(true);
+ this.getNavigator().setCanSwim(false);
+ this.getNavigator().setAvoidSun(false);
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, true));
- //this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
+ this.tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
//this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
- this.tasks.addTask(2, new EntityAIMoveTowardsRestriction(this, 1.0D));
- this.tasks.addTask(3, new EntityAIWander(this, 0.6D));
- this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
- this.tasks.addTask(5, new EntityAILookIdle(this));
+ this.tasks.addTask(3, new EntityAIMoveTowardsRestriction(this, 1.0D));
+ this.tasks.addTask(4, new EntityAIWander(this, 0.6D));
+ this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
+ this.tasks.addTask(6, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
- //this.targetTasks.addTask(2,
- //new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
+ this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, true, IMob.mobSelector));
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ @Override
+ public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
+ super.writeEntityToNBT(p_70014_1_);
+ p_70014_1_.setBoolean("inFluid", this.inFluid);
+ p_70014_1_.setBoolean("isReadyToExplode", this.isReadyToExplode);
+ p_70014_1_.setInteger("fuse", this.fuse);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ @Override
+ public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
+ super.readEntityFromNBT(p_70037_1_);
+ this.inFluid = p_70037_1_.getBoolean("inFluid");
+ this.isReadyToExplode = p_70037_1_.getBoolean("isReadyToExplode");
+ this.fuse = p_70037_1_.getInteger("fuse");
}
@Override
@@ -61,11 +94,6 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
*/
@Override
protected void updateAITick() {
- if (--this.homeCheckTimer <= 0) {
- this.homeCheckTimer = 70 + this.rand.nextInt(50);
- this.detachHome();
- }
-
super.updateAITick();
}
@@ -81,7 +109,7 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
*/
@Override
protected int decreaseAirSupply(int p_70682_1_) {
- return p_70682_1_;
+ return 0;
}
@Override
@@ -106,10 +134,6 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
--this.attackTimer;
}
- if (this.holdRoseTick > 0) {
- --this.holdRoseTick;
- }
-
if (this.motionX * this.motionX + this.motionZ * this.motionZ > 2.500000277905201E-7D
&& this.rand.nextInt(5) == 0) {
int i = MathHelper.floor_double(this.posX);
@@ -117,8 +141,8 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
int k = MathHelper.floor_double(this.posZ);
Block block = this.worldObj.getBlock(i, j, k);
-
-
+
+
if (block.getMaterial() != Material.air) {
this.worldObj.spawnParticle(
"blockcrack_" + Block.getIdFromBlock(block) + "_" + this.worldObj.getBlockMetadata(i, j, k),
@@ -135,27 +159,8 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
* Returns true if this entity can attack entities of the specified class.
*/
@Override
- public boolean canAttackClass(Class p_70686_1_) {
- return this.isPlayerCreated() && EntityPlayer.class.isAssignableFrom(p_70686_1_) ? false
- : super.canAttackClass(p_70686_1_);
- }
-
- /**
- * (abstract) Protected helper method to write subclass entity data to NBT.
- */
- @Override
- public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
- super.writeEntityToNBT(p_70014_1_);
- p_70014_1_.setBoolean("PlayerCreated", this.isPlayerCreated());
- }
-
- /**
- * (abstract) Protected helper method to read subclass entity data from NBT.
- */
- @Override
- public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
- super.readEntityFromNBT(p_70037_1_);
- this.setPlayerCreated(p_70037_1_.getBoolean("PlayerCreated"));
+ public boolean canAttackClass(Class clazz) {
+ return clazz.equals(this.getClass()) ? false : true;
}
@Override
@@ -180,28 +185,22 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
this.attackTimer = 10;
this.playSound("mob.irongolem.throw", 1.0F, 1.0F);
}
- else if (p_70103_1_ == 11) {
- this.holdRoseTick = 400;
- }
else {
super.handleHealthUpdate(p_70103_1_);
}
}
+ @Override
public Village getVillage() {
return null;
}
+ @Override
@SideOnly(Side.CLIENT)
public int getAttackTimer() {
return this.attackTimer;
}
- public void setHoldingRose(boolean p_70851_1_) {
- this.holdRoseTick = p_70851_1_ ? 400 : 0;
- this.worldObj.setEntityState(this, (byte) 11);
- }
-
/**
* Returns the sound this mob makes when it is hurt.
*/
@@ -220,7 +219,7 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
@Override
protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_) {
- //this.playSound("mob.irongolem.walk", 1.0F, 1.0F);
+ this.playSound("mob.irongolem.walk", 1.0F, 1.0F);
}
/**
@@ -248,14 +247,12 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
}
}
- public int getHoldRoseTick() {
- return this.holdRoseTick;
- }
-
+ @Override
public boolean isPlayerCreated() {
return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
+ @Override
public void setPlayerCreated(boolean p_70849_1_) {
byte b0 = this.dataWatcher.getWatchableObjectByte(16);
@@ -274,4 +271,274 @@ public class EntityStaballoyConstruct extends EntityIronGolem {
public void onDeath(DamageSource p_70645_1_) {
super.onDeath(p_70645_1_);
}
+
+ @Override
+ protected String getLivingSound() { //TODO
+ return super.getLivingSound();
+ }
+
+ @Override
+ public int getTalkInterval() {
+ return 0;
+ }
+
+ @Override
+ protected boolean canDespawn() {
+ return true;
+ }
+
+ @Override
+ public void onEntityUpdate() {
+ //Set Fire Immunity
+ if (!this.isImmuneToFire){
+ this.isImmuneToFire = true;
+ }
+
+ if (this.getHealth() <= (this.getMaxHealth()*MathUtils.randDouble(0.02, 0.15))){
+ float r = MathUtils.randFloat(0, 1);
+ if (r <= 0.1){
+ this.isReadyToExplode = true;
+ }
+ }
+
+ //Handle Exploding
+ if (isReadyToExplode){
+ if (this.fuse-- <= 0){
+ this.setDead();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.explode();
+ }
+ }
+ else {
+
+ int maxFuse = 60;
+ int fuseUsed = maxFuse-this.fuse;
+ float var2 = (float) (fuseUsed * 0.1);
+
+ this.setSize(1.4F+(var2/2), 2.9F+(var2/2));
+
+ float r = MathUtils.randFloat(0, 1);
+ int r2 = MathUtils.randInt(5, 15);
+ for (int o=0;o<r2;o++){
+ if (r <= 0.3){
+ this.worldObj.spawnParticle("smoke", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.6){
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ if (r <= 0.3){
+ this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.7){
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ if (r <= 0.2){
+ this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.5){
+ this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.7){
+ this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-2, 2), this.posY+MathUtils.randDouble(-2, 2), this.posZ+MathUtils.randDouble(-2, 2), 0.0D, 0.0D, 0.0D);
+
+ }
+ }
+
+
+ }
+ }
+
+ //Get a private field from a super class if it exists.
+ try {
+ if (ReflectionUtils.getField(Class.forName("net.minecraft.entity.Entity"), "firstUpdate") != null && mReflectFirstUpdate == true){
+ Field x = ReflectionUtils.getField(Class.forName("net.minecraft.entity.Entity"), "firstUpdate");
+ try {
+ this.mReflectFirstUpdate = (boolean) x.get(this);
+ Logger.REFLECTION("Successfully got 'firstUpdate' variable state via reflection.");
+ }
+ catch (IllegalArgumentException | IllegalAccessException e) {}
+ }
+ }
+ catch (NoSuchFieldException | ClassNotFoundException e) {}
+ super.onEntityUpdate();
+ }
+
+ @Override
+ public int getMaxSpawnedInChunk() {
+ return 1;
+ }
+
+ @Override
+ public boolean canBreatheUnderwater() {
+ return true;
+ }
+
+ @Override
+ public void knockBack(Entity p_70653_1_, float p_70653_2_, double p_70653_3_, double p_70653_5_) {
+ // Do Nothing because he weighs metric shittonnes.
+ }
+
+ @Override
+ protected void setOnFireFromLava() {
+ extinguish();
+ }
+
+ @Override
+ public void setFire(int p_70015_1_) {
+ extinguish();
+ }
+
+ @Override
+ protected void dealFireDamage(int p_70081_1_) {
+
+ }
+
+ @Override
+ public boolean isInWater() {
+ if (super.isInWater()){
+ return true;
+ }
+ else {
+ this.moveForward *= 0.98F;
+ return false;
+ }
+ }
+
+ @Override
+ public boolean handleWaterMovement() {
+ this.moveForward *= 0.74F;
+ return handleFluidMovement(Material.water);
+ }
+
+ @Override
+ public boolean handleLavaMovement() {
+ this.moveForward *= 0.74F;
+ return handleFluidMovement(Material.lava);
+ }
+
+ /**
+ * Returns if this entity is in water and will end up adding the waters velocity to the entity
+ */
+ public boolean handleFluidMovement(Material fluid){
+
+
+
+ if (this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.4000000059604645D, 0.0D).contract(0.001D, 0.001D, 0.001D), fluid, this))
+ {
+ if (!this.inFluid && !this.mReflectFirstUpdate)
+ {
+ float f = MathHelper.sqrt_double(this.motionX * this.motionX * 0.20000000298023224D + this.motionY * this.motionY + this.motionZ * this.motionZ * 0.20000000298023224D) * 0.2F;
+
+ if (f > 1.0F)
+ {
+ f = 1.0F;
+ }
+
+ this.playSound(this.getSplashSound(), f, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.4F);
+ float f1 = MathHelper.floor_double(this.boundingBox.minY);
+ int i;
+ float f2;
+ float f3;
+
+ for (i = 0; i < 1.0F + this.width * 20.0F; ++i)
+ {
+ f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
+ f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
+ this.worldObj.spawnParticle("bubble", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY - this.rand.nextFloat() * 0.2F, this.motionZ);
+ }
+
+ for (i = 0; i < 1.0F + this.width * 20.0F; ++i)
+ {
+ f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
+ f3 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width;
+ this.worldObj.spawnParticle("splash", this.posX + f2, f1 + 1.0F, this.posZ + f3, this.motionX, this.motionY, this.motionZ);
+ }
+ }
+ this.fallDistance = 0.0F;
+ this.inFluid = true;
+ }
+ else
+ {
+ this.inFluid = false;
+ }
+ return this.inFluid;
+ }
+
+ @Override
+ public void onChunkLoad() {
+ // TODO Auto-generated method stub
+ super.onChunkLoad();
+ }
+
+ @Override
+ public void onStruckByLightning(EntityLightningBolt p_70077_1_) {
+ this.isReadyToExplode = true;
+ this.fuse = 20;
+ }
+
+ private void explode(){
+ /* float f = 12.0F;
+ this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, f, true);*/
+
+ final float f = 16F;
+ ExplosionHandler explode = new ExplosionHandler();
+ explode.createExplosion(this.worldObj, this, this.posX, this.posY, this.posZ, f, true, true);
+
+ float r = MathUtils.randFloat(0, 1);
+ int r2 = MathUtils.randInt(20, 40);
+ for (int o=0;o<r2;o++){
+ if (r <= 0.3){
+ this.worldObj.spawnParticle("smoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(0, 3), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.6){
+ this.worldObj.spawnParticle("largesmoke", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ if (r <= 0.3){
+ this.worldObj.spawnParticle("cloud", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.7){
+ this.worldObj.spawnParticle("flame", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ if (r <= 0.2){
+ this.worldObj.spawnParticle("explode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.5){
+ this.worldObj.spawnParticle("largeexplode", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ else if (r <= 0.7){
+ this.worldObj.spawnParticle("hugeexplosion", this.posX+MathUtils.randDouble(-4, 4), this.posY+MathUtils.randDouble(-4, 4), this.posZ+MathUtils.randDouble(-4, 4), 0.0D, 0.0D, 0.0D);
+
+ }
+ }
+
+ }
+
+ @Override
+ public boolean canAttackWithItem() {
+ return true;
+ }
+
+ @Override
+ public boolean canRenderOnFire() {
+ return false;
+ }
+
+ @Override
+ public boolean isPushedByWater() {
+ return false;
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java
index 8b86d456b7..c935409650 100644
--- a/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityHydrofluoricAcidPotion.java
@@ -5,10 +5,8 @@ import gtPlusPlus.core.util.array.BlockPos;
import gtPlusPlus.core.util.entity.EntityUtils;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
@@ -34,6 +32,7 @@ public class EntityHydrofluoricAcidPotion extends EntityThrowable {
/**
* Called when this EntityThrowable hits a block or entity.
*/
+ @Override
protected void onImpact(MovingObjectPosition object) {
int xBlock = object.blockX;
int yBlock = object.blockY;
@@ -41,7 +40,7 @@ public class EntityHydrofluoricAcidPotion extends EntityThrowable {
if (object.entityHit != null) {
byte b0 = 6;
if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0);
+ object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
EntityUtils.setEntityOnFire(object.entityHit, 5);
if (object.entityHit instanceof EntityPlayer){
diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
index 38bcb42791..cd4bec52bf 100644
--- a/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/entity/projectile/EntitySulfuricAcidPotion.java
@@ -29,6 +29,7 @@ public class EntitySulfuricAcidPotion extends EntityThrowable {
/**
* Called when this EntityThrowable hits a block or entity.
*/
+ @Override
protected void onImpact(MovingObjectPosition object) {
int xBlock = object.blockX;
int yBlock = object.blockY;
@@ -36,7 +37,7 @@ public class EntitySulfuricAcidPotion extends EntityThrowable {
if (object.entityHit != null) {
byte b0 = 6;
if (!GT_Utility.isWearingFullRadioHazmat((EntityLivingBase) object.entityHit)){
- object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) b0);
+ object.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
EntityUtils.setEntityOnFire(object.entityHit, 10);
object.entityHit.fireResistance = 0;
ravage(EntityUtils.findBlockPosUnderEntity(object.entityHit));
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java
index ea4d4ff2b8..70c4ce423a 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_TradeTable.java
@@ -4,10 +4,10 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.container.Container_TradeTable;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
@@ -27,13 +27,13 @@ public class GUI_TradeTable extends GuiContainer {
if (te == null){
this.mThisTable = null;
this.mOwnerName = mOwnerName;
- Utils.LOG_INFO("Set invalid TE in GUI");
+ Logger.INFO("Set invalid TE in GUI");
}
else {
if (te.isServerSide()){
mThisTable = te;
this.mOwnerName = mOwnerName;
- Utils.LOG_INFO("Set valid TE in GUI");
+ Logger.INFO("Set valid TE in GUI");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/handler/BookHandler.java b/src/Java/gtPlusPlus/core/handler/BookHandler.java
index 98b7fd5485..f62d3d869d 100644
--- a/src/Java/gtPlusPlus/core/handler/BookHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/BookHandler.java
@@ -3,8 +3,8 @@ package gtPlusPlus.core.handler;
import java.util.HashMap;
import java.util.Map;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.init.Items;
@@ -22,7 +22,7 @@ public class BookHandler {
public static void run(){
- Utils.LOG_INFO("Writing books.");
+ Logger.INFO("Writing books.");
//Thermal Boiler
book_ThermalBoiler = writeBookTemplate(
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index ad26dbaf39..14f281b2e9 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -7,13 +7,13 @@ import java.util.Queue;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.common.compat.*;
import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler;
import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.*;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.registration.gregtech.*;
@@ -28,7 +28,7 @@ public class COMPAT_HANDLER {
public static void registerMyModsOreDictEntries(){
- Utils.LOG_INFO("Registering Materials with OreDict.");
+ Logger.INFO("Registering Materials with OreDict.");
//In-house
//tools
diff --git a/src/Java/gtPlusPlus/core/handler/GuiHandler.java b/src/Java/gtPlusPlus/core/handler/GuiHandler.java
index 4b7e58cf70..c522229771 100644
--- a/src/Java/gtPlusPlus/core/handler/GuiHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/GuiHandler.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.handler;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.container.Container_BackpackBase;
import gtPlusPlus.core.container.Container_FishTrap;
import gtPlusPlus.core.container.Container_Grindle;
@@ -31,7 +32,6 @@ import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.thaumcraft.common.tile.TileFastAlchemyFurnace;
import gtPlusPlus.xmod.thaumcraft.gui.ContainerFastAlchemyFurnace;
import gtPlusPlus.xmod.thaumcraft.gui.GuiFastAlchemyFurnace;
@@ -56,7 +56,7 @@ public class GuiHandler implements IGuiHandler {
public static void init(){
- Utils.LOG_INFO("Registering GUIs.");
+ Logger.INFO("Registering GUIs.");
NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new GuiHandler());
//Register GuiHandler
//NetworkRegistry.INSTANCE.registerGuiHandler(GTplusplus.instance, new GuiHandler());
@@ -87,7 +87,7 @@ public class GuiHandler implements IGuiHandler {
return new Container_Workbench(player.inventory, (TileEntityWorkbench)te);
}
else if (ID == GUI5){
- Utils.LOG_INFO("sad");
+ Logger.INFO("sad");
return new Container_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced)te);
}
@@ -117,7 +117,7 @@ public class GuiHandler implements IGuiHandler {
@Override //GuiModTileEntity
public Object getClientGuiElement(final int ID, final EntityPlayer player, final World world, final int x, final int y, final int z) {
- Utils.LOG_WARNING("getClientGuiElement Called by: "+player+", in world: "+player.dimension+" at x:"+x+", y:"+y+", z:"+z+".");
+ Logger.WARNING("getClientGuiElement Called by: "+player+", in world: "+player.dimension+" at x:"+x+", y:"+y+", z:"+z+".");
final TileEntity te = world.getTileEntity(x, y, z);
if (te != null){
if (ID == GUI1){
@@ -140,7 +140,7 @@ public class GuiHandler implements IGuiHandler {
return new GUI_Workbench(player.inventory, (TileEntityWorkbench)te);
}
else if (ID == GUI5){
- Utils.LOG_INFO("sad");
+ Logger.INFO("sad");
return new GUI_WorkbenchAdvanced(player.inventory, (TileEntityWorkbenchAdvanced)te);
}
else if (ID == GUI6){
diff --git a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java
index 1c023b7304..6f968f4ab0 100644
--- a/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/OldCircuitHandler.java
@@ -11,8 +11,8 @@ import gregtech.api.enums.GT_Values;
import gregtech.api.util.EmptyRecipeMap;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
public class OldCircuitHandler {
@@ -33,15 +33,15 @@ public class OldCircuitHandler {
private static boolean removeCircuitRecipeMap(){
try {
- Utils.LOG_INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added.");
+ Logger.INFO("[Old Feature - Circuits] Trying to override the Circuit Assembler Recipe map, so that no recipes for new circuits get added.");
ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false));
Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes");
FieldUtils.removeFinalModifier(jaffar, true);
jaffar.set(null, new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false));
- Utils.LOG_INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes.");
+ Logger.INFO("[Old Feature - Circuits] Successfully replaced circuit assembler recipe map with one that cannot hold recipes.");
}
catch (Exception e) {
- Utils.LOG_INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map.");
+ Logger.INFO("[Old Feature - Circuits] Failed removing circuit assembler recipe map.");
return false;
}
return true;
diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java
index a24b08d781..5bf6374725 100644
--- a/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/Recipes/LateRegistrationHandler.java
@@ -1,8 +1,8 @@
package gtPlusPlus.core.handler.Recipes;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.handler.COMPAT_HANDLER;
import gtPlusPlus.core.recipe.ShapedRecipeObject;
-import gtPlusPlus.core.util.Utils;
public class LateRegistrationHandler {
@@ -20,9 +20,9 @@ public class LateRegistrationHandler {
try {
Thread.sleep(10);
} catch (final InterruptedException e) {
- Utils.LOG_INFO(e.toString());
+ Logger.INFO(e.toString());
}
- Utils.LOG_INFO("Late Recipes Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
+ Logger.INFO("Late Recipes Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
}
}
diff --git a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java b/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java
index e887607827..9eb6d1171c 100644
--- a/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/Recipes/RegistrationHandler.java
@@ -1,8 +1,8 @@
package gtPlusPlus.core.handler.Recipes;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.handler.COMPAT_HANDLER;
import gtPlusPlus.core.recipe.*;
-import gtPlusPlus.core.util.Utils;
public class RegistrationHandler {
@@ -21,7 +21,7 @@ public class RegistrationHandler {
RECIPE_Batteries.RECIPES_LOAD();
RECIPES_General.RECIPES_LOAD();
//RECIPES_MTWRAPPER.run();
- Utils.LOG_INFO("Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
+ Logger.INFO("Loaded: "+recipesSuccess+" Failed: "+recipesFailed);
COMPAT_HANDLER.areInitItemsLoaded = true;
//Utils.LOG_INFO("MT Loaded: "+RECIPES_MTWRAPPER.MT_RECIPES_LOADED+" MT Failed: "+RECIPES_MTWRAPPER.MT_RECIPES_FAILED);
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
index 4b5bc96006..cd79cf7fe6 100644
--- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
@@ -11,10 +11,10 @@ import java.util.Random;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gtPlusPlus.api.analytics.SegmentAnalytics;
import gtPlusPlus.api.analytics.SegmentHelper;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
@@ -107,7 +107,7 @@ public class BlockEventHandler {
}
}
else {
- Utils.LOG_WARNING("invalid chance");
+ Logger.WARNING("invalid chance");
}
}
@@ -129,15 +129,15 @@ public class BlockEventHandler {
}
}
- Utils.LOG_WARNING("Found Limestone in OreDict.");
+ Logger.WARNING("Found Limestone in OreDict.");
if (!mBlockTypes.isEmpty()) {
- Utils.LOG_WARNING("1a | "+event.block.getUnlocalizedName());
+ Logger.WARNING("1a | "+event.block.getUnlocalizedName());
for (final Block temp : mBlockTypes){
- Utils.LOG_WARNING("2a - "+temp.getUnlocalizedName());
+ Logger.WARNING("2a - "+temp.getUnlocalizedName());
if (event.block == temp) {
- Utils.LOG_WARNING("3a - found "+temp.getUnlocalizedName());
+ Logger.WARNING("3a - found "+temp.getUnlocalizedName());
if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){
- Utils.LOG_WARNING("4a");
+ Logger.WARNING("4a");
event.drops.clear();
event.drops.add(fluoriteOre.copy());
}
@@ -148,9 +148,9 @@ public class BlockEventHandler {
if (event.block.getUnlocalizedName().toLowerCase().contains("limestone")){
- Utils.LOG_WARNING("1c");
+ Logger.WARNING("1c");
if (MathUtils.randInt(1, chanceToDropFluoriteOre) == 1){
- Utils.LOG_WARNING("2c");
+ Logger.WARNING("2c");
event.drops.clear();
event.drops.add(fluoriteOre.copy());
}
@@ -170,7 +170,7 @@ public class BlockEventHandler {
}
}
catch (Throwable r){
- Utils.LOG_INFO("Block Event Handler Failed. Please Report this to Alkalus.");
+ Logger.INFO("Block Event Handler Failed. Please Report this to Alkalus.");
r.printStackTrace();
}
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
index 7629c98eb4..09365e3caf 100644
--- a/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/LoginEventHandler.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import gtPlusPlus.api.analytics.SegmentAnalytics;
import gtPlusPlus.api.analytics.SegmentHelper;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.proxy.ClientProxy;
@@ -52,15 +53,15 @@ public class LoginEventHandler {
if (CORE.ConfigSwitches.enableUpdateChecker){
if (!Utils.isModUpToDate()){
- Utils.LOG_INFO("[GT++] You're not using the latest recommended version of GT++, consider updating.");
+ Logger.INFO("[GT++] You're not using the latest recommended version of GT++, consider updating.");
if (!CORE.MASTER_VERSION.toLowerCase().equals("offline")) {
- Utils.LOG_INFO("Latest version is: "+CORE.MASTER_VERSION);
+ Logger.INFO("Latest version is: "+CORE.MASTER_VERSION);
}
- Utils.LOG_INFO("You currently have: "+CORE.VERSION);
+ Logger.INFO("You currently have: "+CORE.VERSION);
ShortTimer(this.localPlayerRef, 20);
}
else {
- Utils.LOG_INFO("You're using the latest recommended version of GT++.");
+ Logger.INFO("You're using the latest recommended version of GT++.");
}
}
@@ -109,7 +110,7 @@ public class LoginEventHandler {
}
} catch (final Throwable errr){
- Utils.LOG_INFO("Login Handler encountered an error.");
+ Logger.INFO("Login Handler encountered an error.");
}
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java
index dff8d3049e..aa9155d654 100644
--- a/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/PickaxeBlockBreakEventHandler.java
@@ -5,7 +5,7 @@ import java.util.UUID;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.*;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase;
import net.minecraft.block.Block;
@@ -21,7 +21,7 @@ public class PickaxeBlockBreakEventHandler {
final TileEntity entity = event.world.getTileEntity(event.x, event.y, event.z);
if (entity != null){
final EntityPlayer playerInternal = event.getPlayer();
- Utils.LOG_WARNING(entity.getClass().getSimpleName());
+ Logger.WARNING(entity.getClass().getSimpleName());
if (entity.getClass().getSimpleName().equals("")){
}
@@ -32,12 +32,12 @@ public class PickaxeBlockBreakEventHandler {
final UUID ownerUUID = ((GregtechMetaSafeBlockBase)X).ownerUUID;
final UUID accessorUUID = playerInternal.getUniqueID();
- Utils.LOG_WARNING("Owner UUID: "+ownerUUID);
- Utils.LOG_WARNING("Accessor UUID: "+accessorUUID);
+ Logger.WARNING("Owner UUID: "+ownerUUID);
+ Logger.WARNING("Accessor UUID: "+accessorUUID);
if (((GregtechMetaSafeBlockBase)X).bUnbreakable){
- Utils.LOG_INFO("UUID info. Accessor: "+accessorUUID + " | Owner: "+ownerUUID);
+ Logger.INFO("UUID info. Accessor: "+accessorUUID + " | Owner: "+ownerUUID);
if (accessorUUID == ownerUUID){
PlayerUtils.messagePlayer(playerInternal, "Since you own this block, it has been destroyed.");
diff --git a/src/Java/gtPlusPlus/core/handler/events/SneakManager.java b/src/Java/gtPlusPlus/core/handler/events/SneakManager.java
index 02072fe32f..c504a46e82 100644
--- a/src/Java/gtPlusPlus/core/handler/events/SneakManager.java
+++ b/src/Java/gtPlusPlus/core/handler/events/SneakManager.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.handler.events;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.client.Minecraft;
public class SneakManager {
@@ -41,7 +41,7 @@ public class SneakManager {
}
private static State toggleState(final State state){
- Utils.LOG_INFO("State Toggle");
+ Logger.INFO("State Toggle");
if (state == State.ON) {
return State.OFF;
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java b/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
index ab11e483ed..39cd7d166d 100644
--- a/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
+++ b/src/Java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.handler.events;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.*;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
@@ -24,7 +24,7 @@ public class UnbreakableBlockManager{
this.makeIndestructible(/*aPlayer*/);
}
else {
- Utils.LOG_WARNING("Why do you run twice?");
+ Logger.WARNING("Why do you run twice?");
}
}
@@ -37,18 +37,18 @@ public class UnbreakableBlockManager{
private void makeIndestructible(/*EntityPlayer aPlayer*/){
- Utils.LOG_WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible.");
+ Logger.WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible.");
final int X = mTileEntity.xCoord; //(GregtechMetaSafeBlock) this.mTileEntity.getXCoord();
final int Y = mTileEntity.yCoord;
final int Z = mTileEntity.zCoord;
- Utils.LOG_WARNING("Grabbing TileEntity @ [x,y,z] |"+X+"|"+Y+"|"+Z+"|");
+ Logger.WARNING("Grabbing TileEntity @ [x,y,z] |"+X+"|"+Y+"|"+Z+"|");
try{
final GregtechMetaSafeBlock MetaSafeBlock = ((GregtechMetaSafeBlock) UnbreakableBlockManager.mTileEntity.getMetaTileEntity());
final TileEntity BaseMetaTileEntity = mTileEntity.getTileEntity(X, Y, Z);
//MetaSafeBlockBase.
final World TE_WORLD = MetaSafeBlock.getBaseMetaTileEntity().getWorld();
- Utils.LOG_WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
final TileEntity entity = BaseMetaTileEntity;
innerInvincible(MetaSafeBlock, entity, TE_WORLD, /*aPlayer,*/ X, Y, Z);
}
@@ -61,26 +61,26 @@ public class UnbreakableBlockManager{
private static void innerInvincible(final GregtechMetaSafeBlock MetaSafeBlock, final TileEntity entity, final World TE_WORLD, /*EntityPlayer aPlayer,*/ final int X, final int Y, final int Z){
if (entity != null){
- Utils.LOG_WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Utils.LOG_WARNING("Grabbed TE: "+entity.toString());
+ Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("Grabbed TE: "+entity.toString());
if ((entity instanceof BaseTileEntity) && !(entity instanceof BaseMetaPipeEntity)){
final IMetaTileEntity I = ((BaseMetaTileEntity)entity).getMetaTileEntity();
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Utils.LOG_WARNING("I Details: "+I.getMetaName()+" | "+I.getTileEntityBaseType()+" | "+I.toString());
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("I Details: "+I.getMetaName()+" | "+I.getTileEntityBaseType()+" | "+I.toString());
if (I instanceof GregtechMetaSafeBlock){
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
final Block ThisBlock = I.getBaseMetaTileEntity().getBlock(X, Y, Z);
- Utils.LOG_WARNING("Block Details: "+ThisBlock.toString());
+ Logger.WARNING("Block Details: "+ThisBlock.toString());
if (((GregtechMetaSafeBlock)I).bUnbreakable){
@@ -88,11 +88,11 @@ public class UnbreakableBlockManager{
//ThisBlock.setResistance(18000000.0F);
ThisBlock.setResistance(-1);
ThisBlock.setBlockUnbreakable();
- Utils.LOG_WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=true");
+ Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=true");
MetaSafeBlock.bUnbreakable = true;
//entity.markDirty();
- Utils.LOG_WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Utils.LOG_ERROR("New Indestructible Flag enabled.");
+ Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.ERROR("New Indestructible Flag enabled.");
//GT_Utility.sendChatToPlayer(aPlayer, "Block is now unbreakable.");
}
@@ -102,32 +102,32 @@ public class UnbreakableBlockManager{
else {
ThisBlock.setHardness(1);
ThisBlock.setResistance(1.0F);
- Utils.LOG_WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=false");
+ Logger.WARNING("Changing State of Flag. Old Value="+MetaSafeBlock.bUnbreakable+" Expected Value=false");
MetaSafeBlock.bUnbreakable = false;
//entity.markDirty();
- Utils.LOG_WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
- Utils.LOG_ERROR("New Indestructible Flag disabled.");
+ Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.ERROR("New Indestructible Flag disabled.");
//GT_Utility.sendChatToPlayer(aPlayer, "Block is now breakable.");
}
//entity.markDirty();
- Utils.LOG_WARNING("Block Hardness: "+ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z));
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("Block Hardness: "+ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z));
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
hasRun = false;
}
else {
- Utils.LOG_WARNING("I is not an instanceof MetaSafeBlockBase");
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("I is not an instanceof MetaSafeBlockBase");
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
}
} else {
- Utils.LOG_WARNING("TE is not an instanceof BaseTileEntity or may be a pipe.");
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("TE is not an instanceof BaseTileEntity or may be a pipe.");
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
}
}else {
- Utils.LOG_WARNING("Did not grab a TE instance to make a block instance from.");
- Utils.LOG_WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
+ Logger.WARNING("Did not grab a TE instance to make a block instance from.");
+ Logger.WARNING("Checking State of Flag[nUnbreakable]. Value="+MetaSafeBlock.bUnbreakable);
}
}
diff --git a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java
index d40ed64f4d..877b0c6ced 100644
--- a/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/ZombieBackupSpawnEventHandler.java
@@ -8,7 +8,7 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gtPlusPlus.api.analytics.SegmentHelper;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraftforge.event.entity.living.ZombieEvent;
public class ZombieBackupSpawnEventHandler {
@@ -32,7 +32,7 @@ public class ZombieBackupSpawnEventHandler {
if (event.attacker != null){
SegmentHelper.getInstance().trackUser(event.attacker.getUniqueID().toString(), "Zombie Backup");
}
- Utils.LOG_WARNING("[Zombie] ZombieEvent.SummonAidEvent.");
+ Logger.WARNING("[Zombie] ZombieEvent.SummonAidEvent.");
event.setResult(Result.DENY);
}
catch(Throwable t){}
@@ -41,9 +41,9 @@ public class ZombieBackupSpawnEventHandler {
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onZombieReinforcement(final ZombieEvent event) {
try {
- Utils.LOG_WARNING("[Zombie] ZombieEvent.");
+ Logger.WARNING("[Zombie] ZombieEvent.");
if (event.entity != null){
- Utils.LOG_WARNING("Event Entity: "+event.entity.getCommandSenderName());
+ Logger.WARNING("Event Entity: "+event.entity.getCommandSenderName());
}
event.setResult(Result.DENY);
}
diff --git a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java
index 951f69723c..1401cb04cc 100644
--- a/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/workbench/Workbench_CraftingHandler.java
@@ -97,7 +97,7 @@ public class Workbench_CraftingHandler {
if (hashmap.containsKey(Character.valueOf(c)))
{
- aitemstack[i1] = ((ItemStack)hashmap.get(Character.valueOf(c))).copy();
+ aitemstack[i1] = hashmap.get(Character.valueOf(c)).copy();
}
else
{
@@ -185,7 +185,7 @@ public class Workbench_CraftingHandler {
for (int k = 0; k < this.recipes.size(); k++)
{
- final IRecipe irecipe = (IRecipe)this.recipes.get(k);
+ final IRecipe irecipe = this.recipes.get(k);
if (irecipe.matches(par1InventoryCrafting, par2World))
{
diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
index acec3f35ea..702a2c8670 100644
--- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
+++ b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.inventories;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCraftResult;
@@ -190,25 +190,25 @@ public class InventoryWorkbenchHoloSlots implements IInventory{
public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_)
{
if (this.getStackInSlot(0) != null){
- Utils.LOG_INFO("getStackInSlot(0) contains "+this.getStackInSlot(0).getDisplayName());
+ Logger.INFO("getStackInSlot(0) contains "+this.getStackInSlot(0).getDisplayName());
if (this.stackResult[0] == null){
- Utils.LOG_INFO("this.stackResult[0] == null");
+ Logger.INFO("this.stackResult[0] == null");
this.stackResult[0] = this.getStackInSlot(0);
}
else if (this.stackResult[0] != null){
- Utils.LOG_INFO("this.stackResult[0] != null");
+ Logger.INFO("this.stackResult[0] != null");
if (this.stackResult[0].getDisplayName().toLowerCase().equals(this.getStackInSlot(0).getDisplayName().toLowerCase())){
- Utils.LOG_INFO("Items are the same?");
+ Logger.INFO("Items are the same?");
}
else {
- Utils.LOG_INFO("Items are not the same.");
+ Logger.INFO("Items are not the same.");
}
}
}
if (this.stackResult[0] != null)
{
- Utils.LOG_INFO("this.stackResult[0] != null - Really never should be though. - Returning "+this.stackResult[0].getDisplayName());
+ Logger.INFO("this.stackResult[0] != null - Really never should be though. - Returning "+this.stackResult[0].getDisplayName());
final ItemStack itemstack = this.stackResult[0];
this.stackResult[0] = null;
return itemstack;
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 387315a885..b9b204cc3b 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -6,6 +6,7 @@ import static gtPlusPlus.core.lib.CORE.LOAD_ALL_CONTENT;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.common.compat.COMPAT_Baubles;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.BaseEuItem;
@@ -502,7 +503,7 @@ public final class ModItems {
} catch (final Throwable r){
- Utils.LOG_INFO("Failed to Generated a Material. "+r.getMessage());
+ Logger.INFO("Failed to Generated a Material. "+r.getMessage());
//Utils.LOG_INFO("Failed to Generated a Material. "+r.getCause().getMessage());
//Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[0].getMethodName());
//Utils.LOG_INFO("Failed to Generated a Material. "+r.getStackTrace()[1].getMethodName());
@@ -692,7 +693,7 @@ public final class ModItems {
//EnderIO Resources
if ((LoadedMods.EnderIO || LOAD_ALL_CONTENT)){
- Utils.LOG_INFO("EnderIO Found - Loading Resources.");
+ Logger.INFO("EnderIO Found - Loading Resources.");
//Enderio Dusts
itemDustSoularium = ItemUtils.generateSpecialUseDusts("Soularium", "Soularium", MaterialEIO.SOULARIUM.vChemicalFormula, MaterialEIO.SOULARIUM.getRgbAsHex())[0];
itemDustRedstoneAlloy = ItemUtils.generateSpecialUseDusts("RedstoneAlloy", "Redstone Alloy", MaterialEIO.REDSTONE_ALLOY.vChemicalFormula, MaterialEIO.REDSTONE_ALLOY.getRgbAsHex())[0];
@@ -718,24 +719,24 @@ public final class ModItems {
GT_OreDictUnificator.registerOre("platePhasedIron", ItemUtils.getSimpleStack(itemPlatePulsatingIron));
}
else {
- Utils.LOG_WARNING("EnderIO not Found - Skipping Resources.");
+ Logger.WARNING("EnderIO not Found - Skipping Resources.");
}
//Big Reactors
if (LoadedMods.Big_Reactors|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("BigReactors Found - Loading Resources.");
+ Logger.INFO("BigReactors Found - Loading Resources.");
//Item Init
itemPlateBlutonium = ItemUtils.generateSpecialUsePlate("Blutonium", "Blutonium", new short[]{0, 0, 255}, 0);
itemPlateBlutonium = ItemUtils.generateSpecialUsePlate("Cyanite", "Cyanite", new short[]{0, 191, 255}, 0);
itemPlateLudicrite = ItemUtils.generateSpecialUsePlate("Ludicrite", "Ludicrite", new short[]{167, 5, 179}, 0);
}
else {
- Utils.LOG_WARNING("BigReactors not Found - Skipping Resources.");
+ Logger.WARNING("BigReactors not Found - Skipping Resources.");
}
//Thaumcraft
if ((LoadedMods.Thaumcraft|| LOAD_ALL_CONTENT) && !CORE.GTNH){
- Utils.LOG_INFO("Thaumcraft Found - Loading Resources.");
+ Logger.INFO("Thaumcraft Found - Loading Resources.");
//Item Init
try {
ItemUtils.getItemForOreDict("Thaumcraft:ItemResource", "ingotVoidMetal", "Void Metal Ingot", 16);
@@ -747,44 +748,44 @@ public final class ModItems {
}
else {
- Utils.LOG_WARNING("Thaumcraft not Found - Skipping Resources.");
+ Logger.WARNING("Thaumcraft not Found - Skipping Resources.");
}
//Pneumaticraft
if (LoadedMods.PneumaticCraft|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("PneumaticCraft Found - Loading Resources.");
+ Logger.INFO("PneumaticCraft Found - Loading Resources.");
//Item Init
itemPlateCompressedIron = ItemUtils.generateSpecialUsePlate("CompressedIron", "Compressed Iron", new short[]{128, 128, 128}, 0);
}
else {
- Utils.LOG_WARNING("PneumaticCraft not Found - Skipping Resources.");
+ Logger.WARNING("PneumaticCraft not Found - Skipping Resources.");
}
//Simply Jetpacks
if (LoadedMods.Simply_Jetpacks|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("SimplyJetpacks Found - Loading Resources.");
+ Logger.INFO("SimplyJetpacks Found - Loading Resources.");
//Item Init
itemPlateEnrichedSoularium = new RarityUncommon().setUnlocalizedName("itemPlateEnrichedSoularium").setCreativeTab(AddToCreativeTab.tabMisc).setTextureName(CORE.MODID + ":itemPlateSoularium");
//Registry
GameRegistry.registerItem(itemPlateEnrichedSoularium, "itemPlateEnrichedSoularium");
}
else {
- Utils.LOG_WARNING("SimplyJetpacks not Found - Skipping Resources.");
+ Logger.WARNING("SimplyJetpacks not Found - Skipping Resources.");
}
//rfTools
if (LoadedMods.RFTools|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("rfTools Found - Loading Resources.");
+ Logger.INFO("rfTools Found - Loading Resources.");
//Item Init
itemPlateDimensionShard = ItemUtils.generateSpecialUsePlate("DimensionShard", "Dimensional Shard", new short[]{170, 230, 230}, 0);
}
else {
- Utils.LOG_WARNING("rfTools not Found - Skipping Resources.");
+ Logger.WARNING("rfTools not Found - Skipping Resources.");
}
//IC2 Exp
if (LoadedMods.IndustrialCraft2|| LOAD_ALL_CONTENT){
- Utils.LOG_INFO("IndustrialCraft2 Found - Loading Resources.");
+ Logger.INFO("IndustrialCraft2 Found - Loading Resources.");
RfEuBattery = new RF2EU_Battery();
//Baubles Mod Test
@@ -794,14 +795,14 @@ public final class ModItems {
COMPAT_Baubles.run();
}
else {
- Utils.LOG_INFO("Baubles Not Found - Skipping Resources.");
+ Logger.INFO("Baubles Not Found - Skipping Resources.");
}
} catch(final Throwable T){
- Utils.LOG_INFO("Baubles Not Found - Skipping Resources.");
+ Logger.INFO("Baubles Not Found - Skipping Resources.");
}
}
else {
- Utils.LOG_WARNING("IndustrialCraft2 not Found - Skipping Resources.");
+ Logger.WARNING("IndustrialCraft2 not Found - Skipping Resources.");
}
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java
index c85eea4bed..8ae28fc343 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemDamageable.java
@@ -5,8 +5,8 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@@ -159,7 +159,7 @@ public class BaseItemDamageable extends Item {
@Override
public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) {
- Utils.LOG_INFO("Does Leave Table? "+stack.getDisplayName());
+ Logger.INFO("Does Leave Table? "+stack.getDisplayName());
return true;
}
@@ -175,7 +175,7 @@ public class BaseItemDamageable extends Item {
@Override
public boolean hasContainerItem(ItemStack stack) {
- Utils.LOG_INFO("hasContainerItem? "+stack.getDisplayName());
+ Logger.INFO("hasContainerItem? "+stack.getDisplayName());
return true;
}
diff --git a/src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java b/src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java
index 4bff33493e..04bb1d59d8 100644
--- a/src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java
+++ b/src/Java/gtPlusPlus/core/item/base/BasicSpawnEgg.java
@@ -5,8 +5,8 @@ import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLiquid;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -44,7 +44,7 @@ public class BasicSpawnEgg extends ItemMonsterPlacer
this.entityMODID = MODID;
// DEBUG
- Utils.LOG_WARNING("Spawn egg constructor for "+this.entityToSpawnName);
+ Logger.WARNING("Spawn egg constructor for "+this.entityToSpawnName);
}
/**
@@ -174,7 +174,7 @@ public class BasicSpawnEgg extends ItemMonsterPlacer
else
{
//DEBUG
- Utils.LOG_WARNING("Entity not found "+this.entityToSpawnName);
+ Logger.WARNING("Entity not found "+this.entityToSpawnName);
}
}
diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
index 951d2050f5..8baf909af7 100644
--- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java
+++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
@@ -5,8 +5,8 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@@ -175,7 +175,7 @@ public class CoreItem extends Item
if (this.turnsInto != null){
if (entityHolding instanceof EntityPlayer){
- Utils.LOG_INFO("Replacing "+iStack.getDisplayName()+" with "+this.turnsInto.getDisplayName()+".");
+ Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+this.turnsInto.getDisplayName()+".");
final ItemStack tempTransform = this.turnsInto;
if (iStack.stackSize == 64){
tempTransform.stackSize=64;
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
index 6aa1f54cc8..e75d2a69e8 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java
@@ -8,9 +8,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.entity.EntityUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -48,25 +48,25 @@ public class BaseItemDust extends Item{
GameRegistry.registerItem(this, unlocalizedName);
String temp = "";
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
+ Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
if (this.getUnlocalizedName().contains("item.")){
temp = this.getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else {
temp = this.getUnlocalizedName();
}
if (temp.contains("DustTiny")){
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else if (temp.contains("DustSmall")){
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else {
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
if ((temp != null) && !temp.equals("")){
GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this));
@@ -157,7 +157,7 @@ public class BaseItemDust extends Item{
}
private void addMacerationRecipe(){
- Utils.LOG_WARNING("Adding recipe for "+this.materialName+" Dusts");
+ Logger.WARNING("Adding recipe for "+this.materialName+" Dusts");
String tempIngot = this.getUnlocalizedName().replace("item.itemDust", "ingot");
final String tempDust = this.getUnlocalizedName().replace("item.itemDust", "dust");
@@ -168,17 +168,17 @@ public class BaseItemDust extends Item{
return;
}
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
+ Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
if (this.getUnlocalizedName().contains("item.")){
tempIngot = this.getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+tempIngot);
+ Logger.WARNING("Generating OreDict Name: "+tempIngot);
}
else {
tempIngot = this.getUnlocalizedName();
}
tempIngot = tempIngot.replace("itemDust", "ingot");
- Utils.LOG_WARNING("Generating OreDict Name: "+tempIngot);
+ Logger.WARNING("Generating OreDict Name: "+tempIngot);
final ItemStack[] outputStacks = {this.dustInfo.getDust(1)};
if ((tempIngot != null) && !tempIngot.equals("")){
tempInputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempIngot, 1);
@@ -224,30 +224,30 @@ public class BaseItemDust extends Item{
if ((temp != null) && !temp.equals("")){
if (this.dustInfo.requiresBlastFurnace()){
- Utils.LOG_WARNING("Adding recipe for Hot "+this.materialName+" Ingots in a Blast furnace.");
+ Logger.WARNING("Adding recipe for Hot "+this.materialName+" Ingots in a Blast furnace.");
final String tempIngot = temp.replace("ingot", "ingotHot");
final ItemStack tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(tempIngot, 1);
if (null != tempOutputStack){
- Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName() + " Debug: "+tempIngot);
+ Logger.WARNING("This will produce "+tempOutputStack.getDisplayName() + " Debug: "+tempIngot);
this.addBlastFurnaceRecipe(ItemUtils.getSimpleStack(this), null, tempOutputStack, null, 350*this.mTier);
}
return;
}
- Utils.LOG_WARNING("Adding recipe for "+this.materialName+" Ingots in a furnace.");
+ Logger.WARNING("Adding recipe for "+this.materialName+" Ingots in a furnace.");
final ItemStack tempOutputStack = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1);
//Utils.LOG_WARNING("This will produce an ingot of "+tempOutputStack.getDisplayName() + " Debug: "+temp);
if (null != tempOutputStack){
if ((this.mTier < 5) || !this.dustInfo.requiresBlastFurnace()){
if (CORE.GT_Recipe.addSmeltingAndAlloySmeltingRecipe(ItemUtils.getSimpleStack(this), tempOutputStack)){
- Utils.LOG_WARNING("Successfully added a furnace recipe for "+this.materialName);
+ Logger.WARNING("Successfully added a furnace recipe for "+this.materialName);
}
else {
- Utils.LOG_WARNING("Failed to add a furnace recipe for "+this.materialName);
+ Logger.WARNING("Failed to add a furnace recipe for "+this.materialName);
}
}
else if ((this.mTier >= 5) || this.dustInfo.requiresBlastFurnace()){
- Utils.LOG_WARNING("Adding recipe for "+this.materialName+" Ingots in a Blast furnace.");
- Utils.LOG_WARNING("This will produce "+tempOutputStack.getDisplayName());
+ Logger.WARNING("Adding recipe for "+this.materialName+" Ingots in a Blast furnace.");
+ Logger.WARNING("This will produce "+tempOutputStack.getDisplayName());
if (null != tempOutputStack){
this.addBlastFurnaceRecipe(ItemUtils.getSimpleStack(this), null, tempOutputStack, null, 350*this.mTier);
}
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
index f19aaff4b3..2c32c0c8af 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
@@ -6,9 +6,9 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.StringUtils;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -54,25 +54,25 @@ public class BaseItemDustUnique extends Item{
}
String temp = "";
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
+ Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
if (this.getUnlocalizedName().contains("item.")){
temp = this.getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else {
temp = this.getUnlocalizedName();
}
if (temp.contains("DustTiny")){
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else if (temp.contains("DustSmall")){
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
else {
temp = temp.replace("itemD", "d");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
if ((temp != null) && !temp.equals("")){
GT_OreDictUnificator.registerOre(temp, ItemUtils.getSimpleStack(this));
diff --git a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java
index 0467d2647e..5f737b47a0 100644
--- a/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java
+++ b/src/Java/gtPlusPlus/core/item/base/foods/BaseItemHotFood.java
@@ -2,6 +2,7 @@ package gtPlusPlus.core.item.base.foods;
import java.util.List;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -40,7 +41,7 @@ public class BaseItemHotFood extends BaseItemFood{
if (!world.isRemote){
if(iStack.getItemDamage() == this.cooldownTime) {
if (entityHolding instanceof EntityPlayer){
- Utils.LOG_INFO("Foods Done.");
+ Logger.INFO("Foods Done.");
((EntityPlayer) entityHolding).inventory.addItemStackToInventory(ItemUtils.getSimpleStack(this.output));
((EntityPlayer) entityHolding).inventory.consumeInventoryItem(this);
}
diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java
index 0933790de1..26b3ff2ce7 100644
--- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java
+++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java
@@ -1,9 +1,9 @@
package gtPlusPlus.core.item.base.ingots;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -28,13 +28,13 @@ public class BaseItemIngot extends BaseItemComponent{
final ItemStack tempStack = ItemUtils.getSimpleStack(this, 9);
ItemStack tempOutput = null;
String temp = this.getUnlocalizedName().replace("item.itemIngot", "block");
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
+ Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
if (this.getUnlocalizedName().contains("item.")){
temp = this.getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
temp = temp.replace("itemIngot", "block");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
if ((temp != null) && !temp.equals("")){
tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1);
if (tempOutput != null){
diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
index b6f139b74a..329fae509a 100644
--- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
+++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.item.base.ingots;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
@@ -44,7 +45,7 @@ public class BaseItemIngotHot extends BaseItemIngot{
}
private void generateRecipe(){
- Utils.LOG_WARNING("Adding Vacuum Freezer recipe for a Hot Ingot of "+this.materialName+".");
+ Logger.WARNING("Adding Vacuum Freezer recipe for a Hot Ingot of "+this.materialName+".");
GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getSimpleStack(this), this.outputIngot.copy(), 60*this.mTier);
}
diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java
index e821258d8e..8534172bbb 100644
--- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java
+++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot_OLD.java
@@ -3,9 +3,9 @@ package gtPlusPlus.core.item.base.ingots;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.entity.EntityUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -67,13 +67,13 @@ public class BaseItemIngot_OLD extends Item{
final ItemStack tempStack = ItemUtils.getSimpleStack(this, 9);
ItemStack tempOutput = null;
String temp = this.getUnlocalizedName().replace("item.itemIngot", "block");
- Utils.LOG_WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
+ Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName());
if (this.getUnlocalizedName().contains("item.")){
temp = this.getUnlocalizedName().replace("item.", "");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
}
temp = temp.replace("itemIngot", "block");
- Utils.LOG_WARNING("Generating OreDict Name: "+temp);
+ Logger.WARNING("Generating OreDict Name: "+temp);
if ((temp != null) && !temp.equals("")){
tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1);
if (tempOutput != null){
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java
index 44ec66c47b..4ac7c7f5ff 100644
--- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java
+++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java
@@ -1,8 +1,8 @@
package gtPlusPlus.core.item.base.itemblock;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.tileentities.base.TileEntityBase;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
@@ -73,7 +73,7 @@ public class ItemBlockNBT extends ItemBlock {
TileEntityBase tTileEntity = (TileEntityBase) aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity != null && aPlayer != null) {
if (tTileEntity.isServerSide()){
- Utils.LOG_INFO("Setting Tile Entity information");
+ Logger.INFO("Setting Tile Entity information");
NBTTagCompound aNBT = GT_Utility.ItemNBT.getNBT(aStack);
tTileEntity.setOwnerInformation(aNBT.getString("mOwner"), aNBT.getString("mUUID"), aNBT.getBoolean("mOP"));
}
diff --git a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java
index 27059e8fde..96dd2c5a16 100644
--- a/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java
+++ b/src/Java/gtPlusPlus/core/item/base/misc/BaseItemMisc.java
@@ -9,11 +9,8 @@ import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.entity.EntityUtils;
import gtPlusPlus.core.util.item.ItemUtils;
-import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@@ -80,6 +77,7 @@ public class BaseItemMisc extends Item{
@SideOnly(Side.CLIENT)
private IIcon secondIcon;
+ @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister) {
if (this.miscType == MiscTypes.DROP && LoadedMods.Forestry){
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java
new file mode 100644
index 0000000000..f2ca40334f
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java
@@ -0,0 +1,10 @@
+package gtPlusPlus.core.item.base.ore;
+
+import gtPlusPlus.core.material.Material;
+
+public class BaseItemCrushedOre extends BaseOreComponent{
+
+ public BaseItemCrushedOre(final Material material) {
+ super(material, BaseOreComponent.ComponentTypes.CRUSHED);
+ }
+}
diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
new file mode 100644
index 0000000000..d06f1c912a
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java
@@ -0,0 +1,153 @@
+package gtPlusPlus.core.item.base.ore;
+
+import java.util.List;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.state.MaterialState;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.entity.EntityUtils;
+import gtPlusPlus.core.util.item.ItemUtils;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class BaseOreComponent extends Item{
+
+ public final Material componentMaterial;
+ public final String materialName;
+ public final String unlocalName;
+ public final ComponentTypes componentType;
+ public final int componentColour;
+ public Object extraData;
+
+ public BaseOreComponent(final Material material, final ComponentTypes componentType) {
+ this.componentMaterial = material;
+ this.unlocalName = "item"+componentType.COMPONENT_NAME+material.getUnlocalizedName();
+ this.materialName = material.getLocalizedName();
+ this.componentType = componentType;
+ this.setCreativeTab(AddToCreativeTab.tabMisc);
+ this.setUnlocalizedName(this.unlocalName);
+ this.setMaxStackSize(64);
+ this.setTextureName(this.getCorrectTextures());
+ this.componentColour = material.getRgbAsHex();
+ GameRegistry.registerItem(this, this.unlocalName);
+ GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this));
+ }
+
+ public String getCorrectTextures(){
+ if (!CORE.ConfigSwitches.useGregtechTextures){
+ return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME;
+ }
+
+ /*if (this.componentType == ComponentTypes.GEAR){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt";
+ }
+ else if (this.componentType == ComponentTypes.SMALLGEAR){
+ return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGtSmall";
+ }*/
+
+ return "gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME.toLowerCase();
+ }
+
+ @Override
+ public String getItemStackDisplayName(final ItemStack p_77653_1_) {
+ if (this.componentMaterial != null) {
+ return (this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME);
+ }
+ return this.materialName+" Cell";
+ }
+
+ public final String getMaterialName() {
+ return this.materialName;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+
+ if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){
+
+ if (this.componentMaterial != null){
+ if (!this.componentMaterial.vChemicalFormula.equals("??") && !this.componentMaterial.vChemicalFormula.equals("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) {
+ list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula));
+ }
+
+ if (this.componentMaterial.isRadioactive){
+ list.add(CORE.GT_Tooltip_Radioactive);
+ }
+ }
+
+ }
+
+ super.addInformation(stack, aPlayer, list, bool);
+ }
+
+
+ @Override
+ public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
+ return this.componentColour;
+ }
+
+ @Override
+ public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) {
+ if (this.componentMaterial != null){
+ if (entityHolding instanceof EntityPlayer){
+ if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){
+ EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding);
+ }
+ }
+ }
+ }
+
+
+
+
+
+
+
+
+
+ public static enum ComponentTypes {
+ DUST("Dust", " Dust", "dust"),
+ DUSTDIRTY("Ingot", " Ingot", "ingot"),
+ DUSTIMPURE("Ingot", " Ingot", "ingot"),
+ DUSTPURE("Ingot", " Ingot", "ingot"),
+ DUSTREFINED("Ingot", " Ingot", "ingot"),
+ CRUSHED("Ingot", " Ingot", "ingot"),
+ CRUSHEDCENTRIFUGED("Ingot", " Ingot", "ingot"),
+ CRUSHEDPURIFIED("Ingot", " Ingot", "ingot");
+
+ private String COMPONENT_NAME;
+ private String DISPLAY_NAME;
+ private String OREDICT_NAME;
+ private ComponentTypes (final String LocalName, final String DisplayName, final String OreDictName){
+ this.COMPONENT_NAME = LocalName;
+ this.DISPLAY_NAME = DisplayName;
+ this.OREDICT_NAME = OreDictName;
+ // dust + Dirty, Impure, Pure, Refined
+ // crushed + centrifuged, purified
+ }
+
+ public String getComponent(){
+ return this.COMPONENT_NAME;
+ }
+
+ public String getName(){
+ return this.DISPLAY_NAME;
+ }
+
+ public String getOreDictName(){
+ return this.OREDICT_NAME;
+ }
+
+ }
+
+}
+
+
diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java
index 5fe7ca6424..0259a6c6f3 100644
--- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java
+++ b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRod.java
@@ -1,9 +1,9 @@
package gtPlusPlus.core.item.base.rods;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.item.ItemStack;
public class BaseItemRod extends BaseItemComponent{
@@ -15,7 +15,7 @@ public class BaseItemRod extends BaseItemComponent{
private void addExtruderRecipe(){
- Utils.LOG_WARNING("Adding cutter recipe for "+this.materialName+" Rods");
+ Logger.WARNING("Adding cutter recipe for "+this.materialName+" Rods");
final ItemStack stackStick = this.componentMaterial.getRod(1);
final ItemStack stackBolt = this.componentMaterial.getBolt(4);
diff --git a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java
index 84d7d00472..1ac307d68c 100644
--- a/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java
+++ b/src/Java/gtPlusPlus/core/item/base/rods/BaseItemRodLong.java
@@ -1,9 +1,9 @@
package gtPlusPlus.core.item.base.rods;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -20,7 +20,7 @@ public class BaseItemRodLong extends BaseItemComponent{
}
private void addExtruderRecipe(){
- Utils.LOG_WARNING("Adding recipe for Long "+this.materialName+" Rods");
+ Logger.WARNING("Adding recipe for Long "+this.materialName+" Rods");
final String tempStick = this.unlocalName.replace("itemRodLong", "stick");
final String tempStickLong = this.unlocalName.replace("itemRodLong", "stickLong");
diff --git a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java
index f35e4834cc..733a8aa9d7 100644
--- a/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java
+++ b/src/Java/gtPlusPlus/core/item/base/screws/BaseItemScrew.java
@@ -1,9 +1,9 @@
package gtPlusPlus.core.item.base.screws;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -15,7 +15,7 @@ public class BaseItemScrew extends BaseItemComponent{
}
private void addLatheRecipe(){
- Utils.LOG_WARNING("Adding recipe for "+this.materialName+" Screws");
+ Logger.WARNING("Adding recipe for "+this.materialName+" Screws");
final ItemStack boltStack = ItemUtils.getItemStackOfAmountFromOreDict(this.unlocalName.replace("itemScrew", "bolt"), 1);
if (null != boltStack){
GT_Values.RA.addLatheRecipe(
diff --git a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java b/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
index cebfa7050d..b7c2b6ae89 100644
--- a/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
+++ b/src/Java/gtPlusPlus/core/item/bauble/ModularBauble.java
@@ -23,9 +23,7 @@ import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
+import net.minecraft.util.*;
public class ModularBauble extends BaseBauble {
@@ -86,7 +84,7 @@ public class ModularBauble extends BaseBauble {
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) {
if (mStatlevel > 0 && mStatlevel <= 100) {
- int bonus = (int) (mStatlevel / 5);
+ int bonus = mStatlevel / 5;
attributes.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(),
new AttributeModifier(getBaubleUUID(stack), "HP" + mStatlevel, bonus * 2, 0));
}
@@ -142,7 +140,7 @@ public class ModularBauble extends BaseBauble {
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_HP)) > 0) {
list.add(EnumChatFormatting.GRAY + "Health Boost: " + EnumChatFormatting.RED + mStatlevel
- + EnumChatFormatting.GRAY + "/100. Bonus " + ((int) mStatlevel / 5) + " hearts.");
+ + EnumChatFormatting.GRAY + "/100. Bonus " + (mStatlevel / 5) + " hearts.");
}
if ((mStatlevel = ModularArmourUtils.getModifierLevel(stack, Modifiers.BOOST_SPEED)) > 0) {
list.add(EnumChatFormatting.GRAY + "Speed Boost: " + EnumChatFormatting.WHITE + mStatlevel
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
index c3187ba92c..ea4d8f5a1b 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
@@ -2,10 +2,10 @@ package gtPlusPlus.core.item.general;
import java.util.List;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.CoreItem;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.BlockPos;
import gtPlusPlus.core.util.entity.EntityUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -182,7 +182,7 @@ public class ItemAreaClear extends CoreItem {
removeBlocks(world, groundBlock);
}
else {
- Utils.LOG_INFO("Filling.");
+ Logger.INFO("Filling.");
fillBlocks(world, groundBlock);
}
return super.onItemRightClick(thisItem, world, parEntity);
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java b/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java
index 65aa618cb3..720005f6ae 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemBlueprint.java
@@ -3,10 +3,10 @@ package gtPlusPlus.core.item.general;
import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.interfaces.IItemBlueprint;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.player.PlayerUtils;
@@ -224,19 +224,19 @@ public class ItemBlueprint extends Item implements IItemBlueprint{
if (itemStack.hasTagCompound()){
if (!itemStack.stackTagCompound.getBoolean("mBlueprint") && !itemStack.stackTagCompound.getString("mName").equals("")){
//No Blueprint and no name Set
- Utils.LOG_WARNING("No Blueprint and no name Set");
+ Logger.WARNING("No Blueprint and no name Set");
return false;
}
else if (itemStack.stackTagCompound.getBoolean("mBlueprint") && !itemStack.stackTagCompound.getString("mName").equals("")){
//Has Blueprint but invalid name set
- Utils.LOG_WARNING("Has Blueprint but invalid name set");
+ Logger.WARNING("Has Blueprint but invalid name set");
//itemStack.stackTagCompound = null;
//createNBT(itemStack);
return false;
}
else if (!itemStack.stackTagCompound.getBoolean("mBlueprint") && itemStack.stackTagCompound.getString("mName").equals("")){
//Has no Blueprint, but strangely has a name
- Utils.LOG_WARNING("Has no Blueprint, but strangely has a name");
+ Logger.WARNING("Has no Blueprint, but strangely has a name");
//itemStack.stackTagCompound = null;
//createNBT(itemStack);
return false;
@@ -247,7 +247,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{
final int bpID = MathUtils.randInt(0, 1000);
final boolean hasRecipe = false;
final String recipeName = "";
- Utils.LOG_WARNING("Creating Blueprint, setting up it's NBT data. "+bpID);
+ Logger.WARNING("Creating Blueprint, setting up it's NBT data. "+bpID);
itemStack.stackTagCompound = new NBTTagCompound();
itemStack.stackTagCompound.setInteger("mID", bpID);
itemStack.stackTagCompound.setBoolean("mBlueprint", hasRecipe);
@@ -258,7 +258,7 @@ public class ItemBlueprint extends Item implements IItemBlueprint{
final int bpID = MathUtils.randInt(0, 1000);
final boolean hasRecipe = false;
final String recipeName = "";
- Utils.LOG_WARNING("Creating a Blueprint, setting up it's NBT data. "+bpID);
+ Logger.WARNING("Creating a Blueprint, setting up it's NBT data. "+bpID);
itemStack.stackTagCompound = new NBTTagCompound();
itemStack.stackTagCompound.setInteger("mID", bpID);
itemStack.stackTagCompound.setBoolean("mBlueprint", hasRecipe);
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java b/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java
index 63e0abb238..a3a8a98e6a 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemHealingDevice.java
@@ -6,9 +6,9 @@ import baubles.api.BaubleType;
import baubles.api.IBauble;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.player.PlayerUtils;
@@ -215,7 +215,7 @@ public class ItemHealingDevice extends Item implements IElectricItem, IElectricI
if (this.getCharge(arg0) >= (1638400/4)){
if (arg1.getHealth() < arg1.getMaxHealth()){
final float rx = arg1.getMaxHealth()-arg1.getHealth();
- Utils.LOG_INFO("rx:"+rx);
+ Logger.INFO("rx:"+rx);
arg1.heal(rx*2);
this.discharge(arg0, (1638400/4)*rx, 6, true, true, false);
PlayerUtils.messagePlayer((EntityPlayer) arg1, "Your NanoBooster Whirs! Leaving you feeling stronger. It Healed "+rx+" hp.");
diff --git a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java b/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java
index e74a3f8851..1b8ab947e5 100644
--- a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java
+++ b/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java
@@ -5,16 +5,14 @@ import java.util.UUID;
import cpw.mods.fml.common.registry.GameRegistry;
import gtPlusPlus.api.interfaces.IEntityCatcher;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.BlockPos;
import gtPlusPlus.core.util.nbt.NBTUtils;
import gtPlusPlus.core.util.player.PlayerUtils;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityList;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -49,22 +47,22 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
@Override
public Entity getStoredEntity(World aWorld, ItemStack aStack) {
if (aStack == null || !hasEntity(aStack)) {
- Utils.LOG_INFO("Cannot get stored entity.");
+ Logger.INFO("Cannot get stored entity.");
return null;
}
Entity mEntityToSpawn;
int mEntityID;
- Utils.LOG_WARNING("getStoredEntity(1)");
+ Logger.WARNING("getStoredEntity(1)");
mEntityID = NBTUtils.getInteger(aStack, "mEntityID");
mEntityToSpawn = EntityList.createEntityByID(mEntityID, aWorld);
if (mEntityToSpawn != null) {
- Utils.LOG_WARNING("getStoredEntity(2)");
+ Logger.WARNING("getStoredEntity(2)");
return mEntityToSpawn;
}
- Utils.LOG_INFO("Failed to get stored entity. - getStoredEntity()");
+ Logger.INFO("Failed to get stored entity. - getStoredEntity()");
return null;
}
@@ -72,11 +70,11 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
public boolean setStoredEntity(World aWorld, ItemStack aStack, Entity aEntity) {
if (aEntity == null) {
NBTUtils.setBoolean(aStack, "mHasEntity", false);
- Utils.LOG_INFO("Bad Entity being stored.");
+ Logger.INFO("Bad Entity being stored.");
return false;
}
- Utils.LOG_WARNING("setStoredEntity(1)");
+ Logger.WARNING("setStoredEntity(1)");
NBTTagCompound mEntityData;
Class<? extends Entity> mEntityClass;
@@ -84,7 +82,7 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
String mEntityName;
int mEntityID, mEntityHashcode;
UUID mUuidPersistent, mUuidUnique;
- Utils.LOG_WARNING("setStoredEntity(2)");
+ Logger.WARNING("setStoredEntity(2)");
mEntityData = aEntity.getEntityData();
mEntityClass = aEntity.getClass();
@@ -95,7 +93,7 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
mEntityHashcode = aEntity.hashCode();
mUuidPersistent = aEntity.getPersistentID();
mUuidUnique = aEntity.getUniqueID();
- Utils.LOG_WARNING("setStoredEntity(3)");
+ Logger.WARNING("setStoredEntity(3)");
NBTUtils.createTagCompound(aStack, "mEntityData", mEntityData);
NBTUtils.setString(aStack,"mEntityName", mEntityName);
@@ -105,7 +103,7 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
NBTUtils.setString(aStack,"mUuidUnique", mUuidUnique.toString());
NBTUtils.setInteger(aStack,"mEntityHashcode", mEntityHashcode);
NBTUtils.setBoolean(aStack,"mHasEntity", true);
- Utils.LOG_WARNING("setStoredEntity(4)");
+ Logger.WARNING("setStoredEntity(4)");
return true;
}
@@ -132,7 +130,7 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
@Override
public boolean spawnStoredEntity(World aWorld, ItemStack aStack, BlockPos aPos) {
if (aStack == null || !hasEntity(aStack)) {
- Utils.LOG_INFO("Cannot release, either invalid Itemstack or no entity stored.");
+ Logger.INFO("Cannot release, either invalid Itemstack or no entity stored.");
return false;
}
@@ -147,31 +145,31 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
EntityLiving mEntityToSpawn = (EntityLiving) getStoredEntity(aWorld, aStack);
Class<? extends Entity> mEntityClass = getStoredEntityClass(aStack);
- Utils.LOG_WARNING("spawnStoredEntity(1)");
+ Logger.WARNING("spawnStoredEntity(1)");
if (mEntityToSpawn != null && mEntityClass != null) {
- Utils.LOG_WARNING("spawnStoredEntity(2)");
+ Logger.WARNING("spawnStoredEntity(2)");
if (mEntityToSpawn.getEntityData() != mEntityData) {
- Utils.LOG_WARNING("spawnStoredEntity(x)");
+ Logger.WARNING("spawnStoredEntity(x)");
NBTUtils.setEntityCustomData(mEntityToSpawn, mEntityData);
}
mEntityToSpawn.setLocationAndAngles(aPos.xPos, aPos.yPos, aPos.zPos, aWorld.rand.nextFloat() * 360.0F,
0.0F);
- if (mEntityToSpawn instanceof EntityLiving) {
- ((EntityLiving) mEntityToSpawn).onSpawnWithEgg(null);
+ if (mEntityToSpawn != null) {
+ mEntityToSpawn.onSpawnWithEgg(null);
aWorld.spawnEntityInWorld(mEntityToSpawn);
- Utils.LOG_WARNING("spawnStoredEntity(3)");
+ Logger.WARNING("spawnStoredEntity(3)");
}
- if (mEntityToSpawn instanceof EntityLiving) {
- ((EntityLiving) mEntityToSpawn).playLivingSound();
- Utils.LOG_WARNING("spawnStoredEntity(4)");
+ if (mEntityToSpawn != null) {
+ mEntityToSpawn.playLivingSound();
+ Logger.WARNING("spawnStoredEntity(4)");
}
- Utils.LOG_WARNING("spawnStoredEntity(5)");
+ Logger.WARNING("spawnStoredEntity(5)");
NBTUtils.setBoolean(aStack,"mHasEntity", false);
return true;
}
- Utils.LOG_INFO("Failed to spawn stored entity. - spawnStoredEntity()");
+ Logger.INFO("Failed to spawn stored entity. - spawnStoredEntity()");
return false;
}
@@ -202,10 +200,10 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side,
float xOffset, float yOffset, float zOffset) {
if (Utils.isServer()) {
- Utils.LOG_WARNING("Trying to release (1)");
+ Logger.WARNING("Trying to release (1)");
if (NBTUtils.hasKey(itemstack,"mHasEntity")
&& NBTUtils.getBoolean(itemstack,"mHasEntity")) {
- Utils.LOG_WARNING("Trying to release (2)");
+ Logger.WARNING("Trying to release (2)");
boolean mDidSpawn = spawnStoredEntity(world, itemstack, new BlockPos(x, y+1, z));
if (!mDidSpawn){
@@ -223,12 +221,12 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher {
@Override
public boolean itemInteractionForEntity(ItemStack aStack, EntityPlayer aPlayer, EntityLivingBase aEntity) {
if (Utils.isServer()) {
- Utils.LOG_WARNING("Trying to catch (1)");
+ Logger.WARNING("Trying to catch (1)");
if (!hasEntity(aStack)) {
- Utils.LOG_WARNING("Trying to catch (2)");
+ Logger.WARNING("Trying to catch (2)");
boolean mStored = setStoredEntity(aPlayer.worldObj, aStack, aEntity);
if (mStored) {
- Utils.LOG_WARNING("Trying to catch (3)");
+ Logger.WARNING("Trying to catch (3)");
aEntity.setDead();
PlayerUtils.messagePlayer(aPlayer, "You have captured a "+NBTUtils.getString(aStack,"mEntityName")+" in the Jar.");
//NBTUtils.tryIterateNBTData(aStack);
diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
index 1ed49760c0..2a98a0a13f 100644
--- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
@@ -15,6 +15,7 @@ public class ItemHydrofluoricAcidPotion extends CoreItem {
super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null);
}
+ @Override
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
if (!player.capabilities.isCreativeMode) {
--item.stackSize;
diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
index 60e3550b5c..dd5db807b6 100644
--- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
@@ -15,6 +15,7 @@ public class ItemSulfuricAcidPotion extends CoreItem {
super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null);
}
+ @Override
public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) {
if (!player.capabilities.isCreativeMode) {
--item.stackSize;
diff --git a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java b/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java
index cc73ba3d32..fc7381354a 100644
--- a/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java
+++ b/src/Java/gtPlusPlus/core/item/init/ItemsMultiTools.java
@@ -1,12 +1,12 @@
package gtPlusPlus.core.item.init;
import gregtech.api.enums.Materials;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
public class ItemsMultiTools {
@@ -64,7 +64,7 @@ public class ItemsMultiTools {
}
private static boolean toolFactory(final Material m){
- Utils.LOG_WARNING("Generating Multi-Tools for "+m.getLocalizedName());
+ Logger.WARNING("Generating Multi-Tools for "+m.getLocalizedName());
ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(m);
ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(m);
return true;
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
index 602b0d75f7..45e0bd8fe6 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
@@ -5,6 +5,7 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
@@ -104,13 +105,13 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
final String toolScrewDriver = "craftingToolScrewdriver";
if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(rodLong, 1)){
- Utils.LOG_WARNING("stickLong of "+cleanName+" does not exist.");
+ Logger.WARNING("stickLong of "+cleanName+" does not exist.");
return false;
}
if (null == ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDense, 1)){
- Utils.LOG_WARNING("plateDense of "+cleanName+" does not exist.");
+ Logger.WARNING("plateDense of "+cleanName+" does not exist.");
if (null != ItemUtils.getItemStackOfAmountFromOreDictNoBroken(plateDouble, 1)){
- Utils.LOG_WARNING("plateDouble of "+cleanName+" does exist. Using it instead.");
+ Logger.WARNING("plateDouble of "+cleanName+" does exist. Using it instead.");
RecipeUtils.recipeBuilder(
plateDouble, plateDouble, plateDouble,
toolFile, rodLong, toolHammer,
@@ -119,7 +120,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
return true;
}
- Utils.LOG_WARNING("plateDouble of "+cleanName+" does not exist.");
+ Logger.WARNING("plateDouble of "+cleanName+" does not exist.");
return false;
}
@@ -161,13 +162,13 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
//Utils.LOG_WARNING(removalist.toString());
bHardness = removalist.getBlockHardness(world, X, Y, Z)*100;
- Utils.LOG_INFO("Hardness: "+bHardness);
+ Logger.INFO("Hardness: "+bHardness);
bDurabilityLoss = 100;
//Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z});
- Utils.LOG_WARNING(""+correctTool);
+ Logger.WARNING(""+correctTool);
if (!correctTool){
return 0;
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
index a73ae3045c..d8b88c6c6d 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
@@ -4,8 +4,8 @@ import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.UtilsMining;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
@@ -77,13 +77,13 @@ public class StaballoyPickaxe extends ItemPickaxe{
//Utils.LOG_WARNING(removalist.toString());
bHardness = removalist.getBlockHardness(world, X, Y, Z);
- Utils.LOG_WARNING("Hardness: "+bHardness);
+ Logger.WARNING("Hardness: "+bHardness);
bDurabilityLoss = (bDurabilityLoss + bHardness);
//Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
correctTool = this.canPickaxeBlock(removalist, world, new int[]{X,Y,Z});
- Utils.LOG_WARNING(""+correctTool);
+ Logger.WARNING(""+correctTool);
if (!correctTool){
return 0;
@@ -115,14 +115,14 @@ public class StaballoyPickaxe extends ItemPickaxe{
float DURABILITY_LOSS = 0;
if (!world.isRemote){
- Utils.LOG_WARNING("hardness:"+block.getBlockHardness(world, X, Y, Z));
+ Logger.WARNING("hardness:"+block.getBlockHardness(world, X, Y, Z));
if (FACING.equals("below") || FACING.equals("above")){
DURABILITY_LOSS = 0;
for(int i = -1; i < 2; i++) {
for(int j = -1; j < 2; j++) {
final float dur = this.calculateDurabilityLoss(world, X + i, Y, Z + j);
DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Utils.LOG_WARNING("Added Loss: "+dur);
+ Logger.WARNING("Added Loss: "+dur);
this.removeBlockAndDropAsItem(world, X + i, Y, Z + j, heldItem);
}
}
@@ -134,7 +134,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
for(int j = -1; j < 2; j++) {
final float dur = this.calculateDurabilityLoss(world, X, Y + i, Z + j);
DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Utils.LOG_WARNING("Added Loss: "+dur);
+ Logger.WARNING("Added Loss: "+dur);
this.removeBlockAndDropAsItem(world, X , Y + i, Z + j, heldItem);
}
}
@@ -146,25 +146,25 @@ public class StaballoyPickaxe extends ItemPickaxe{
for(int j = -1; j < 2; j++) {
final float dur = this.calculateDurabilityLoss(world, X + j, Y + i, Z);
DURABILITY_LOSS = (DURABILITY_LOSS + dur);
- Utils.LOG_WARNING("Added Loss: "+dur);
+ Logger.WARNING("Added Loss: "+dur);
this.removeBlockAndDropAsItem(world, X + j, Y + i, Z, heldItem);
}
}
}
//int heldItemDurability = heldItem.getDamage(1);
- Utils.LOG_WARNING("Total Loss: "+(int)DURABILITY_LOSS);
+ Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS);
//heldItem.setDamage(heldStack, DURABILITY_LOSS);
//Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
//Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack));
- Utils.LOG_WARNING("1x: "+(heldItem.getItemDamage()));
+ Logger.WARNING("1x: "+(heldItem.getItemDamage()));
final int itemdmg = heldItem.getItemDamage();
final int maxdmg = heldItem.getMaxDamage();
final int dodmg = (int)DURABILITY_LOSS;
final int durNow = maxdmg-itemdmg;
final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS);
- Utils.LOG_WARNING(
+ Logger.WARNING(
"Current Damage: " + itemdmg
+ " Max Damage: " + maxdmg
+ " Durability to be lost: " + dodmg
@@ -176,13 +176,13 @@ public class StaballoyPickaxe extends ItemPickaxe{
//Break Tool
if (((durNow-dodmg) <= (99)) && (itemdmg != 0)){
//TODO break tool
- Utils.LOG_WARNING("Breaking Tool");
+ Logger.WARNING("Breaking Tool");
heldItem.stackSize = 0;
}
//Do Damage
else {
//setItemDamage(heldItem, durLeft);
- Utils.LOG_WARNING(""+(durNow-durLeft));
+ Logger.WARNING(""+(durNow-durLeft));
this.damageItem(heldItem, (durNow-durLeft)-1, this.localPlayer);
}
@@ -215,17 +215,17 @@ public class StaballoyPickaxe extends ItemPickaxe{
try {
final Block block = world.getBlock(X, Y, Z);
final float dur = this.calculateDurabilityLoss(world, X, Y, Z);
- Utils.LOG_WARNING(block.toString());
+ Logger.WARNING(block.toString());
String removalTool = "";
removalTool = block.getHarvestTool(1);
- Utils.LOG_WARNING("Removing.1 "+removalTool);
+ Logger.WARNING("Removing.1 "+removalTool);
/*if ((removalTool.equalsIgnoreCase("pickaxe") || removalTool.equalsIgnoreCase("null") || removalTool == null)){
Utils.LOG_WARNING("Removing.2");
if (UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)) {
Utils.LOG_WARNING("Removing.3"); */
if (this.canPickaxeBlock(block, world, new int[]{X,Y,Z})){
- Utils.LOG_WARNING("Removing.4");
+ Logger.WARNING("Removing.4");
if (block == Blocks.air){
return;
@@ -233,7 +233,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) >= 0) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){
- Utils.LOG_WARNING("Removing.5");
+ Logger.WARNING("Removing.5");
if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){
if (X == 0 && Y == 0 && Z == 0){
@@ -252,7 +252,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
}*/
}
else {
- Utils.LOG_WARNING("Incorrect Tool for mining this block.");
+ Logger.WARNING("Incorrect Tool for mining this block.");
}
} catch (final NullPointerException e){
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
index 9400c8308c..30c7fb7b7a 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
@@ -4,8 +4,8 @@ import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.UtilsMining;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
@@ -75,7 +75,7 @@ public class StaballoySpade extends ItemSpade{
correctTool = currentBlock.getHarvestTool(0);
//Utils.LOG_WARNING(correctTool);
- Utils.LOG_WARNING("Tool for Block: "+correctTool+" | Current block: "+currentBlock.getLocalizedName());
+ Logger.WARNING("Tool for Block: "+correctTool+" | Current block: "+currentBlock.getLocalizedName());
if (UtilsMining.getBlockType(currentBlock, currentWorld, xyz, this.miningLevel) || correctTool.equals("shovel")){
return true;}
} catch (final NullPointerException e){
@@ -117,18 +117,18 @@ public class StaballoySpade extends ItemSpade{
}
//int heldItemDurability = heldItem.getDamage(1);
- Utils.LOG_WARNING("Total Loss: "+(int)DURABILITY_LOSS);
+ Logger.WARNING("Total Loss: "+(int)DURABILITY_LOSS);
//heldItem.setDamage(heldStack, DURABILITY_LOSS);
//Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
//Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack));
- Utils.LOG_WARNING("1x: "+(heldItem.getItemDamage()));
+ Logger.WARNING("1x: "+(heldItem.getItemDamage()));
final int itemdmg = heldItem.getItemDamage();
final int maxdmg = heldItem.getMaxDamage();
final int dodmg = (int)DURABILITY_LOSS;
final int durNow = maxdmg-itemdmg;
final int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS);
- Utils.LOG_WARNING(
+ Logger.WARNING(
"Current Damage: " + itemdmg
+ " Max Damage: " + maxdmg
+ " Durability to be lost: " + dodmg
@@ -140,13 +140,13 @@ public class StaballoySpade extends ItemSpade{
//Break Tool
if (((durNow-dodmg) <= (900)) && (itemdmg != 0)){
//TODO break tool
- Utils.LOG_WARNING("Breaking Tool");
+ Logger.WARNING("Breaking Tool");
heldItem.stackSize = 0;
}
//Do Damage
else {
//setItemDamage(heldItem, durLeft);
- Utils.LOG_WARNING(""+(durNow-durLeft));
+ Logger.WARNING(""+(durNow-durLeft));
this.damageItem(heldItem, (durNow-durLeft)-1, this.localPlayer);
}
DURABILITY_LOSS = 0;
@@ -165,10 +165,10 @@ public class StaballoySpade extends ItemSpade{
//Should clear up blocks quicker if I chain it.
public int removeBlockAndDropAsItem(final World world, final int X, final int Y, final int Z, final ItemStack heldItem){
this.localWorld = world;
- Utils.LOG_WARNING("Trying to drop/remove a block.");
+ Logger.WARNING("Trying to drop/remove a block.");
try {
final Block block = world.getBlock(X, Y, Z);
- Utils.LOG_WARNING(block.toString());
+ Logger.WARNING(block.toString());
String removalTool = "";
removalTool = block.getHarvestTool(0);
if (removalTool != null){
@@ -188,22 +188,22 @@ public class StaballoySpade extends ItemSpade{
}
block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0);
world.setBlockToAir(X, Y, Z);
- Utils.LOG_WARNING("Adding 100 damage to item.");
+ Logger.WARNING("Adding 100 damage to item.");
return 100;
}
- Utils.LOG_WARNING("Incorrect Tool for mining this block. Wrong Block Water/lava/bedrock/blacklist");
+ Logger.WARNING("Incorrect Tool for mining this block. Wrong Block Water/lava/bedrock/blacklist");
return 0;
}
- Utils.LOG_WARNING("Incorrect Tool for mining this block. Cannot Shovel this block type.");
+ Logger.WARNING("Incorrect Tool for mining this block. Cannot Shovel this block type.");
return 0;
}
- Utils.LOG_WARNING("Incorrect Tool for mining this block. Blocks mining tool is now Shovel.");
+ Logger.WARNING("Incorrect Tool for mining this block. Blocks mining tool is now Shovel.");
return 0;
}
- Utils.LOG_WARNING("Either the block was air or it declares an invalid mining tool.");
+ Logger.WARNING("Either the block was air or it declares an invalid mining tool.");
return 0;
} catch (final NullPointerException e){
- Utils.LOG_WARNING("Something Broke");
+ Logger.WARNING("Something Broke");
e.printStackTrace();
return 0;
}
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index 78b7cf4326..5de70b467a 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -1,17 +1,10 @@
package gtPlusPlus.core.lib;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import com.mojang.authlib.GameProfile;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.Pair;
@@ -46,8 +39,6 @@ public class CORE {
public static boolean DEVENV = false;
public static boolean DEBUG = false;
- @SideOnly(Side.CLIENT)
- public static boolean mFancyGraphics = false;
//Only can be set in Dev, no config or setting elsewhere.
public static final boolean LOAD_ALL_CONTENT = false;;
@@ -55,13 +46,14 @@ public class CORE {
public static final String name = "GT++";
public static final String MODID = "miscutils";
- public static final String VERSION = "1.6.101-prerelease";
+ public static final String VERSION = "1.6.110-prerelease";
public static String MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase();
public static String USER_COUNTRY = GeoUtils.determineUsersCountry();
public static boolean isModUpToDate = Utils.isModUpToDate();
//Tweakables
public static int DARKBIOME_ID = 238;
+ public static int DARKWORLD_ID = 227;
//GT Vars;
public static final int GREG_FIRST_ID = 760;
diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java
index c807d8f03c..04ddd7b021 100644
--- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java
+++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java
@@ -4,8 +4,8 @@ import static gtPlusPlus.core.lib.CORE.BRC;
import static gtPlusPlus.core.lib.CORE.GTNH;
import cpw.mods.fml.common.Loader;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechTextures;
import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder;
@@ -55,19 +55,19 @@ public class LoadedMods {
private static int totalMods;
@SuppressWarnings("deprecation")
public static void checkLoaded(){
- Utils.LOG_INFO("Looking for optional mod prereqs.");
+ Logger.INFO("Looking for optional mod prereqs.");
if (Loader.isModLoaded("gregtech") == true ){
Gregtech = true;
- Utils.LOG_INFO("Components enabled for: Gregtech");
+ Logger.INFO("Components enabled for: Gregtech");
if (Gregtech){
try {
CORE.sRecipeAdder = CORE.RA = new GregtechRecipeAdder();
- Utils.LOG_INFO("Created Gregtech recipe handler.");
+ Logger.INFO("Created Gregtech recipe handler.");
GregtechTextures.BlockIcons.VOID.name();
GregtechTextures.ItemIcons.VOID.name();
- Utils.LOG_INFO("Created Gregtech texture handler.");
+ Logger.INFO("Created Gregtech texture handler.");
} catch (final NullPointerException e){
- Utils.LOG_INFO("Could NOT create a Gregtech recipe handler.");
+ Logger.INFO("Could NOT create a Gregtech recipe handler.");
}
}
@@ -76,194 +76,194 @@ public class LoadedMods {
if (Loader.isModLoaded("dreamcraft") == true){
DreamCraft = true;
GTNH = true;
- Utils.LOG_INFO("Components enabled for: DreamCraft");
- Utils.LOG_INFO("Components enabled for: GT: New Horizons");
+ Logger.INFO("Components enabled for: DreamCraft");
+ Logger.INFO("Components enabled for: GT: New Horizons");
totalMods++;
}
if (Loader.isModLoaded("beyondrealitycore") == true){
BeyondRealityCore = true;
BRC = true;
- Utils.LOG_INFO("Components enabled for: Beyond Reality");
+ Logger.INFO("Components enabled for: Beyond Reality");
totalMods++;
}
if (Loader.isModLoaded("PlayerAPI") == true){
PlayerAPI = true;
- Utils.LOG_INFO("Components enabled for: PlayerAPI");
+ Logger.INFO("Components enabled for: PlayerAPI");
totalMods++;
}
if (Loader.isModLoaded("BuildCraft") == true){
BuildCraft = true;
- Utils.LOG_INFO("Components enabled for: BuildCraft");
+ Logger.INFO("Components enabled for: BuildCraft");
totalMods++;
}
if ((Loader.isModLoaded("EnderIO") == true) && !ConfigSwitches.disableEnderIOIntegration){
EnderIO = true;
- Utils.LOG_INFO("Components enabled for: EnderIO");
+ Logger.INFO("Components enabled for: EnderIO");
totalMods++;
}
if (Loader.isModLoaded("BigReactors") == true){
Big_Reactors = true;
- Utils.LOG_INFO("Components enabled for: Big Reactors");
+ Logger.INFO("Components enabled for: Big Reactors");
totalMods++;
}
if (Loader.isModLoaded("IC2") == true){
IndustrialCraft2 = true;
- Utils.LOG_INFO("Components enabled for: IndustrialCraft2");
+ Logger.INFO("Components enabled for: IndustrialCraft2");
totalMods++;
}
if (Loader.isModLoaded("simplyjetpacks") == true){
Simply_Jetpacks = true;
- Utils.LOG_INFO("Components enabled for: Simply Jetpacks");
+ Logger.INFO("Components enabled for: Simply Jetpacks");
totalMods++;
}
if (Loader.isModLoaded("rftools") == true){
RFTools = true;
- Utils.LOG_INFO("Components enabled for: RFTools");
+ Logger.INFO("Components enabled for: RFTools");
totalMods++;
}
if (Loader.isModLoaded("Thaumcraft") == true){
Thaumcraft = true;
- Utils.LOG_INFO("Components enabled for: Thaumcraft");
+ Logger.INFO("Components enabled for: Thaumcraft");
totalMods++;
}
if (Loader.isModLoaded("BiomesOPlenty") == true){
BiomesOPlenty = true;
- Utils.LOG_INFO("Components enabled for: BiomesOPlenty");
+ Logger.INFO("Components enabled for: BiomesOPlenty");
totalMods++;
}
if (Loader.isModLoaded("ExtraUtilities") == true){
Extra_Utils = true;
- Utils.LOG_INFO("Components enabled for: Extra_Utils");
+ Logger.INFO("Components enabled for: Extra_Utils");
totalMods++;
}
if (Loader.isModLoaded("harvestcraft") == true){
PamsHarvestcraft = true;
- Utils.LOG_INFO("Components enabled for: PamsHarvestcraft");
+ Logger.INFO("Components enabled for: PamsHarvestcraft");
totalMods++;
}
if (Loader.isModLoaded("PneumaticCraft") == true){
PneumaticCraft = true;
- Utils.LOG_INFO("Components enabled for: PneumaticCraft");
+ Logger.INFO("Components enabled for: PneumaticCraft");
totalMods++;
}
if (Loader.isModLoaded("MorePlanet") == true){
MorePlanets = true;
- Utils.LOG_INFO("Components enabled for: MorePlanets");
+ Logger.INFO("Components enabled for: MorePlanets");
totalMods++;
}
if (Loader.isModLoaded("ForbiddenMagic") == true){
ForbiddenMagic = true;
- Utils.LOG_INFO("Components enabled for: ForbiddenMagic");
+ Logger.INFO("Components enabled for: ForbiddenMagic");
totalMods++;
}
if (Loader.isModLoaded("CompactWindmills") == true){
CompactWindmills = true;
- Utils.LOG_INFO("Components enabled for: CompactWindmills");
+ Logger.INFO("Components enabled for: CompactWindmills");
totalMods++;
}
if (Loader.isModLoaded("Railcraft") == true){
Railcraft = true;
- Utils.LOG_INFO("Components enabled for: Railcraft");
+ Logger.INFO("Components enabled for: Railcraft");
totalMods++;
}
if (Loader.isModLoaded("Mekanism") == true){
Mekanism = true;
- Utils.LOG_INFO("Components enabled for: Mekanism - This feature is not configurable and balances Mekanism to suit GT.");
+ Logger.INFO("Components enabled for: Mekanism - This feature is not configurable and balances Mekanism to suit GT.");
totalMods++;
}
if (Loader.isModLoaded("Growthcraft") == true){
- Utils.LOG_INFO("Growthcraft Version: "+getModVersion("Growthcraft"));
+ Logger.INFO("Growthcraft Version: "+getModVersion("Growthcraft"));
if (getModVersion("Growthcraft").equals("1.7.10-2.3.1")){
//Load Growthcraft Compat
Growthcraft = true;
- Utils.LOG_INFO("Components enabled for: Growthcraft");
+ Logger.INFO("Components enabled for: Growthcraft");
totalMods++;
}
else {
Growthcraft = false;
- Utils.LOG_INFO("Growthcraft found, but the version was too new. I will update GC support eventually.");
+ Logger.INFO("Growthcraft found, but the version was too new. I will update GC support eventually.");
}
}
if (Loader.isModLoaded("CoFHCore") == true){
CoFHCore = true;
- Utils.LOG_INFO("Components enabled for: CoFHCore");
+ Logger.INFO("Components enabled for: CoFHCore");
totalMods++;
}
if (Loader.isModLoaded("Forestry") == true){
Forestry = true;
- Utils.LOG_INFO("Components enabled for: Forestry");
+ Logger.INFO("Components enabled for: Forestry");
totalMods++;
}
if (Loader.isModLoaded("MagicBees") == true){
MagicBees = true;
- Utils.LOG_INFO("Components enabled for: MagicBees");
+ Logger.INFO("Components enabled for: MagicBees");
totalMods++;
}
if (Loader.isModLoaded("psychedelicraft") == true){
Psychedelicraft = true;
- Utils.LOG_INFO("Components enabled for: Psychedelicraft");
+ Logger.INFO("Components enabled for: Psychedelicraft");
totalMods++;
}
if (Loader.isModLoaded("ImmersiveEngineering") == true){
ImmersiveEngineering = true;
- Utils.LOG_INFO("Components enabled for: ImmersiveEngineering");
+ Logger.INFO("Components enabled for: ImmersiveEngineering");
totalMods++;
}
if (Loader.isModLoaded("ExtraBees") == true){
ExtraBees = true;
- Utils.LOG_INFO("Components enabled for: ExtraBees");
+ Logger.INFO("Components enabled for: ExtraBees");
totalMods++;
}
if (Loader.isModLoaded("ThermalFoundation") == false){
ThermalFoundation = false;
- Utils.LOG_INFO("Components enabled for: ThermalFoundation - This feature will disable itself if you add TF.");
+ Logger.INFO("Components enabled for: ThermalFoundation - This feature will disable itself if you add TF.");
totalMods++;
}
else if (Loader.isModLoaded("ThermalFoundation") == true){
ThermalFoundation = true;
- Utils.LOG_INFO("Components disabled for: ThermalFoundation - This feature will enable itself if you remove TF.");
+ Logger.INFO("Components disabled for: ThermalFoundation - This feature will enable itself if you remove TF.");
//totalMods++;
}
if (Loader.isModLoaded("ihl") == true){
IHL = true;
- Utils.LOG_INFO("Components enabled for: IHL");
+ Logger.INFO("Components enabled for: IHL");
totalMods++;
}
if (Loader.isModLoaded("Baubles") == true){
Baubles = true;
- Utils.LOG_INFO("Components enabled for: Baubles");
+ Logger.INFO("Components enabled for: Baubles");
totalMods++;
}
if (Loader.isModLoaded("GalacticraftCore") == true){
GalacticraftCore = true;
- Utils.LOG_INFO("Components enabled for: Galacticraft Core");
+ Logger.INFO("Components enabled for: Galacticraft Core");
totalMods++;
}
if (Loader.isModLoaded("OpenComputers") == true){
OpenComputers = true;
- Utils.LOG_INFO("Components enabled for: OpenComputers");
+ Logger.INFO("Components enabled for: OpenComputers");
totalMods++;
}
if (Loader.isModLoaded("computronics") == true){
Computronics = true;
- Utils.LOG_INFO("Components disabled for: Computronics - This feature will enable itself if you remove Computronics.");
+ Logger.INFO("Components disabled for: Computronics - This feature will enable itself if you remove Computronics.");
totalMods++;
}
else {
- Utils.LOG_INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics.");
+ Logger.INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics.");
}
if (Loader.isModLoaded("GTRedtech") == true){
RedTech = true;
- Utils.LOG_INFO("Components enabled for: GTRedtech");
+ Logger.INFO("Components enabled for: GTRedtech");
totalMods++;
}
if (Loader.isModLoaded("tectech") == true){
TecTech = true;
- Utils.LOG_INFO("Components enabled for: TecTech");
+ Logger.INFO("Components enabled for: TecTech");
totalMods++;
}
- Utils.LOG_INFO("Content found for "+totalMods+" mods");
+ Logger.INFO("Content found for "+totalMods+" mods");
}
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
index 8d1d4e5ecd..84bd859ed4 100644
--- a/src/Java/gtPlusPlus/core/material/ALLOY.java
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -589,7 +589,7 @@ public final class ALLOY {
-1, //Boiling Point in C
-1,
-1,
- true, //Uses Blast furnace?
+ false, //Uses Blast furnace?
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 5),
new MaterialStack(ELEMENT.getInstance().NAQUADAH, 9)
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index 859ebd86cf..eccd283da9 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.material;
import gregtech.api.enums.Materials;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.StringUtils;
import gtPlusPlus.core.util.materials.MaterialUtils;
@@ -10,7 +11,17 @@ public final class ELEMENT {
private static final ELEMENT thisClass = new ELEMENT();
public ELEMENT(){
-
+
+ //GTNH Trinium Handling
+ if (CORE.GTNH){
+ TRINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.valueOf("Trinium"));
+ TRINIUM_REFINED = new Material("Refined Trinium", MaterialState.SOLID, new short[]{210, 255, 170}, 4304, 14057, 181, 133, false, "Ke", 0, new MaterialStack[]{new MaterialStack(TRINIUM, 1)});//Not a GT Inherited Material
+ }
+ else {
+ TRINIUM = new Material("Trinium", MaterialState.SOLID, new short[]{70, 110, 30}, 604, 4057, 181, 133, false, "Ke", 0, false);//Not a GT Inherited Material
+ TRINIUM_REFINED = new Material("Refined Trinium", MaterialState.SOLID, new short[]{210, 255, 170}, 4304, 14057, 181, 133, false, "Ke", 0, new MaterialStack[]{new MaterialStack(TRINIUM, 1)});//Not a GT Inherited Material
+ }
+
}
public static ELEMENT getInstance(){
@@ -131,7 +142,7 @@ public final class ELEMENT {
//Fictional
public final Material NAQUADAH = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadah);
- public final Material TRINIUM = new Material("Trinium", MaterialState.SOLID, new short[]{170, 210, 130}, 604, 4057, 181, 133, false, "Ke", 0, false);//Not a GT Inherited Material
- public final Material TRINIUM_REFINED = new Material("Refined Trinium", MaterialState.SOLID, new short[]{210, 255, 170}, 4304, 14057, 181, 133, false, "Ke", 0, new MaterialStack[]{new MaterialStack(TRINIUM, 1)});//Not a GT Inherited Material
+ public final Material TRINIUM;
+ public final Material TRINIUM_REFINED;
//https://github.com/Blood-Asp/GT5-Unofficial/issues/609
}
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 40d8461209..b04ce3baac 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -2,9 +2,10 @@ package gtPlusPlus.core.material;
import static gregtech.api.enums.GT_Values.M;
-import java.util.ArrayList;
+import java.util.*;
import gregtech.api.enums.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.cell.BaseItemCell;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.StringUtils;
@@ -28,7 +29,7 @@ public class Material {
private final Fluid vMoltenFluid;
private final Fluid vPlasma;
-
+
private final boolean vGenerateCells;
protected Object dataVar = MathUtils.generateSingularRandomHexValue();
@@ -60,10 +61,21 @@ public class Material {
public final int vToolQuality;
public final int vHarvestLevel;
+
+ public static Map<Integer, Materials> invalidMaterials = new HashMap<Integer, Materials>();
+
+ public Material(String materialName, MaterialState defaultState, short[] rgba, int radiationLevel, MaterialStack[] materialStacks) {
+ this (materialName, defaultState, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks);
+ }
+
public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final MaterialStack... inputs){
this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, inputs);
}
+ public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, boolean generateCells, final MaterialStack... inputs){
+ this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, generateCells, inputs);
+ }
+
public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final int radiationLevel, final MaterialStack... inputs){
this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", radiationLevel, inputs);
}
@@ -83,7 +95,7 @@ public class Material {
public Material(final String materialName, final MaterialState defaultState, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, final MaterialStack... inputs){
this (materialName, defaultState, durability, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, chemicalSymbol, radiationLevel, true, inputs);
}
-
+
public Material(final String materialName, final MaterialState defaultState, final long durability, final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final String chemicalSymbol, final int radiationLevel, boolean generateCells, final MaterialStack... inputs){
this.unlocalizedName = Utils.sanitizeString(materialName);
@@ -105,7 +117,7 @@ public class Material {
}
}
}
-
+
//Set Melting/Boiling point, if value is -1 calculate it from compound inputs.
if (meltingPoint != -1){
@@ -128,7 +140,7 @@ public class Material {
this.meltingPointK = (int) MathUtils.celsiusToKelvin(this.meltingPointC);
this.boilingPointK = (int) MathUtils.celsiusToKelvin(this.boilingPointC);
-
+
//Set Proton/Neutron count, if value is -1 calculate it from compound inputs.
if (protons != -1){
this.vProtons = protons;
@@ -142,10 +154,10 @@ public class Material {
else {
this.vNeutrons = this.calculateNeutrons();
}
-
-
-
-
+
+
+
+
this.vMass = this.getMass();
//Sets tool Durability
@@ -239,20 +251,20 @@ public class Material {
this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true);
}
else if (!this.vChemicalSymbol.equals("")){
- Utils.LOG_WARNING("materialInput is null, using a valid chemical symbol.");
+ Logger.WARNING("materialInput is null, using a valid chemical symbol.");
this.vChemicalFormula = this.vChemicalSymbol;
}
else{
- Utils.LOG_WARNING("MaterialInput == null && chemicalSymbol probably equals nothing");
+ Logger.WARNING("MaterialInput == null && chemicalSymbol probably equals nothing");
this.vChemicalFormula = "??";
}
+
final Materials isValid = Materials.get(this.getLocalizedName());
-
if (FluidUtils.getFluidStack(localizedName, 1) != null){
this.vMoltenFluid = FluidUtils.getFluidStack(localizedName, 1).getFluid();
}
- else if (isValid == Materials._NULL){
+ else if (isValid == null || isValid == Materials._NULL){
this.vMoltenFluid = this.generateFluid();
}
else {
@@ -269,8 +281,6 @@ public class Material {
this.vPlasma = this.generatePlasma();
- //dataVar = MathUtils.generateSingularRandomHexValue();
-
String ratio = "";
if (this.vSmallestRatio != null) {
for (int hu=0;hu<this.vSmallestRatio.length;hu++){
@@ -283,14 +293,14 @@ public class Material {
}
}
- Utils.LOG_WARNING("Creating a Material instance for "+materialName);
- Utils.LOG_WARNING("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio);
- Utils.LOG_WARNING("Protons: "+this.vProtons);
- Utils.LOG_WARNING("Neutrons: "+this.vNeutrons);
- Utils.LOG_WARNING("Mass: "+this.vMass+"/units");
- Utils.LOG_WARNING("Melting Point: "+this.meltingPointC+"C.");
- Utils.LOG_WARNING("Boiling Point: "+this.boilingPointC+"C.");
- }
+ Logger.WARNING("Creating a Material instance for "+materialName);
+ Logger.WARNING("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio);
+ Logger.WARNING("Protons: "+this.vProtons);
+ Logger.WARNING("Neutrons: "+this.vNeutrons);
+ Logger.WARNING("Mass: "+this.vMass+"/units");
+ Logger.WARNING("Melting Point: "+this.meltingPointC+"C.");
+ Logger.WARNING("Boiling Point: "+this.boilingPointC+"C.");
+ }
public final String getLocalizedName(){
if (this.localizedName != null) {
@@ -448,8 +458,8 @@ public class Material {
try {
testNull = this.vMaterialInput.get(i).getValidStack();
} catch (final Throwable r){
- Utils.LOG_WARNING("Failed gathering material stack for "+this.localizedName+".");
- Utils.LOG_WARNING("What Failed: Length:"+this.vMaterialInput.size()+" current:"+i);
+ Logger.WARNING("Failed gathering material stack for "+this.localizedName+".");
+ Logger.WARNING("What Failed: Length:"+this.vMaterialInput.size()+" current:"+i);
}
try {
if (testNull != null){
@@ -457,7 +467,7 @@ public class Material {
temp[i] = this.vMaterialInput.get(i).getValidStack();
}
} catch (final Throwable r){
- Utils.LOG_WARNING("Failed setting slot "+i+", using "+this.localizedName);
+ Logger.WARNING("Failed setting slot "+i+", using "+this.localizedName);
}
}
return temp;
@@ -505,8 +515,8 @@ public class Material {
public final long[] getSmallestRatio(final ArrayList<MaterialStack> tempInput){
if (tempInput != null){
if (!tempInput.isEmpty()){
- Utils.LOG_WARNING("length: "+tempInput.size());
- Utils.LOG_WARNING("(inputs != null): "+(tempInput != null));
+ Logger.WARNING("length: "+tempInput.size());
+ Logger.WARNING("(inputs != null): "+(tempInput != null));
//Utils.LOG_WARNING("length: "+inputs.length);
final long[] tempRatio = new long[tempInput.size()];
for (int x=0;x<tempInput.size();x++){
@@ -524,7 +534,7 @@ public class Material {
for (int r=0;r<tempRatio.length;r++){
tempRatioStringThing1 = tempRatioStringThing1 + tempRatio[r] +" : ";
}
- Utils.LOG_WARNING("Default Ratio: "+tempRatioStringThing1);
+ Logger.WARNING("Default Ratio: "+tempRatioStringThing1);
String tempRatioStringThing = "";
int tempSmallestCraftingUseSize = 0;
@@ -533,7 +543,7 @@ public class Material {
tempSmallestCraftingUseSize = (int) (tempSmallestCraftingUseSize + smallestRatio[r]);
}
//this.smallestStackSizeWhenProcessing = tempSmallestCraftingUseSize;
- Utils.LOG_WARNING("Smallest Ratio: "+tempRatioStringThing);
+ Logger.WARNING("Smallest Ratio: "+tempRatioStringThing);
return smallestRatio;
}
}
@@ -545,7 +555,7 @@ public class Material {
if (!aShowQuestionMarks && (this.vChemicalFormula.equals("?")||this.vChemicalFormula.equals("??"))) {
return "";
}
- Utils.LOG_WARNING("===============| Calculating Atomic Formula for "+this.localizedName+" |===============");
+ Logger.WARNING("===============| Calculating Atomic Formula for "+this.localizedName+" |===============");
if (!chemSymbol.equals("")) {
return chemSymbol;
}
@@ -588,101 +598,164 @@ public class Material {
return StringUtils.subscript(dummyFormula);
//return dummyFormula;
}
- Utils.LOG_WARNING("dummyFormulaArray <= 0");
+ Logger.WARNING("dummyFormulaArray <= 0");
}
- Utils.LOG_WARNING("dummyFormulaArray == null");
+ Logger.WARNING("dummyFormulaArray == null");
}
- Utils.LOG_WARNING("tempInput.length <= 0");
+ Logger.WARNING("tempInput.length <= 0");
}
- Utils.LOG_WARNING("tempInput == null");
+ Logger.WARNING("tempInput == null");
return "??";
}
public final Fluid generateFluid(){
- try {
- if (Materials.get(this.localizedName) == Materials.Clay){
- return null;
- }
- } catch (final Throwable e){}
-
- if (Materials.get(this.localizedName).mFluid == null){
- Utils.LOG_WARNING("Generating our own fluid.");
-
- //Generate a Cell if we need to
- if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1) == null){
- if (this.vGenerateCells){
- final Item temp = new BaseItemCell(this);
+ final Materials isValid = Materials.get(this.getLocalizedName());
+ Logger.WARNING("Is "+this.getLocalizedName()+" a Gregtech material? "+(isValid != null && isValid != Materials._NULL)+" | Found "+isValid.mDefaultLocalName);
+ if (isValid != Materials._NULL){
+ for (Materials m : invalidMaterials.values()){
+ if (isValid == m){
+ Logger.WARNING("Trying to generate a fluid for blacklisted material: "+m.mDefaultLocalName);
+ FluidStack a1 = m.getFluid(1);
+ FluidStack a2 = m.getGas(1);
+ FluidStack a3 = m.getMolten(1);
+ FluidStack a4 = m.getSolid(1);
+ FluidStack a5 = m.getPlasma(1);
+ if (a1 != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. Fluid.");
+ return a1.getFluid();
+ }
+ if (a2 != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. Gas.");
+ return a2.getFluid();
+ }
+ if (a3 != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. Molten.");
+ return a3.getFluid();
+ }
+ if (a4 != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. Solid.");
+ return a4.getFluid();
+ }
+ if (a5 != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. Plasma.");
+ return a5.getFluid();
+ }
+ Logger.WARNING("Using null.");
+ return null;
}
}
+ }
- if (this.materialState == MaterialState.SOLID){
- return FluidUtils.addGTFluid(
- this.getUnlocalizedName(),
- "Molten "+this.getLocalizedName(),
- this.RGBA,
- this.materialState.ID(),
- this.getMeltingPointK(),
- ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
- ItemList.Cell_Empty.get(1L, new Object[0]),
- 1000);
+ if (this.materialState == MaterialState.SOLID){
+ if (isValid.mFluid != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mFluid.");
+ return isValid.mFluid;
+ }
+ else if (isValid.mStandardMoltenFluid != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mStandardMoltenFluid.");
+ return isValid.mStandardMoltenFluid;
}
- else if (this.materialState == MaterialState.LIQUID){
- return FluidUtils.addGTFluid(
- this.getUnlocalizedName(),
- this.getLocalizedName(),
- this.RGBA,
- this.materialState.ID(),
- this.getMeltingPointK(),
- ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
- ItemList.Cell_Empty.get(1L, new Object[0]),
- 1000);
+ }
+ else if (this.materialState == MaterialState.GAS){
+ if (isValid.mGas != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mGas.");
+ return isValid.mGas;
+ }
+ }
+ else if (this.materialState == MaterialState.LIQUID || this.materialState == MaterialState.PURE_LIQUID){
+ if (isValid.mFluid != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mFluid.");
+ return isValid.mFluid;
+ }
+ else if (isValid.mGas != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mGas.");
+ return isValid.mGas;
}
- else if (this.materialState == MaterialState.GAS){
- return FluidUtils.addGTFluid(
- this.getUnlocalizedName(),
- this.getLocalizedName()+" Gas",
- this.RGBA,
- this.materialState.ID(),
- this.getMeltingPointK(),
- ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
- ItemList.Cell_Empty.get(1L, new Object[0]),
- 1000);
+ else if (isValid.mStandardMoltenFluid != null){
+ Logger.WARNING("Using a pre-defined Fluid from GT. mStandardMoltenFluid.");
+ return isValid.mStandardMoltenFluid;
}
- else { //Plasma
- return this.generatePlasma();
+ }
+
+ Logger.WARNING("Generating our own fluid.");
+ //Generate a Cell if we need to
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1) == null){
+ if (this.vGenerateCells){
+ final Item temp = new BaseItemCell(this);
+ Logger.WARNING("Generated a cell for "+this.getUnlocalizedName());
}
+ else {
+ Logger.WARNING("Did not generate a cell for "+this.getUnlocalizedName());
+ }
+ }
+
+ if (this.materialState == MaterialState.SOLID){
+ return FluidUtils.addGTFluid(
+ this.getUnlocalizedName(),
+ "Molten "+this.getLocalizedName(),
+ this.RGBA,
+ this.materialState.ID(),
+ this.getMeltingPointK(),
+ ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
+ ItemList.Cell_Empty.get(1L, new Object[0]),
+ 1000);
+ }
+ else if (this.materialState == MaterialState.LIQUID){
+ return FluidUtils.addGTFluid(
+ this.getUnlocalizedName(),
+ this.getLocalizedName(),
+ this.RGBA,
+ this.materialState.ID(),
+ this.getMeltingPointK(),
+ ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
+ ItemList.Cell_Empty.get(1L, new Object[0]),
+ 1000);
+ }
+ else if (this.materialState == MaterialState.GAS){
+ return FluidUtils.addGTFluid(
+ this.getUnlocalizedName(),
+ this.getLocalizedName()+" Gas",
+ this.RGBA,
+ this.materialState.ID(),
+ this.getMeltingPointK(),
+ ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+this.getUnlocalizedName(), 1),
+ ItemList.Cell_Empty.get(1L, new Object[0]),
+ 1000);
+ }
+ else { //Plasma
+ return this.generatePlasma();
}
- Utils.LOG_WARNING("Getting the fluid from a GT material instead.");
- return Materials.get(this.localizedName).mFluid;
}
public final Fluid generatePlasma(){
- final Materials isValid = Materials.get(this.getLocalizedName());
- if ((isValid != Materials._NULL) && (isValid != null) && (isValid != Materials.Clay) && (isValid != Materials.Clay)
- && (isValid != Materials.Phosphorus) && (isValid != Materials.Steel) && (isValid != Materials.Bronze)){
- if (isValid.mPlasma != null){
- Utils.LOG_WARNING("Using a pre-defined Plasma from GT.");
- return isValid.mPlasma;
- }
- }
-
- if (this.vGenerateCells){
+ final Materials isValid = Materials.get(this.getLocalizedName());
+
+ if (!this.vGenerateCells){
return null;
}
-
- Utils.LOG_WARNING("Generating our own Plasma.");
+ for (Materials m : invalidMaterials.values()){
+ if (isValid == m){
+ return (m.mPlasma != null ? m.mPlasma : null);
+ }
+ }
+ if (isValid.mPlasma != null){
+ Logger.WARNING("Using a pre-defined Plasma from GT.");
+ return isValid.mPlasma;
+ }
+
+ Logger.WARNING("Generating our own Plasma.");
return FluidUtils.addGTPlasma(this);
- //return null;
}
- final public FluidStack getFluid(final int fluidAmount) {
- //Utils.LOG_WARNING("Attempting to get "+fluidAmount+"L of "+this.vMoltenFluid.getName());
+ final public FluidStack getFluid(final int fluidAmount) {
+ if (this.vMoltenFluid == null){
+ return null;
+ }
final FluidStack moltenFluid = new FluidStack(this.vMoltenFluid, fluidAmount);
- //Utils.LOG_WARNING("Info: "+moltenFluid.getFluid().getName()+" Info: "+moltenFluid.amount+" Info: "+moltenFluid.getFluidID());
return moltenFluid;
}
@@ -690,12 +763,17 @@ public class Material {
final public int calculateMeltingPoint(){
int meltingPoint = 0;
for (MaterialStack part : this.vMaterialInput){
- int incrementor = part.getStackMaterial().getMeltingPointC();
- meltingPoint += incrementor;
- Utils.LOG_WARNING("Melting Point for "+this.getLocalizedName()+" increased to "+ incrementor);
+ if (part != null){
+ int incrementor = part.getStackMaterial().getMeltingPointC();
+ meltingPoint += incrementor;
+ Logger.WARNING("Melting Point for "+this.getLocalizedName()+" increased to "+ incrementor);
+ }
+ else {
+ Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition.");
+ }
}
int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
- Utils.LOG_WARNING("Dividing "+meltingPoint+" / "+divisor+" to get average melting point.");
+ Logger.WARNING("Dividing "+meltingPoint+" / "+divisor+" to get average melting point.");
meltingPoint = (meltingPoint/divisor);
return meltingPoint;
}
@@ -703,7 +781,12 @@ public class Material {
final public int calculateBoilingPoint(){
int boilingPoint = 0;
for (MaterialStack part : this.vMaterialInput){
- boilingPoint += part.getStackMaterial().getBoilingPointC();
+ if (part != null){
+ boilingPoint += part.getStackMaterial().getBoilingPointC();
+ }
+ else {
+ Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition.");
+ }
}
int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
boilingPoint = (boilingPoint/divisor);
@@ -713,7 +796,12 @@ public class Material {
final public long calculateProtons(){
long protonCount = 0;
for (MaterialStack part : this.vMaterialInput){
- protonCount += (part.getStackMaterial().getProtons());
+ if (part != null){
+ protonCount += (part.getStackMaterial().getProtons());
+ }
+ else {
+ Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition.");
+ }
}
int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
protonCount = (protonCount/divisor);
@@ -723,7 +811,12 @@ public class Material {
final public long calculateNeutrons(){
long neutronCount = 0;
for (MaterialStack part : this.vMaterialInput){
- neutronCount += (part.getStackMaterial().getNeutrons());
+ if (part != null){
+ neutronCount += (part.getStackMaterial().getNeutrons());
+ }
+ else {
+ Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition.");
+ }
}
int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1);
neutronCount = (neutronCount/divisor);
diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java
index 65c0f1e6c0..727f929036 100644
--- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java
+++ b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java
@@ -1,5 +1,6 @@
package gtPlusPlus.core.material;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
import gtPlusPlus.core.block.base.BlockBaseModular;
import gtPlusPlus.core.item.base.bolts.BaseItemBolt;
@@ -8,6 +9,7 @@ import gtPlusPlus.core.item.base.gears.BaseItemGear;
import gtPlusPlus.core.item.base.ingots.BaseItemIngot;
import gtPlusPlus.core.item.base.ingots.BaseItemIngotHot;
import gtPlusPlus.core.item.base.nugget.BaseItemNugget;
+import gtPlusPlus.core.item.base.ore.BaseItemCrushedOre;
import gtPlusPlus.core.item.base.plates.BaseItemPlate;
import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble;
import gtPlusPlus.core.item.base.rings.BaseItemRing;
@@ -19,15 +21,7 @@ import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_AlloySmelter;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Assembler;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelter;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Extruder;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Fluids;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Plates;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling;
-import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_ShapedCrafting;
+import gtPlusPlus.xmod.gregtech.loaders.*;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
@@ -132,6 +126,18 @@ public class MaterialGenerator {
FluidUtils.generateFluidNoPrefix(unlocalizedName, materialName, matInfo.getMeltingPointK(), C);
return true;
}
+ else if (matInfo.getState() == MaterialState.ORE){
+ if (sRadiation >= 1){
+ Item temp;
+ Block tempBlock;
+ tempBlock = new BlockBaseModular(matInfo ,BlockTypes.ORE, Colour);
+
+ temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation);
+ temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation);
+ temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation);
+ temp = new BaseItemCrushedOre(matInfo);
+ }
+ }
//Add A jillion Recipes - old code
RecipeGen_AlloySmelter.generateRecipes(matInfo);
@@ -146,9 +152,11 @@ public class MaterialGenerator {
RecipeGen_ShapedCrafting.generateRecipes(matInfo);
new RecipeGen_Recycling(matInfo);
return true;
- } catch (final Throwable t)
+
+ } catch (final Throwable t)
+
{
- Utils.LOG_INFO(""+matInfo.getLocalizedName()+" failed to generate.");
+ Logger.WARNING(""+matInfo.getLocalizedName()+" failed to generate.");
return false;
}
}
@@ -219,7 +227,7 @@ public class MaterialGenerator {
RecipeGen_DustGeneration.generateRecipes(matInfo, true);
new RecipeGen_Recycling(matInfo);
} catch (final Throwable t){
- Utils.LOG_INFO(""+matInfo.getLocalizedName()+" failed to generate.");
+ Logger.WARNING(""+matInfo.getLocalizedName()+" failed to generate.");
}
}
diff --git a/src/Java/gtPlusPlus/core/material/MaterialStack.java b/src/Java/gtPlusPlus/core/material/MaterialStack.java
index e18d738b97..ad7af2052f 100644
--- a/src/Java/gtPlusPlus/core/material/MaterialStack.java
+++ b/src/Java/gtPlusPlus/core/material/MaterialStack.java
@@ -3,7 +3,9 @@ package gtPlusPlus.core.material;
import java.math.BigDecimal;
import java.math.RoundingMode;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.item.ItemStack;
public class MaterialStack {
@@ -51,6 +53,14 @@ public class MaterialStack {
}
public Material getStackMaterial(){
+ if (this.stackMaterial == null){
+ Logger.MATERIALS("Tried getStackMaterial, got an invalid material.");
+ Logger.MATERIALS(ReflectionUtils.getMethodName(0));
+ Logger.MATERIALS(ReflectionUtils.getMethodName(1));
+ Logger.MATERIALS(ReflectionUtils.getMethodName(2));
+ Logger.MATERIALS(ReflectionUtils.getMethodName(3));
+ return null;
+ }
return this.stackMaterial;
}
diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java
new file mode 100644
index 0000000000..4057092a48
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/ORES.java
@@ -0,0 +1,84 @@
+package gtPlusPlus.core.material;
+
+import gtPlusPlus.core.material.state.MaterialState;
+
+public final class ORES {
+
+ public static final Material GEIKIELITE = new Material(
+ "Geikielite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{187, 193, 204, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().TITANIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 3)
+ });
+
+ public static final Material ZIMBABWEITE = new Material(
+ "Zimbabweite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{193, 187, 131, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().SODIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().POTASSIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().LEAD, 1),
+ new MaterialStack(ELEMENT.getInstance().ARSENIC, 4),
+ new MaterialStack(ELEMENT.getInstance().NIOBIUM, 4),
+ new MaterialStack(ELEMENT.getInstance().TANTALUM, 4),
+ new MaterialStack(ELEMENT.getInstance().TITANIUM, 4),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 18)
+ });
+
+ public static final Material TITANITE = new Material(
+ "Titanite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{184, 198, 105, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().CALCIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().TITANIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().SILICON, 2),
+ new MaterialStack(ELEMENT.getInstance().THORIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 10)
+ });
+
+ public static final Material ZIRCONILITE = new Material(
+ "Zirconolite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{45, 26, 0, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().CALCIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().TITANIUM, 4),
+ new MaterialStack(ELEMENT.getInstance().CERIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 14)
+ });
+
+ public static final Material CROCROITE = new Material(
+ "Crocoite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{255, 143, 84, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().LEAD, 1),
+ new MaterialStack(ELEMENT.getInstance().CHROMIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 4)
+ });
+
+ public static final Material NICHROMITE = new Material(
+ "Nichromite", //Material Name
+ MaterialState.ORE, //State
+ new short[]{22, 19, 19, 0}, //Material Colour
+ 0, //Radiation
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().NICKEL, 1),
+ new MaterialStack(ELEMENT.getInstance().COBALT, 1),
+ new MaterialStack(ELEMENT.getInstance().IRON, 3),
+ new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 8)
+ });
+}
diff --git a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
index c6043a1b3d..5f83074a0d 100644
--- a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
+++ b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
@@ -19,6 +19,7 @@ public class FLUORIDES {
((ELEMENT.getInstance().CALCIUM.getProtons()+(ELEMENT.getInstance().FLUORINE.getProtons()*2))/3), //Protons
((ELEMENT.getInstance().CALCIUM.getNeutrons()+(ELEMENT.getInstance().FLUORINE.getNeutrons()*2))/3), //Neutrons
false, //Uses Blast furnace?
+ false, //Generate cells
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().CALCIUM, 1),
diff --git a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
index f6c7d952b8..ea21a1d270 100644
--- a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
+++ b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java
@@ -13,18 +13,16 @@ public final class NUCLIDE {
public static NUCLIDE getInstance(){return thisClass;}
//Custom Isotopes
- public final Material LITHIUM7 = new Material("Lithium 7", MaterialState.LIQUID, Materials.Lithium.mRGBa, Materials.Lithium.mMeltingPoint, Materials.Lithium.mBlastFurnaceTemp, Materials.Lithium.getProtons(), Materials.Lithium.getNeutrons(), Materials.Lithium.mBlastFurnaceRequired, StringUtils.superscript("7Li"), 0);//Not a GT Inherited Material
+ public final Material LITHIUM7 = new Material("Lithium 7", MaterialState.LIQUID, Materials.Lithium.mRGBa, Materials.Lithium.mMeltingPoint, Materials.Lithium.mBlastFurnaceTemp, Materials.Lithium.getProtons(), Materials.Lithium.getNeutrons(), Materials.Lithium.mBlastFurnaceRequired, StringUtils.superscript("7Li"), 0, false);//Not a GT Inherited Material
public final Material URANIUM232 = new Material("Uranium 232", MaterialState.SOLID, new short[]{88, 220, 103, 0}, 1132, 4131, 92, 140, false, StringUtils.superscript("232U"), 4);//Not a GT Inherited Material
public final Material URANIUM233 = new Material("Uranium 233", MaterialState.SOLID, new short[]{73, 220, 83, 0}, 1132, 4131, 92, 141, false, StringUtils.superscript("233U"), 2);//Not a GT Inherited Material
- public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1);//Not a GT Inherited Material
+ public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1, false);//Not a GT Inherited Material
//RTG Fuels
- public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2);//Not a GT Inherited Material
- public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2);//Not a GT Inherited Material
- public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, ELEMENT.getInstance().POLONIUM.vDurability, ELEMENT.getInstance().POLONIUM.getRGBA(), ELEMENT.getInstance().POLONIUM.getMeltingPointK(), ELEMENT.getInstance().POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2);//Not a GT Inherited Material
- public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2);//Not a GT Inherited Material
-
-
+ public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material
+ public final Material STRONTIUM90 = new Material("Strontium-90", MaterialState.SOLID, Materials.Strontium.mDurability, Materials.Strontium.mRGBa, Materials.Strontium.mMeltingPoint, Materials.Strontium.mBlastFurnaceTemp, 38, 52, false, StringUtils.superscript("90Sr"), 2, false);//Not a GT Inherited Material
+ public final Material POLONIUM210 = new Material("Polonium-210", MaterialState.SOLID, ELEMENT.getInstance().POLONIUM.vDurability, ELEMENT.getInstance().POLONIUM.getRGBA(), ELEMENT.getInstance().POLONIUM.getMeltingPointK(), ELEMENT.getInstance().POLONIUM.getBoilingPointK(), 84, 126, false, StringUtils.superscript("210Po"), 2, false);//Not a GT Inherited Material
+ public final Material AMERICIUM241 = new Material("Americium-241", MaterialState.SOLID, Materials.Americium.mDurability, Materials.Americium.mRGBa, Materials.Americium.mMeltingPoint, Materials.Americium.mBlastFurnaceTemp, 95, 146, false, StringUtils.superscript("241Am"), 2, false);//Not a GT Inherited Material
public static final Material LiFBeF2ThF4UF4 = new Material(
"LiFBeF2ThF4UF4", //Material Name
diff --git a/src/Java/gtPlusPlus/core/material/state/MaterialState.java b/src/Java/gtPlusPlus/core/material/state/MaterialState.java
index 88447395db..284e9582f1 100644
--- a/src/Java/gtPlusPlus/core/material/state/MaterialState.java
+++ b/src/Java/gtPlusPlus/core/material/state/MaterialState.java
@@ -5,7 +5,8 @@ public enum MaterialState {
LIQUID(1),
GAS(2),
PLASMA(3),
- PURE_LIQUID(4);
+ PURE_LIQUID(4),
+ ORE(5);
private int STATE;
private MaterialState (final int State){
this.STATE = State;
diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
index 448188379a..712df63e67 100644
--- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
+++ b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
@@ -12,6 +12,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.client.renderer.*;
import gtPlusPlus.core.common.CommonProxy;
import gtPlusPlus.core.common.compat.COMPAT_PlayerAPI;
@@ -25,7 +26,6 @@ import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.general.TileEntityFirepit;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.particles.EntityParticleFXMysterious;
import gtPlusPlus.xmod.gregtech.common.render.GTPP_CapeRenderer;
import net.minecraft.client.Minecraft;
@@ -37,9 +37,13 @@ public class ClientProxy extends CommonProxy implements Runnable{
private final HashSet<String> mCapeList = new HashSet<String>();
private final GTPP_CapeRenderer mCapeRenderer;
+ @SideOnly(Side.CLIENT)
+ public static boolean mFancyGraphics = false;
public ClientProxy(){
mCapeRenderer = new GTPP_CapeRenderer(mCapeList);
+ //Get Graphics Mode.
+ mFancyGraphics = Minecraft.isFancyGraphicsEnabled();
}
@SubscribeEvent
@@ -85,18 +89,18 @@ public class ClientProxy extends CommonProxy implements Runnable{
//RenderingRegistry.registerEntityRenderingHandler(EntityBloodSteelMob.class, new RenderBloodSteelMob(new ModelBloodSteelMob(), 0));
//RenderingRegistry.registerEntityRenderingHandler(EntityBloodSteelHostileMob.class, new RenderBloodSteelMobHostile(new ModelBloodSteelMob(), 0));
//RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(ModItems.tutGrenade));
- Utils.LOG_INFO("Registering Custom Renderer for Mining Explosives.");
+ Logger.INFO("Registering Custom Renderer for Mining Explosives.");
RenderingRegistry.registerEntityRenderingHandler(EntityPrimedMiningExplosive.class, new RenderMiningExplosivesPrimed());
RenderingRegistry.registerEntityRenderingHandler(EntitySickBlaze.class, new RenderSickBlaze());
RenderingRegistry.registerEntityRenderingHandler(EntityStaballoyConstruct.class, new RenderStaballoyConstruct());
RenderingRegistry.registerEntityRenderingHandler(EntityToxinballSmall.class, new RenderToxinball(1F));
- Utils.LOG_INFO("Registering Custom Renderer for Sulfuric potion.");
+ Logger.INFO("Registering Custom Renderer for Sulfuric potion.");
RenderingRegistry.registerEntityRenderingHandler(EntitySulfuricAcidPotion.class, new RenderSnowball(ModItems.itemSulfuricPotion));
//ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBloodSteelChest.class, new BloodSteelChestRenderer());
//MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.tutChest), new ItemRenderBloodSteelChest());
- Utils.LOG_INFO("Registering Custom Renderer for the Fire Pit.");
+ Logger.INFO("Registering Custom Renderer for the Fire Pit.");
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFirepit.class, new FirepitRender());
}
@@ -166,10 +170,11 @@ public class ClientProxy extends CommonProxy implements Runnable{
}
}
+ @Override
public void run() {
try {
if (ConfigSwitches.enableCustomCapes){
- Utils.LOG_INFO("GT++ Mod: Downloading Cape List.");
+ Logger.INFO("GT++ Mod: Downloading Cape List.");
@SuppressWarnings("resource")
Scanner tScanner = new Scanner(new URL("https://github.com/draknyte1/GTplusplus/blob/master/SupporterList.txt").openStream());
while (tScanner.hasNextLine()) {
@@ -180,7 +185,7 @@ public class ClientProxy extends CommonProxy implements Runnable{
}
}
} catch (Throwable e) {
- Utils.LOG_INFO("Failed to download GT++ cape list.");
+ Logger.INFO("Failed to download GT++ cape list.");
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java b/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java
index f9db59ddb4..62c17817b6 100644
--- a/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java
+++ b/src/Java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.recipe;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -79,7 +79,7 @@ public class Gregtech_Recipe_Adder {
}
private static void addBlastFurnaceRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1, final ItemStack output2, final int tempRequired){
- Utils.LOG_INFO("Registering Blast Furnace Recipes.");
+ Logger.INFO("Registering Blast Furnace Recipes.");
GT_Values.RA.addBlastRecipe(
input1,
input2,
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index de1812d05a..a9d2bcef32 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -11,6 +11,7 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.HotFuel;
import gregtech.api.util.ThermalFuel;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
@@ -18,7 +19,6 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -33,7 +33,7 @@ import net.minecraftforge.fluids.FluidStack;
public class RECIPES_GREGTECH {
public static void run(){
- Utils.LOG_INFO("Loading Recipes through GregAPI for Industrial Multiblocks.");
+ Logger.INFO("Loading Recipes through GregAPI for Industrial Multiblocks.");
execute();
}
@@ -380,7 +380,7 @@ public class RECIPES_GREGTECH {
}
private static void cokeOvenRecipes(){
- Utils.LOG_INFO("Loading Recipes for Industrial Coking Oven.");
+ Logger.INFO("Loading Recipes for Industrial Coking Oven.");
//Wood to Charcoal
AddGregtechRecipe.addCokeAndPyrolyseRecipes(
@@ -417,7 +417,7 @@ public class RECIPES_GREGTECH {
}
private static void matterFabRecipes(){
- Utils.LOG_INFO("Loading Recipes for Matter Fabricator.");
+ Logger.INFO("Loading Recipes for Matter Fabricator.");
try {
@@ -426,7 +426,7 @@ public class RECIPES_GREGTECH {
Materials.UUMatter.getFluid(1L), //Fluid Output
800, //Time in ticks
32); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
CORE.RA.addMatterFabricatorRecipe(
@@ -434,12 +434,12 @@ public class RECIPES_GREGTECH {
Materials.UUMatter.getFluid(1L), //Fluid Output
3200, //Time in ticks
32); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
private static void dehydratorRecipes(){
- Utils.LOG_INFO("Loading Recipes for Chemical Dehydrator.");
+ Logger.INFO("Loading Recipes for Chemical Dehydrator.");
try {
//Makes Lithium Carbonate
@@ -456,7 +456,7 @@ public class RECIPES_GREGTECH {
}, //Output Array of Items - Upto 9
30*20, //Time in ticks
30); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
ItemStack cells = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemCellEmpty", "Empty Fluid Cells", 0, 12);
@@ -482,7 +482,7 @@ public class RECIPES_GREGTECH {
75*20, //Time in ticks
1000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
CORE.RA.addDehydratorRecipe(
@@ -499,7 +499,7 @@ public class RECIPES_GREGTECH {
150*20, //Time in ticks
2000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
CORE.RA.addDehydratorRecipe(
@@ -516,7 +516,7 @@ public class RECIPES_GREGTECH {
300*20, //Time in ticks
4000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//Raisins from Grapes
try {
@@ -534,7 +534,7 @@ public class RECIPES_GREGTECH {
10*20, //Time in ticks
8); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//Calcium Hydroxide
if ((ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1).getItem() != ModItems.AAA_Broken) || LoadedMods.IHL){
@@ -553,7 +553,7 @@ public class RECIPES_GREGTECH {
120*20, //Time in ticks
120); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//2 LiOH + CaCO3
try {
@@ -572,7 +572,7 @@ public class RECIPES_GREGTECH {
120*20, //Time in ticks
1000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//LiOH Liquid to Dust
try {
@@ -590,7 +590,7 @@ public class RECIPES_GREGTECH {
1*20, //Time in ticks
64); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//Zirconium Chloride -> TetraFluoride
try {
@@ -610,7 +610,7 @@ public class RECIPES_GREGTECH {
120*20, //Time in ticks
500); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//CaF2 + H2SO4 → CaSO4(solid) + 2 HF
try {
@@ -634,7 +634,7 @@ public class RECIPES_GREGTECH {
10*60*20, //Time in ticks
230); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//Be(OH)2 + 2 (NH4)HF2 → (NH4)2BeF4 + 2 H2O
try {
@@ -654,7 +654,7 @@ public class RECIPES_GREGTECH {
64); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
//(NH4)2BeF4 → 2 NH3 + 2 HF + BeF2
try {
@@ -673,7 +673,7 @@ public class RECIPES_GREGTECH {
5*60*20, //Time in ticks
120); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
@@ -682,7 +682,7 @@ public class RECIPES_GREGTECH {
private static void lftrRecipes(){
try {
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
//Fli2BeF4 + Thorium TetraFluoride = Uranium233
CORE.RA.addLFTRRecipe(
@@ -692,7 +692,7 @@ public class RECIPES_GREGTECH {
300*60*20, //Time in ticks
3500); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
//Fli2BeF4 + Uranium235 = 1x Uranium233
CORE.RA.addLFTRRecipe(
@@ -701,7 +701,7 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("molten.uraniumhexafluoride", 3*144), //Output Array of Items - Upto 9,
120*60*20, //Time in ticks
8000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
try {
//Fli2BeF4 + Uranium233 TetraFluoride = Uranium233
CORE.RA.addLFTRRecipe(
@@ -711,7 +711,7 @@ public class RECIPES_GREGTECH {
420*60*20, //Time in ticks
4000); //EU
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
private static void fissionFuelRecipes(){
@@ -768,7 +768,7 @@ public class RECIPES_GREGTECH {
60*60*20, //Duration
500);
- }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
private static void assemblerRecipes(){
@@ -790,7 +790,7 @@ public class RECIPES_GREGTECH {
}
private static void distilleryRecipes(){
- Utils.LOG_INFO("Registering Distillery/Distillation Tower Recipes.");
+ Logger.INFO("Registering Distillery/Distillation Tower Recipes.");
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), FluidUtils.getFluidStack("air", 1000), FluidUtils.getFluidStack("helium", 1), 400, 30, false);
GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("air", 20000), FluidUtils.getFluidStackArray("helium", 25), ItemUtils.getSimpleStack(ModItems.itemHydrogenBlob, 1), 200, 60);
@@ -834,7 +834,7 @@ public class RECIPES_GREGTECH {
}
private static void addFuels(){
- Utils.LOG_INFO("Registering New Fuels.");
+ Logger.INFO("Registering New Fuels.");
GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketFire_water", 0, 1), null, 120, 0);
GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketRocket_fuel", 0, 1), null, 112, 0);
GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketHootch", 0, 1), null, 36, 0);
@@ -883,7 +883,7 @@ public class RECIPES_GREGTECH {
}
private static void extractorRecipes(){
- Utils.LOG_INFO("Registering Extractor Recipes.");
+ Logger.INFO("Registering Extractor Recipes.");
GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Sodium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(4L, new Object[0]));
GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Cadmium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(4L, new Object[0]));
GT_ModHandler.addExtractionRecipe(GregtechItemList.Battery_RE_EV_Lithium.get(1L, new Object[0]), ItemList.Battery_Hull_HV.get(4L, new Object[0]));
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
index 16cef8bc27..9e9482932d 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
@@ -5,12 +5,12 @@ import static gtPlusPlus.core.util.item.ItemUtils.getSimpleStack;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
@@ -98,7 +98,7 @@ public class RECIPES_General {
"stickWood", "treeSapling", "stickWood",
"stickWood", "dustBone", "stickWood",
ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Rainforest))){
- Utils.LOG_INFO("Added a recipe for Rainforest oak Saplings.");
+ Logger.INFO("Added a recipe for Rainforest oak Saplings.");
}
if (!CORE.GTNH) {
@@ -110,7 +110,7 @@ public class RECIPES_General {
ironBars, "frameGtWroughtIron", ironBars,
ironBars, ironBars, ironBars,
ItemUtils.getSimpleStack(ModBlocks.blockFishTrap))){
- Utils.LOG_INFO("Added a recipe for the Fish Trap.");
+ Logger.INFO("Added a recipe for the Fish Trap.");
}
} else {
//Steel Bars
@@ -121,7 +121,7 @@ public class RECIPES_General {
steelBars, "frameGtWroughtIron", steelBars,
steelBars, steelBars, steelBars,
ItemUtils.getSimpleStack(ModBlocks.blockFishTrap))) {
- Utils.LOG_INFO("Added a recipe for the Fish Trap.");
+ Logger.INFO("Added a recipe for the Fish Trap.");
}
}
@@ -131,7 +131,7 @@ public class RECIPES_General {
"gemFlawlessRuby", ItemList.Credit_Greg_Naquadah.get(1), "gemFlawlessSapphire",
"gemExquisiteEmerald", "gemFlawlessEmerald", "gemExquisiteSapphire",
ItemUtils.getSimpleStack(ModItems.itemAlkalusDisk))){
- Utils.LOG_INFO("Added a recipe for The Alkalus Disk.");
+ Logger.INFO("Added a recipe for The Alkalus Disk.");
}
final String fancyGems[] = new String[]{"gemExquisiteDiamond", "gemExquisiteEmerald", "gemExquisiteRuby", "gemExquisiteSapphire"};
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
index 4f5cfd74e6..889af1753d 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
@@ -4,8 +4,8 @@ import gregtech.api.enums.*;
import gregtech.api.interfaces.IOreRecipeRegistrator;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraft.item.ItemStack;
@@ -24,22 +24,22 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.YttriumBariumCuprate, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480);
}
else {
- Utils.LOG_INFO("foilYttriumBariumCuprate does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("foilYttriumBariumCuprate does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilVanadiumGallium", 1) != null){
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.VanadiumGallium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480);
}
else {
- Utils.LOG_INFO("foilVanadiumGallium does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("foilVanadiumGallium does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilNiobiumTitanium", 1) != null){
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_IV.get(1L, new Object[0]), 64, 480);
}
else {
- Utils.LOG_INFO("foilNiobiumTitanium does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("foilNiobiumTitanium does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
}
@@ -50,8 +50,8 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Osmium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_LuV.get(1L, new Object[0]), 64, 1024);
}
else {
- Utils.LOG_INFO("foilOsmium does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("foilOsmium does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
}
@@ -63,8 +63,8 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Naquadah, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(1L, new Object[0]), 64, 2000);
}
else {
- Utils.LOG_INFO("foilNaquadah does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("foilNaquadah does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
}
} else if (aOreDictName.equals(OreDictNames.craftingLensWhite.toString())) {
@@ -72,15 +72,15 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lithium, 2L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("plateDoubleLithium7", 1), 4*60*20, 2000);
}
else {
- Utils.LOG_INFO("plateLithium does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("plateLithium does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLithium", 1) != null){
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 3L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), 2*60*20, 2000);
}
else {
- Utils.LOG_INFO("dustLithium does not exist within Gregtech, please report this issue to Blood-asp on github.");
- Utils.LOG_INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
+ Logger.INFO("dustLithium does not exist within Gregtech, please report this issue to Blood-asp on github.");
+ Logger.INFO("This material item can be re-enabled within the gregtech configuration files, If you wish to fix this yourself.");
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java
index 8f7304588d..bf3bf2ac9a 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.recipe;
import java.util.ArrayList;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.core.util.wrapper.var;
@@ -99,7 +99,7 @@ public class RECIPES_MTWRAPPER {
k.getClass();
k.printStackTrace();
k.getLocalizedMessage();
- Utils.LOG_WARNING("@@@: Invalid Recipe detected for: "+((var) item_Output).getsanitizedName());
+ Logger.WARNING("@@@: Invalid Recipe detected for: "+((var) item_Output).getsanitizedName());
MT_RECIPES_FAILED++;
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java
index 14921c645e..6f72c9c03b 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_MachineComponents.java
@@ -2,9 +2,9 @@ package gtPlusPlus.core.recipe;
import gregtech.api.enums.*;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -94,7 +94,7 @@ public class RECIPES_MachineComponents {
public static String smallGearTier10 = "gearGtSmallNeutronium";
public static final void RECIPES_LOAD(){
- Utils.LOG_INFO("Loading Recipes for the Various Circuits and Machine components.");
+ Logger.INFO("Loading Recipes for the Various Circuits and Machine components.");
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
run();
}
@@ -284,7 +284,7 @@ public class RECIPES_MachineComponents {
onlyULVComponents();
- Utils.LOG_INFO("Done loading recipes for the Various machine components.");
+ Logger.INFO("Done loading recipes for the Various machine components.");
}
@@ -383,7 +383,7 @@ public class RECIPES_MachineComponents {
private static void GregtechMachinePhase(){
if (CORE.ConfigSwitches.enableCustomCircuits && !CORE.GTNH){
- Utils.LOG_INFO("Adding Gregtech machine recipes for the circuits.");
+ Logger.INFO("Adding Gregtech machine recipes for the circuits.");
GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_IV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_IV.get(1L, new Object[0]), 32, 256);
GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GregtechItemList.Circuit_Parts_Wiring_LuV.get(4L, new Object[0]), GregtechItemList.Circuit_Board_LuV.get(1L, new Object[0]), 64, 512);
GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GregtechItemList.Circuit_Parts_Wiring_ZPM.get(4L, new Object[0]), GregtechItemList.Circuit_Board_ZPM.get(1L, new Object[0]), 96, 1024);
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index f2f9135194..097802b32b 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -2,12 +2,12 @@ package gtPlusPlus.core.recipe;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -183,7 +183,7 @@ public class RECIPES_Machines {
public static final void RECIPES_LOAD(){
run();
- Utils.LOG_INFO("Loading Recipes for the Various machine blocks.");
+ Logger.INFO("Loading Recipes for the Various machine blocks.");
}
private static void run(){
@@ -547,7 +547,7 @@ public class RECIPES_Machines {
//Tiered Tanks
if (CORE.ConfigSwitches.enableMachine_FluidTanks){
- Utils.LOG_WARNING("Is New Horizons Loaded? "+CORE.GTNH);
+ Logger.WARNING("Is New Horizons Loaded? "+CORE.GTNH);
if (!CORE.GTNH){
RecipeUtils.addShapedGregtechRecipe(
CI.component_Plate[1], CI.component_Plate[1], CI.component_Plate[1],
@@ -1119,6 +1119,6 @@ public class RECIPES_Machines {
}
- Utils.LOG_INFO("Done loading recipes for the Various machine blocks.");
+ Logger.INFO("Done loading recipes for the Various machine blocks.");
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java
index 446f1a1414..e421fd2601 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Old_Circuits.java
@@ -6,10 +6,10 @@ import gregtech.api.enums.*;
import gregtech.api.interfaces.IOreRecipeRegistrator;
import gregtech.api.util.*;
import gregtech.common.GT_Proxy;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -23,7 +23,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator {
@Override
public void registerOre(final OrePrefixes aPrefix, final Materials aMaterial, final String aOreDictName, final String aModName, final ItemStack aStack) {
if (aOreDictName.equals(OreDictNames.craftingLensRed.toString())) {
- Utils.LOG_INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 2)");
+ Logger.INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 2)");
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30);
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.AnnealedCopper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30);
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Wiring_Advanced.get(1L, new Object[0]), 64, 120);
@@ -32,20 +32,20 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator {
}
else if (aOreDictName.equals(OreDictNames.craftingLensGreen.toString())) {
- Utils.LOG_INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 3)");
+ Logger.INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 3)");
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480);
GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480);
}
else if (aOreDictName.equals(OreDictNames.craftingLensBlue.toString()) || aOreDictName.equals(OreDictNames.craftingLensCyan.toString()) || aOreDictName.equals(OreDictNames.craftingLensLightBlue.toString())) {
- Utils.LOG_INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 4)");
+ Logger.INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 4)");
GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), GregtechItemList.Old_Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 256, 480);
}
}
private static boolean addCircuitRecipes(){
- Utils.LOG_INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 1)");
+ Logger.INFO("[Old Feature - Circuits] Adding recipes for old circuits. (Part 1)");
GT_ModHandler.addShapelessCraftingRecipe(GregtechItemList.Old_Circuit_Primitive.get(1L, new Object[0]), new Object[]{GT_ModHandler.getIC2Item("casingadviron", 1L), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.Tin)});
GT_ModHandler.addCraftingRecipe(GregtechItemList.Old_Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)});
GT_ModHandler.addCraftingRecipe(GregtechItemList.Old_Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)});
@@ -101,7 +101,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator {
}
private static boolean removeNewCircuits(){
- Utils.LOG_INFO("[Old Feature - Circuits] Overriding .28+ circuit values in the GT5u Itemlist with values from GT++.");
+ Logger.INFO("[Old Feature - Circuits] Overriding .28+ circuit values in the GT5u Itemlist with values from GT++.");
ItemList.Circuit_Primitive.set(GregtechItemList.Old_Circuit_Primitive.get(1));
ItemList.Circuit_Basic.set(GregtechItemList.Old_Circuit_Basic.get(1));
@@ -275,7 +275,7 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator {
private static boolean hideCircuitsNEI(){
Boolean isNEILoaded = Loader.isModLoaded("NotEnoughItems");
if (isNEILoaded && !CORE.ConfigSwitches.showHiddenNEIItems){
- Utils.LOG_INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI.");
+ Logger.INFO("[Old Feature - Circuits] Hiding .28+ circuits in NEI.");
String[] CircuitToHide = {
"Circuit_Board_Basic",
"Circuit_Board_Advanced",
@@ -373,8 +373,8 @@ public class RECIPES_Old_Circuits implements IOreRecipeRegistrator {
try {
API.hideItem(ItemList.valueOf(component).get(1L, new Object[0]));
} catch (IllegalArgumentException I){
- Utils.LOG_INFO("Could not find "+component+" in the Gregtech item list.");
- Utils.LOG_INFO("This is NOT an error, simply a notification.");
+ Logger.INFO("Could not find "+component+" in the Gregtech item list.");
+ Logger.INFO("This is NOT an error, simply a notification.");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java
index c1f88d91d0..55cc086121 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Shapeless.java
@@ -1,7 +1,7 @@
package gtPlusPlus.core.recipe;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.item.ItemStack;
public class RECIPES_Shapeless {
@@ -21,7 +21,7 @@ public class RECIPES_Shapeless {
public static final void RECIPES_LOAD(){
//run();
- Utils.LOG_INFO("Loading Shapeless Recipes.");
+ Logger.INFO("Loading Shapeless Recipes.");
}
private static void run(){
diff --git a/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java b/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java
index 9719416766..61c1f463fc 100644
--- a/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java
+++ b/src/Java/gtPlusPlus/core/recipe/ShapedRecipeObject.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.recipe;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.item.ItemStack;
@@ -32,7 +32,7 @@ public class ShapedRecipeObject {
this.object_H = input_H;
this.object_I = input_I;
this.object_OUTPUT = input_Output;
- Utils.LOG_SPECIFIC_WARNING("ShapedRecipeObject", "New object created.", 36);
+ Logger.SPECIFIC_WARNING("ShapedRecipeObject", "New object created.", 36);
}
public void buildRecipe(){
diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java
index 2d857ca25a..9159025922 100644
--- a/src/Java/gtPlusPlus/core/recipe/common/CI.java
+++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java
@@ -2,6 +2,7 @@ package gtPlusPlus.core.recipe.common;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ALLOY;
@@ -389,18 +390,18 @@ public class CI {
if (material instanceof Materials){
//return (ItemStack) type.get(material);
String materialName = ((Materials) material).mDefaultLocalName;
- Utils.LOG_INFO("Searching for a component named "+type.name()+materialName);
+ Logger.INFO("Searching for a component named "+type.name()+materialName);
//return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1);
return (type.name()+materialName);
}
else {
String materialName = (Utils.sanitizeString(((Material) material).getLocalizedName()));
- Utils.LOG_INFO("Searching for a component named "+type.name()+materialName);
+ Logger.INFO("Searching for a component named "+type.name()+materialName);
//return ItemUtils.getItemStackOfAmountFromOreDict(type.name()+materialName, 1);
return (type.name()+materialName);
}
}
- Utils.LOG_INFO("[Components] Failed getting a tiered component. "+type.name()+" | "+tier);
+ Logger.INFO("[Components] Failed getting a tiered component. "+type.name()+" | "+tier);
return null;
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java
index 0b8235fcd8..603021237a 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java
@@ -1,7 +1,7 @@
package gtPlusPlus.core.slots;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.interfaces.IItemBlueprint;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@@ -15,10 +15,10 @@ public class SlotBlueprint extends Slot {
@Override
public boolean isItemValid(final ItemStack itemstack) {
if (itemstack.getItem() instanceof IItemBlueprint) {
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is a valid Blueprint.");
+ Logger.WARNING(itemstack.getDisplayName() + " is a valid Blueprint.");
return true;
}
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is not a valid Blueprint.");
+ Logger.WARNING(itemstack.getDisplayName() + " is not a valid Blueprint.");
return false;
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java b/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java
index 3578eaedf1..af7c7c9c59 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java
@@ -31,25 +31,36 @@ public class SlotBuzzSaw extends Slot {
if (OrePrefixes.craftingTool.contains(itemstack)) {
if (itemstack.getDisplayName().toLowerCase().contains("saw")
|| itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.10")
+ || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.110")
+ || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.112")
+ || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.114")
|| itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")) {
if (itemstack.getItemDamage() == 10) {
isValid = true;
this.currentTool = SAWTOOL.SAW;
}
- if (itemstack.getItemDamage() == 140) {
+ else if (itemstack.getItemDamage() == 110) {
+ isValid = true;
+ this.currentTool = SAWTOOL.CHAINSAW;
+ }
+ else if (itemstack.getItemDamage() == 112) {
+ isValid = true;
+ this.currentTool = SAWTOOL.CHAINSAW;
+ }
+ else if (itemstack.getItemDamage() == 114) {
+ isValid = true;
+ this.currentTool = SAWTOOL.CHAINSAW;
+ }
+ else if (itemstack.getItemDamage() == 140) {
isValid = true;
this.currentTool = SAWTOOL.BUZZSAW;
}
+ return isValid;
}
- } else {
- this.currentTool = SAWTOOL.NONE;
- }
- } else {
- this.currentTool = SAWTOOL.NONE;
- }
- } else {
- this.currentTool = SAWTOOL.NONE;
- }
+ }
+ }
+ }
+ this.currentTool = SAWTOOL.NONE;
return isValid;
}
@@ -59,7 +70,7 @@ public class SlotBuzzSaw extends Slot {
}
public enum SAWTOOL {
- NONE, SAW, BUZZSAW
+ NONE, SAW, BUZZSAW, CHAINSAW
}
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java b/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java
index 879ba87a0b..286eff9612 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotCraftingNoCollect.java
@@ -5,11 +5,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemHoe;
-import net.minecraft.item.ItemPickaxe;
-import net.minecraft.item.ItemStack;
-import net.minecraft.item.ItemSword;
+import net.minecraft.item.*;
import net.minecraft.stats.AchievementList;
public class SlotCraftingNoCollect extends SlotCrafting {
@@ -34,6 +30,7 @@ public class SlotCraftingNoCollect extends SlotCrafting {
* Check if the stack is a valid item for this slot. Always true beside for
* the armor slots.
*/
+ @Override
public boolean isItemValid(ItemStack p_75214_1_) {
return false;
}
@@ -42,6 +39,7 @@ public class SlotCraftingNoCollect extends SlotCrafting {
* Decrease the size of the stack in slot (first int arg) by the amount of
* the second int arg. Returns the new stack.
*/
+ @Override
public ItemStack decrStackSize(int amount) {
if (this.getHasStack()) {
this.amountCrafted += Math.min(amount, this.getStack().stackSize);
@@ -55,6 +53,7 @@ public class SlotCraftingNoCollect extends SlotCrafting {
* not ore and wood. Typically increases an internal count then calls
* onCrafting(item).
*/
+ @Override
protected void onCrafting(ItemStack output, int amount) {
this.amountCrafted += amount;
this.onCrafting(output);
@@ -64,6 +63,7 @@ public class SlotCraftingNoCollect extends SlotCrafting {
* the itemStack passed in is the output - ie, iron ingots, and pickaxes,
* not ore and wood.
*/
+ @Override
protected void onCrafting(ItemStack output) {
output.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted);
this.amountCrafted = 0;
@@ -110,6 +110,7 @@ public class SlotCraftingNoCollect extends SlotCrafting {
}
}
+ @Override
public void onPickupFromSlot(EntityPlayer player, ItemStack output) {
FMLCommonHandler.instance().firePlayerCraftingEvent(player, output, craftMatrix);
this.onCrafting(output);
diff --git a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java b/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
index cfa501eb1e..e70ae728c9 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
@@ -1,7 +1,7 @@
package gtPlusPlus.core.slots;
import gregtech.api.items.GT_MetaGenerated_Tool;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@@ -16,10 +16,10 @@ public class SlotGtTool extends Slot {
@Override
public boolean isItemValid(final ItemStack itemstack) {
if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) {
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is a valid Tool.");
+ Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool.");
return true;
}
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is not a valid Tool.");
+ Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool.");
return false;
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java b/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java
index 7fab32903a..1e488a0e46 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotGtToolElectric.java
@@ -1,7 +1,7 @@
package gtPlusPlus.core.slots;
import gregtech.api.items.GT_MetaGenerated_Tool;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import ic2.api.info.Info;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
@@ -82,10 +82,10 @@ public class SlotGtToolElectric extends SlotGtTool {
@Override
public boolean isItemValid(final ItemStack itemstack) {
if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) {
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is a valid Tool.");
+ Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool.");
return true;
}
- Utils.LOG_WARNING(itemstack.getDisplayName() + " is not a valid Tool.");
+ Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool.");
return false;
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java b/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java
index 4716701e16..85de0df60e 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotModularBaubleUpgrades.java
@@ -6,7 +6,7 @@ import static gtPlusPlus.core.tileentities.machines.TileEntityModularityTable.mV
import java.util.Iterator;
import java.util.Map.Entry;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.nbt.ModularArmourUtils.BT;
import gtPlusPlus.core.util.nbt.ModularArmourUtils.Modifiers;
@@ -25,8 +25,8 @@ public class SlotModularBaubleUpgrades extends Slot {
public boolean isItemValid(final ItemStack itemstack) {
boolean isValid = false;
if (itemstack != null) {
- Utils.LOG_INFO("trying to insert " + itemstack.getDisplayName());
- Utils.LOG_INFO("Valid Upgrade count: " + mValidUpgradeList.size());
+ Logger.INFO("trying to insert " + itemstack.getDisplayName());
+ Logger.INFO("Valid Upgrade count: " + mValidUpgradeList.size());
Iterator<Entry<ItemStack, BT>> it = mValidUpgradeListFormChange.entrySet().iterator();
while (it.hasNext()) {
diff --git a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java b/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
index 3d3dc66f20..a45e2218b8 100644
--- a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
+++ b/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.tileentities;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.general.TileEntityFirepit;
import gtPlusPlus.core.tileentities.general.TileEntityFishTrap;
@@ -12,13 +13,12 @@ import gtPlusPlus.core.tileentities.machines.TileEntityProjectTable;
import gtPlusPlus.core.tileentities.machines.TileEntityTradeTable;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbench;
import gtPlusPlus.core.tileentities.machines.TileEntityWorkbenchAdvanced;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.thaumcraft.common.tile.TCTileEntities;
public class ModTileEntities {
public static void init() {
- Utils.LOG_INFO("Registering Tile Entities.");
+ Logger.INFO("Registering Tile Entities.");
GameRegistry.registerTileEntity(TileEntityHeliumGenerator.class, "HeliumGenerator");
GameRegistry.registerTileEntity(TileEntityWorkbench.class, "TileWorkbench");
GameRegistry.registerTileEntity(TileEntityWorkbenchAdvanced.class, "TileWorkbenchAdvanced");
diff --git a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java
index 9acb5ae396..81dfb1acf4 100644
--- a/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java
+++ b/src/Java/gtPlusPlus/core/tileentities/base/TileEntityBase.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.tileentities.base;
import java.util.UUID;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
@@ -60,7 +60,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento
onPreTick();
}
} catch (Throwable t){
- Utils.LOG_ERROR("Tile Entity Encountered an error in it's pre-tick stage.");
+ Logger.ERROR("Tile Entity Encountered an error in it's pre-tick stage.");
t.printStackTrace();
}
try{
@@ -68,7 +68,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento
onTick();
}
} catch (Throwable t){
- Utils.LOG_ERROR("Tile Entity Encountered an error in it's tick stage.");
+ Logger.ERROR("Tile Entity Encountered an error in it's tick stage.");
t.printStackTrace();
}
try{
@@ -76,7 +76,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento
onPostTick();
}
} catch (Throwable t){
- Utils.LOG_ERROR("Tile Entity Encountered an error in it's post-tick stage.");
+ Logger.ERROR("Tile Entity Encountered an error in it's post-tick stage.");
t.printStackTrace();
}
}
@@ -92,7 +92,7 @@ public abstract class TileEntityBase extends TileEntity implements ISidedInvento
processRecipe();
}
} catch (Throwable t){
- Utils.LOG_ERROR("Tile Entity Encountered an error in it's processing of a recipe stage.");
+ Logger.ERROR("Tile Entity Encountered an error in it's processing of a recipe stage.");
t.printStackTrace();
}
return true;
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
index d73de219e4..fea313917d 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityFishTrap.java
@@ -3,10 +3,10 @@ package gtPlusPlus.core.tileentities.general;
import java.util.Random;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.inventories.InventoryFishTrap;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import net.minecraft.block.Block;
@@ -81,8 +81,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
return true;
}
else if ((waterCount >= 2) && (trapCount > 4)) {
- Utils.LOG_WARNING("Too many fish traps surrounding this one.");
- Utils.LOG_WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ Logger.WARNING("Too many fish traps surrounding this one.");
+ Logger.WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)");
}
}
@@ -187,7 +187,7 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
loot = ItemUtils.getSimpleStack(Blocks.diamond_ore);
}
loot.stackSize=1;
- Utils.LOG_WARNING("Adding x"+loot.stackSize+" "+loot.getDisplayName()+".");
+ Logger.WARNING("Adding x"+loot.stackSize+" "+loot.getDisplayName()+".");
return loot;
}
@@ -221,8 +221,8 @@ public class TileEntityFishTrap extends TileEntity implements ISidedInventory {
this.markDirty();
}
else {
- Utils.LOG_WARNING("This Trap does not have enough water around it.");
- Utils.LOG_WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ Logger.WARNING("This Trap does not have enough water around it.");
+ Logger.WARNING("Not adding Loot to the fishtrap at x[" + this.locationX + "] y[" + this.locationY
+ "] z[" + this.locationZ + "] (Ticking for loot every " + this.baseTickRate + " ticks)");
this.markDirty();
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
index 3b50fe4dea..329bbd73b8 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityInfiniteFluid.java
@@ -6,12 +6,7 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidEvent;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTank;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
+import net.minecraftforge.fluids.*;
public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler {
@@ -22,16 +17,19 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
public TileEntityInfiniteFluid() {
}
+ @Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
needsUpdate = true;
return this.tank.fill(resource, doFill);
}
+ @Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
needsUpdate = true;
return this.tank.drain(resource.amount, doDrain);
}
+ @Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
needsUpdate = true;
FluidStack fluid = this.tank.getFluid();
@@ -60,14 +58,17 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
return stack;
}
+ @Override
public boolean canFill(ForgeDirection from, Fluid fluid) {
return true;
}
+ @Override
public boolean canDrain(ForgeDirection from, Fluid fluid) {
return true;
}
+ @Override
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
return new FluidTankInfo[] { this.tank.getInfo() };
}
@@ -80,6 +81,7 @@ public class TileEntityInfiniteFluid extends TileEntity implements IFluidHandler
return volume;
}
+ @Override
public void updateEntity() {
if (this.tank.getFluid() != null){
diff --git a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
index b886299afd..d94f4704d9 100644
--- a/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
+++ b/src/Java/gtPlusPlus/core/tileentities/general/TileEntityXpConverter.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.tileentities.general;
import org.lwjgl.input.Keyboard;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.enchanting.EnchantingUtils;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -54,26 +54,26 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
@Override
public int fill(final ForgeDirection from, final FluidStack resource, final boolean doFill) {
this.needsUpdate = true;
- Utils.LOG_WARNING("Ticking. | mConvertToEssence: "+this.mConvertToEssence);
+ Logger.WARNING("Ticking. | mConvertToEssence: "+this.mConvertToEssence);
if (this.mConvertToEssence){
if (resource.isFluidEqual(EnchantingUtils.getLiquidXP(1))){
- Utils.LOG_WARNING("fill(tankLiquidXp)");
+ Logger.WARNING("fill(tankLiquidXp)");
return this.tankLiquidXp.fill(resource, doFill);
}
else {
- Utils.LOG_WARNING("Looking for Liquid Xp, Instead found "+resource.getLocalizedName()+".");
+ Logger.WARNING("Looking for Liquid Xp, Instead found "+resource.getLocalizedName()+".");
}
}
else {
if (resource.isFluidEqual(EnchantingUtils.getMobEssence(1))){
- Utils.LOG_WARNING("fill(tankEssence)");
+ Logger.WARNING("fill(tankEssence)");
return this.tankEssence.fill(resource, doFill);
}
else {
- Utils.LOG_WARNING("Looking for Essence, Instead found "+resource.getLocalizedName()+".");
+ Logger.WARNING("Looking for Essence, Instead found "+resource.getLocalizedName()+".");
}
}
- Utils.LOG_WARNING("fill(0)");
+ Logger.WARNING("fill(0)");
return 0;
}
@@ -82,24 +82,24 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.needsUpdate = true;
if (this.mConvertToEssence){
if (resource.isFluidEqual(EnchantingUtils.getMobEssence(1))){
- Utils.LOG_WARNING("drain(mConvertToEssence)");
+ Logger.WARNING("drain(mConvertToEssence)");
return this.tankEssence.drain(resource.amount, doDrain);
}
}
else {
if (resource.isFluidEqual(EnchantingUtils.getLiquidXP(1))){
- Utils.LOG_WARNING("drain(tankLiquidXp)");
+ Logger.WARNING("drain(tankLiquidXp)");
return this.tankLiquidXp.drain(resource.amount, doDrain);
}
}
- Utils.LOG_WARNING("drain(null)");
+ Logger.WARNING("drain(null)");
return null;
}
@Override
public FluidStack drain(final ForgeDirection from, final int maxDrain, final boolean doDrain) {
this.needsUpdate = true;
- Utils.LOG_WARNING("drain(Ex)");
+ Logger.WARNING("drain(Ex)");
final FluidStack fluid_Essence = this.tankEssence.getFluid();
final FluidStack fluid_Xp = this.tankLiquidXp.getFluid();
if ((fluid_Essence == null) && (fluid_Xp == null)) {
@@ -144,7 +144,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankLiquidXp = tank;
}
- Utils.LOG_WARNING("drain(Ex2)");
+ Logger.WARNING("drain(Ex2)");
return stack;
}
@@ -152,17 +152,17 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
public boolean canFill(final ForgeDirection from, final Fluid fluid) {
if (this.mConvertToEssence){
if (this.tankEssence.getFluidAmount() < this.tankEssence.getCapacity()){
- Utils.LOG_WARNING("canFill(mConvertToEssence)");
+ Logger.WARNING("canFill(mConvertToEssence)");
return true;
}
}
else {
if (this.tankLiquidXp.getFluidAmount() < this.tankLiquidXp.getCapacity()){
- Utils.LOG_WARNING("canFill(tankLiquidXp)");
+ Logger.WARNING("canFill(tankLiquidXp)");
return true;
}
}
- Utils.LOG_WARNING("canFill(false)");
+ Logger.WARNING("canFill(false)");
return false;
}
@@ -178,7 +178,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
return true;
}
}
- Utils.LOG_WARNING("canDrain(false)");
+ Logger.WARNING("canDrain(false)");
return false;
}
@@ -193,7 +193,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
}
public float getAdjustedVolume() {
- Utils.LOG_WARNING("AdjustedVolume()");
+ Logger.WARNING("AdjustedVolume()");
this.needsUpdate = true;
final float amount = this.tankLiquidXp.getFluidAmount();
final float capacity = this.tankLiquidXp.getCapacity();
@@ -226,7 +226,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankEssence.fill(bigStorage, true);
this.tankLiquidXp.drain(100, true);
this.needsUpdate = true;
- Utils.LOG_WARNING("B->A");
+ Logger.WARNING("B->A");
}
}
else {
@@ -236,7 +236,7 @@ public class TileEntityXpConverter extends TileEntity implements IFluidHandler {
this.tankLiquidXp.fill(bigStorage, true);
this.tankEssence.drain((int) rm, true);
this.needsUpdate = true;
- Utils.LOG_WARNING("A->B");
+ Logger.WARNING("A->B");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java
index 9d466ccdba..252b92984e 100644
--- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java
+++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityModularityTable.java
@@ -1,21 +1,15 @@
package gtPlusPlus.core.tileentities.machines;
-import static gtPlusPlus.core.tileentities.machines.TileEntityModularityTable.mValidUpgradeList;
-import static gtPlusPlus.core.tileentities.machines.TileEntityModularityTable.mValidUpgradeListFormChange;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import java.util.*;
import java.util.Map.Entry;
import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.container.Container_ModularityTable;
import gtPlusPlus.core.inventories.modulartable.InventoryModularMain;
import gtPlusPlus.core.inventories.modulartable.InventoryModularOutput;
import gtPlusPlus.core.item.bauble.ModularBauble;
import gtPlusPlus.core.tileentities.base.TileEntityBase;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.nbt.ModularArmourUtils;
@@ -56,6 +50,7 @@ public class TileEntityModularityTable extends TileEntityBase implements ISidedI
return this.mRecipeTimeRemaining;
}
+ @Override
@SuppressWarnings("static-method")
public NBTTagCompound getTag(final NBTTagCompound nbt, final String tag) {
if (!nbt.hasKey(tag)) {
@@ -331,7 +326,7 @@ public class TileEntityModularityTable extends TileEntityBase implements ISidedI
@Override
public boolean canInsertItem(int slot, ItemStack item, int side) {
- Utils.LOG_INFO("Slot:"+slot+" | side? "+side);
+ Logger.INFO("Slot:"+slot+" | side? "+side);
/*if (side == 1){
return this.inventoryOutputs.isItemValidForSlot(slot-9, item);
@@ -346,17 +341,19 @@ public class TileEntityModularityTable extends TileEntityBase implements ISidedI
@Override
public boolean canExtractItem(int slot, ItemStack item, int side) {
- Utils.LOG_INFO("Slot:"+slot+" | side? "+side);
+ Logger.INFO("Slot:"+slot+" | side? "+side);
if (slot == 11 || slot <= 8){
return true;
}
return false;
}
+ @Override
public String getCustomName() {
return this.customName;
}
+ @Override
public void setCustomName(String customName) {
this.customName = customName;
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java
index d209688d99..d76b66b4cd 100644
--- a/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java
+++ b/src/Java/gtPlusPlus/core/tileentities/machines/TileEntityProjectTable.java
@@ -5,12 +5,12 @@ import java.util.Vector;
import gregtech.api.enums.ItemList;
import gregtech.common.items.GT_MetaGenerated_Item_01;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.container.Container_ProjectTable;
import gtPlusPlus.core.inventories.projecttable.InventoryProjectMain;
import gtPlusPlus.core.inventories.projecttable.InventoryProjectOutput;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.bauble.ModularBauble;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.nbt.ModularArmourUtils;
import gtPlusPlus.core.util.nbt.ModularArmourUtils.BT;
@@ -139,7 +139,7 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
|| (dataStick == GregtechItemList.Old_Tool_DataStick.get(1))
|| (dataStick.getItem() instanceof MetaGeneratedGregtechItems && dataStick.getItemDamage() == 32208)){
- Utils.LOG_INFO("Found Data Stick and valid container.");
+ Logger.INFO("Found Data Stick and valid container.");
ItemStack outputComponent = container.getOutputContent();
@@ -151,17 +151,17 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
NBTUtils.setBookTitle(newStick, "Encrypted Project Data");
NBTUtils.setBoolean(newStick, "mEncrypted", true);
int slotm=0;
- Utils.LOG_WARNING("Uploading to Data Stick.");
+ Logger.WARNING("Uploading to Data Stick.");
for (ItemStack is : NBTUtils.readItemsFromNBT(newStick)){
if (is != null){
- Utils.LOG_WARNING("Uploaded "+is.getDisplayName()+" into memory slot "+slotm+".");
+ Logger.WARNING("Uploaded "+is.getDisplayName()+" into memory slot "+slotm+".");
}
else {
- Utils.LOG_WARNING("Left memory slot "+slotm+" blank.");
+ Logger.WARNING("Left memory slot "+slotm+" blank.");
}
slotm++;
}
- Utils.LOG_WARNING("Encrypting Data Stick.");
+ Logger.WARNING("Encrypting Data Stick.");
this.inventoryOutputs.setInventorySlotContents(1, newStick);
this.inventoryOutputs.setInventorySlotContents(0, null);
}
@@ -170,12 +170,12 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
//Utils.LOG_INFO("Doing thing 1");
if (dataStick != null)
if (dataStick.getItem() instanceof ModularBauble){
- Utils.LOG_INFO("Doing thing 2");
+ Logger.INFO("Doing thing 2");
ItemStack tBauble = dataStick;
dataStick = null;
this.inventoryOutputs.setInventorySlotContents(0, dataStick);
if (this.inventoryGrid != null){
- Utils.LOG_INFO("Doing things");
+ Logger.INFO("Doing things");
ItemStack[] tStack = container.getInputComponents();
if (tStack != null){
//Utils.LOG_INFO(""+tStack.length);
@@ -184,29 +184,29 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
ItemStack testStack;
if ((testStack = container.inventoryGrid.getStackInSlot(i)) != null){
- Utils.LOG_INFO("FOUND: "+testStack.getDisplayName());
+ Logger.INFO("FOUND: "+testStack.getDisplayName());
}
if (tStack[i] != null){
- Utils.LOG_INFO("found "+tStack[i].getDisplayName());
+ Logger.INFO("found "+tStack[i].getDisplayName());
try {
if (tStack[i].getItem() == Items.feather){
ModularArmourUtils.setBaubleType(tBauble, BT.TYPE_BELT);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
}
if (tStack[i].getItem() == Items.bed){
ModularArmourUtils.setBaubleType(tBauble, BT.TYPE_RING);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
}
if (tStack[i].getItem() == Items.boat){
ModularArmourUtils.setBaubleType(tBauble, BT.TYPE_AMULET);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
@@ -214,7 +214,7 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
if (tStack[i].getItem() == Items.egg){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_HOLY, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_HOLY)+1);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
@@ -222,7 +222,7 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
if (tStack[i].getItem() == Items.baked_potato){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_DEF, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_DEF)+1);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
@@ -230,7 +230,7 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
if (tStack[i].getItem() == Items.cooked_beef){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_HP, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_HP)+1);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
this.inventoryGrid.setInventorySlotContents(i, null);
@@ -238,25 +238,25 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
if (tStack[i] == ItemUtils.simpleMetaStack("gregtech:gt.metaitem.01:17019", 17019, 1)){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_DEF, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_DEF)+1);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
}
if (tStack[i] == ItemList.Electric_Motor_LV.get(1)){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_DAMAGE, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_DAMAGE)+1);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
}
else if (tStack[i] == ItemList.Electric_Motor_MV.get(1)){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_DAMAGE, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_DAMAGE)+2);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
}
else if (tStack[i] == ItemList.Electric_Motor_HV.get(1)){
ModularArmourUtils.setModifierLevel(tBauble, Modifiers.BOOST_DAMAGE, ModularArmourUtils.getModifierLevel(tBauble, Modifiers.BOOST_DAMAGE)+3);
- Utils.LOG_INFO("buffed Modular bauble");
+ Logger.INFO("buffed Modular bauble");
tStack[i] = null;
container.inventoryGrid.setInventorySlotContents(i, null);
}
@@ -266,7 +266,7 @@ public class TileEntityProjectTable extends TileEntity implements INetworkDataPr
}
}
}
- Utils.LOG_INFO("set new Modular bauble");
+ Logger.INFO("set new Modular bauble");
this.inventoryOutputs.setInventorySlotContents(1, tBauble);
}
}
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java
index f8ae3e4cba..ab11dccd4e 100644
--- a/src/Java/gtPlusPlus/core/util/Utils.java
+++ b/src/Java/gtPlusPlus/core/util/Utils.java
@@ -16,12 +16,8 @@ import java.util.Timer;
import java.util.TimerTask;
import org.apache.commons.lang3.EnumUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.common.FMLLog;
-import cpw.mods.fml.relauncher.FMLRelaunchLog;
import gregtech.GT_Mod;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TC_Aspects;
@@ -30,10 +26,10 @@ import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.proxy.ClientProxy;
import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
@@ -73,7 +69,7 @@ public class Utils {
static class ShortTimerTask extends TimerTask {
@Override
public void run() {
- Utils.LOG_WARNING("Timer expired.");
+ Logger.WARNING("Timer expired.");
}
}
@@ -109,47 +105,47 @@ public class Utils {
// Adds in Compat for older GT Versions which Misspell aspects.
try {
if (EnumUtils.isValidEnum(TC_Aspects.class, "COGNITIO")) {
- Utils.LOG_WARNING("TC Aspect found - " + aspect);
+ Logger.WARNING("TC Aspect found - " + aspect);
returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITIO"), size);
} else {
- Utils.LOG_INFO("Fallback TC Aspect found - " + aspect
+ Logger.INFO("Fallback TC Aspect found - " + aspect
+ " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR");
returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITO"), size);
}
} catch (final NoSuchFieldError r) {
- Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
+ Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
}
} else if (aspect.toUpperCase().equals("EXANIMUS")) {
// Adds in Compat for older GT Versions which Misspell aspects.
try {
if (EnumUtils.isValidEnum(TC_Aspects.class, "EXANIMUS")) {
- Utils.LOG_WARNING("TC Aspect found - " + aspect);
+ Logger.WARNING("TC Aspect found - " + aspect);
returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXANIMUS"), size);
} else {
- Utils.LOG_INFO("Fallback TC Aspect found - " + aspect
+ Logger.INFO("Fallback TC Aspect found - " + aspect
+ " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR");
returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXAMINIS"), size);
}
} catch (final NoSuchFieldError r) {
- Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
+ Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
}
} else if (aspect.toUpperCase().equals("PRAECANTATIO")) {
// Adds in Compat for older GT Versions which Misspell aspects.
try {
if (EnumUtils.isValidEnum(TC_Aspects.class, "PRAECANTATIO")) {
- Utils.LOG_WARNING("TC Aspect found - " + aspect);
+ Logger.WARNING("TC Aspect found - " + aspect);
returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTATIO"), size);
} else {
- Utils.LOG_INFO("Fallback TC Aspect found - " + aspect
+ Logger.INFO("Fallback TC Aspect found - " + aspect
+ " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR");
returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTIO"), size);
}
} catch (final NoSuchFieldError r) {
- Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
+ Logger.INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus");
}
} else {
- Utils.LOG_WARNING("TC Aspect found - " + aspect);
+ Logger.WARNING("TC Aspect found - " + aspect);
returnValue = new TC_AspectStack(TC_Aspects.valueOf(aspect), size);
}
@@ -175,73 +171,6 @@ public class Utils {
|| (target.getItemDamage() == input.getItemDamage())));
}
- // Logging Functions
- private static final Logger modLogger = makeLogger();
-
- // Generate GT++ Logger
- public static Logger makeLogger() {
- final Logger gtPlusPlusLogger = LogManager.getLogger("GT++");
- return gtPlusPlusLogger;
- }
-
- public static final Logger getLogger(){
- return modLogger;
- }
-
- // Non-Dev Comments
- public static void LOG_INFO(final String s) {
- // if (CORE.DEBUG){
- modLogger.info(s);
- // }
- }
-
- // Non-Dev Comments
- public static void LOG_MACHINE_INFO(final String s) {
-
- boolean localPlayer = false;
- try {
- if (ClientProxy.playerName != null){
- if (ClientProxy.playerName.toLowerCase().contains("draknyte1")){
- localPlayer = true;
- }
- }
- }
- catch (final Throwable t){
-
- }
-
- if (CORE.ConfigSwitches.MACHINE_INFO || localPlayer) {
- final String name1 = gtPlusPlus.core.util.reflect.ReflectionUtils.getMethodName(2);
- modLogger.info("Machine Info: " + s + " | " + name1);
- }
- }
-
- // Developer Comments
- public static void LOG_WARNING(final String s) {
- if (CORE.DEBUG) {
- modLogger.warn(s);
- }
- }
-
- // Errors
- public static void LOG_ERROR(final String s) {
- if (CORE.DEBUG) {
- modLogger.fatal(s);
- }
- }
-
- // Developer Logger
- public static void LOG_SPECIFIC_WARNING(final String whatToLog, final String msg, final int line) {
- // if (!CORE.DEBUG){
- FMLLog.warning("GT++ |" + line + "| " + whatToLog + " | " + msg);
- // }
- }
-
- // Non-Dev Comments
- public static void LOG_ASM(final String s) {
- FMLRelaunchLog.info("", s);
- }
-
//Register an event to both busses.
public static void registerEvent(Object o){
MinecraftForge.EVENT_BUS.register(o);
@@ -293,7 +222,7 @@ public class Utils {
if (!currentWorld.isRemote) {
try {
correctTool = currentBlock.getHarvestTool(0);
- Utils.LOG_WARNING(correctTool);
+ Logger.WARNING(correctTool);
} catch (final NullPointerException e) {
@@ -434,8 +363,8 @@ public class Utils {
// System.out.println( "hex: " + Integer.toHexString( c.getRGB() &
// 0xFFFFFF ) + " hex value:"+temp);
temp = Utils.appenedHexNotationToString(String.valueOf(temp));
- Utils.LOG_WARNING("Made " + temp + " - Hopefully it's not a mess.");
- Utils.LOG_WARNING("It will decode into " + Integer.decode(temp) + ".");
+ Logger.WARNING("Made " + temp + " - Hopefully it's not a mess.");
+ Logger.WARNING("It will decode into " + Integer.decode(temp) + ".");
return Integer.decode(temp);
}
@@ -486,7 +415,7 @@ public class Utils {
code = code + code + code;
final int i = Integer.parseInt(code);
hexColorMap.put(a, Integer.toHexString(0x1000000 | i).substring(1).toUpperCase());
- Utils.LOG_WARNING("" + Integer.toHexString(0x1000000 | i).substring(1).toUpperCase());
+ Logger.WARNING("" + Integer.toHexString(0x1000000 | i).substring(1).toUpperCase());
}
return hexColorMap;
}
@@ -517,7 +446,7 @@ public class Utils {
public static Integer appenedHexNotationToInteger(final int hexAsStringOrInt) {
final String hexChar = "0x";
String result;
- Utils.LOG_WARNING(String.valueOf(hexAsStringOrInt));
+ Logger.WARNING(String.valueOf(hexAsStringOrInt));
result = hexChar + String.valueOf(hexAsStringOrInt);
return Integer.getInteger(result);
}
@@ -546,21 +475,21 @@ public class Utils {
private static short cellID = 15;
public static ItemStack createInternalNameAndFluidCell(final String s) {
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]);
- Utils.LOG_WARNING("2 " + yourName.name());
+ Logger.WARNING("2 " + yourName.name());
final ItemCell item = (ItemCell) Ic2Items.cell.getItem();
- Utils.LOG_WARNING("3 " + item.getUnlocalizedName());
+ Logger.WARNING("3 " + item.getUnlocalizedName());
try {
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
final Class<? extends ItemCell> clz = item.getClass();
- Utils.LOG_WARNING("5 " + clz.getSimpleName());
+ Logger.WARNING("5 " + clz.getSimpleName());
final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class);
- Utils.LOG_WARNING("6 " + methode.getName());
+ Logger.WARNING("6 " + methode.getName());
methode.setAccessible(true);
- Utils.LOG_WARNING("7 " + methode.isAccessible());
+ Logger.WARNING("7 " + methode.isAccessible());
final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]);
- Utils.LOG_WARNING("Successfully created " + temp.getDisplayName() + "s.");
+ Logger.WARNING("Successfully created " + temp.getDisplayName() + "s.");
FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(),
Ic2Items.cell.copy());
ItemUtils.addItemToOreDictionary(temp.copy(), "cell" + s);
@@ -572,21 +501,21 @@ public class Utils {
}
public static ItemStack createInternalNameAndFluidCellNoOreDict(final String s) {
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]);
- Utils.LOG_WARNING("2 " + yourName.name());
+ Logger.WARNING("2 " + yourName.name());
final ItemCell item = (ItemCell) Ic2Items.cell.getItem();
- Utils.LOG_WARNING("3 " + item.getUnlocalizedName());
+ Logger.WARNING("3 " + item.getUnlocalizedName());
try {
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
final Class<? extends ItemCell> clz = item.getClass();
- Utils.LOG_WARNING("5 " + clz.getSimpleName());
+ Logger.WARNING("5 " + clz.getSimpleName());
final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class);
- Utils.LOG_WARNING("6 " + methode.getName());
+ Logger.WARNING("6 " + methode.getName());
methode.setAccessible(true);
- Utils.LOG_WARNING("7 " + methode.isAccessible());
+ Logger.WARNING("7 " + methode.isAccessible());
final ItemStack temp = (ItemStack) methode.invoke(item, cellID++, yourName, new Block[0]);
- Utils.LOG_WARNING("Successfully created " + temp.getDisplayName() + "s.");
+ Logger.WARNING("Successfully created " + temp.getDisplayName() + "s.");
FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 1000), temp.copy(),
Ic2Items.cell.copy());
// ItemUtils.addItemToOreDictionary(temp.copy(), "cell"+s);
@@ -739,7 +668,7 @@ public class Utils {
final float damage = material.vToolQuality;
final int efficiency = material.vToolQuality;
// int enchantability = material.mEnchantmentToolsLevel;
- Utils.LOG_INFO("ToolMaterial stats for " + material.getLocalizedName() + " | harvestLevel:" + harvestLevel
+ Logger.INFO("ToolMaterial stats for " + material.getLocalizedName() + " | harvestLevel:" + harvestLevel
+ " | durability:" + durability + " | toolQuality:" + damage + " | toolSpeed:" + damage);
final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, 0);
return temp;
@@ -814,7 +743,7 @@ public class Utils {
.append("'").toString());
NBTUtils.createIntegerTagCompound(rStack, "stats", "mMeta", vMeta);
CORE.sBookList.put(aMapping, rStack);
- Utils.LOG_INFO("Creating book: " + aTitle + " by " + aAuthor + ". Using Meta " + vMeta + ".");
+ Logger.INFO("Creating book: " + aTitle + " by " + aAuthor + ". Using Meta " + vMeta + ".");
return GT_Utility.copy(new Object[] { rStack });
}
diff --git a/src/Java/gtPlusPlus/core/util/array/AutoMap.java b/src/Java/gtPlusPlus/core/util/array/AutoMap.java
new file mode 100644
index 0000000000..ea5e1dd25e
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/util/array/AutoMap.java
@@ -0,0 +1,77 @@
+package gtPlusPlus.core.util.array;
+
+import java.io.Serializable;
+import java.util.*;
+
+public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable {
+
+ /**
+ * The Internal Map
+ */
+ private Map<Integer, V> mInternalMap = new HashMap<Integer, V>();
+
+ /**
+ * The Internal ID
+ */
+ private int mInternalID = 0;
+ private static final long serialVersionUID = 3771412318075131790L;
+
+ @Override
+ public Iterator<V> iterator() {
+ return values().iterator();
+ }
+
+ public synchronized boolean setValue(V object){
+ int mOriginalID = this.mInternalID;
+ put(object);
+ if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ public synchronized V put(V object){
+ return set(object);
+ }
+
+ public synchronized V set(V object){
+ return mInternalMap.put(mInternalID++, object);
+ }
+
+ public synchronized V get(int id){
+ return mInternalMap.get(id);
+ }
+
+ public synchronized Collection<V> values(){
+ return mInternalMap.values();
+ }
+
+ public synchronized int size(){
+ return mInternalMap.size();
+ }
+
+ public synchronized int hashcode(){
+ return mInternalMap.hashCode();
+ }
+
+ public synchronized boolean containsKey(int key){
+ return mInternalMap.containsKey(key);
+ }
+
+ public synchronized boolean containsValue(V value){
+ return mInternalMap.containsValue(value);
+ }
+
+ public synchronized boolean isEmpty(){
+ return mInternalMap.isEmpty();
+ }
+
+ public synchronized boolean clear(){
+ this.mInternalID = 0;
+ this.mInternalMap.clear();
+ return true;
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/util/array/Quad.java b/src/Java/gtPlusPlus/core/util/array/Quad.java
new file mode 100644
index 0000000000..417c3b6ebc
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/util/array/Quad.java
@@ -0,0 +1,33 @@
+package gtPlusPlus.core.util.array;
+
+public class Quad<K,V,C,R> {
+
+ private final K key;
+ private final V value;
+ private final C value2;
+ private final R value3;
+
+ public Quad(final K key, final V value, final C value2, final R value3){
+ this.key = key;
+ this.value = value;
+ this.value2 = value2;
+ this.value3 = value3;
+ }
+
+ final public K getKey(){
+ return this.key;
+ }
+
+ final public V getValue_1(){
+ return this.value;
+ }
+
+ final public C getValue_2(){
+ return this.value2;
+ }
+
+ final public R getValue_3(){
+ return this.value3;
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
index a35d2c26de..35c8f5caad 100644
--- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
+++ b/src/Java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
@@ -5,9 +5,9 @@ import static net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.
import java.util.List;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.BaseItemGeneric;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -29,7 +29,7 @@ public class DEBUG_ITEM_ShapeSpawner extends BaseItemGeneric{
public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player){
if (!world.isRemote){
- Utils.LOG_INFO("Constructing the shape for the "+"VACUUM FREEZER");
+ Logger.INFO("Constructing the shape for the "+"VACUUM FREEZER");
final Thread thread = new Thread(new DEBUG_TimerThread(world, player));
thread.start();
}
diff --git a/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java b/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
index a0690c9440..778809b486 100644
--- a/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
+++ b/src/Java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.util.debug;
import java.util.concurrent.TimeUnit;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -28,9 +28,9 @@ public class DEBUG_TimerThread implements Runnable {
final int stepX = Minecraft.getMinecraft().objectMouseOver.blockX;
final int stepY = Minecraft.getMinecraft().objectMouseOver.blockY;
final int stepZ = Minecraft.getMinecraft().objectMouseOver.blockZ;
- Utils.LOG_INFO("Clicked on a Block @ "+"[X:"+stepX+"][Y:"+stepY+"][Z:"+stepZ+"]"+" with xDir:"+xDir+" zDir:"+zDir);
+ Logger.INFO("Clicked on a Block @ "+"[X:"+stepX+"][Y:"+stepY+"][Z:"+stepZ+"]"+" with xDir:"+xDir+" zDir:"+zDir);
this.world.setBlock(stepX, stepY, stepZ, Blocks.bedrock,0,3);
- Utils.LOG_INFO("Makng it Bedrock for future investment.");
+ Logger.INFO("Makng it Bedrock for future investment.");
//for (int i = -1; i <= 1; i++) {
//stepX = stepX+i;
for (int i = stepX-1; i <= (stepX+1); i++){
@@ -44,12 +44,12 @@ public class DEBUG_TimerThread implements Runnable {
//stepZ = stepZ+j;
//for (int h = -1; h <= 1; h++) {
//stepY = stepY+h;
- Utils.LOG_INFO("Placing Block @ "+"[X:"+i+"][Y:"+h+"][Z:"+j+"]"+" with xDir:"+xDir+" zDir:"+zDir);
+ Logger.INFO("Placing Block @ "+"[X:"+i+"][Y:"+h+"][Z:"+j+"]"+" with xDir:"+xDir+" zDir:"+zDir);
if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
this.world.setBlock(i, h, j, Blocks.stone,0,3);
}
else {
- Utils.LOG_INFO("Not even sure what this is for, but I got here.");
+ Logger.INFO("Not even sure what this is for, but I got here.");
}
try {
TimeUnit.MILLISECONDS.sleep(500);
diff --git a/src/Java/gtPlusPlus/core/util/enchanting/EnchantingUtils.java b/src/Java/gtPlusPlus/core/util/enchanting/EnchantingUtils.java
index 76336d4298..288ca2e2cc 100644
--- a/src/Java/gtPlusPlus/core/util/enchanting/EnchantingUtils.java
+++ b/src/Java/gtPlusPlus/core/util/enchanting/EnchantingUtils.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.util.enchanting;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
@@ -78,7 +78,7 @@ public class EnchantingUtils {
//Xp Fluids
public static FluidStack getMobEssence(final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of Mob Essence.");
+ Logger.WARNING("Trying to get a fluid stack of Mob Essence.");
try {
return FluidRegistry.getFluidStack("mobessence", amount).copy();
}
@@ -89,7 +89,7 @@ public class EnchantingUtils {
}
public static FluidStack getLiquidXP(final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of Liquid XP.");
+ Logger.WARNING("Trying to get a fluid stack of Liquid XP.");
try {
return FluidRegistry.getFluidStack("xpjuice", amount).copy();
}
diff --git a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
index 611c7fe897..444f35a46f 100644
--- a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
+++ b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java
@@ -4,6 +4,7 @@ import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_LanguageManager;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.fluids.GenericFluid;
import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.item.base.cell.BaseItemCell;
@@ -26,7 +27,7 @@ import net.minecraftforge.fluids.IFluidContainerItem;
public class FluidUtils {
public static FluidStack getFluidStack(final String fluidName, final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of "+fluidName);
+ Logger.WARNING("Trying to get a fluid stack of "+fluidName);
try {
return FluidRegistry.getFluidStack(fluidName, amount).copy();
}
@@ -37,7 +38,7 @@ public class FluidUtils {
}
public static FluidStack getFluidStack(final FluidStack vmoltenFluid, final int fluidAmount) {
- Utils.LOG_WARNING("Trying to get a fluid stack of "+vmoltenFluid.getFluid().getName());
+ Logger.WARNING("Trying to get a fluid stack of "+vmoltenFluid.getFluid().getName());
try {
return FluidRegistry.getFluidStack(vmoltenFluid.getFluid().getName(), fluidAmount).copy();
}
@@ -47,7 +48,7 @@ public class FluidUtils {
}
public static FluidStack getFluidStack(final Fluid vFluid, final int fluidAmount) {
- Utils.LOG_WARNING("Trying to get a fluid stack of "+vFluid.getName());
+ Logger.WARNING("Trying to get a fluid stack of "+vFluid.getName());
try {
return FluidRegistry.getFluidStack(vFluid.getName(), fluidAmount).copy();
}
@@ -57,7 +58,7 @@ public class FluidUtils {
}
public static FluidStack[] getFluidStackArray(final String fluidName, final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of "+fluidName);
+ Logger.WARNING("Trying to get a fluid stack of "+fluidName);
try {
final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName, amount)};
return singleFluid;
@@ -69,7 +70,7 @@ public class FluidUtils {
}
public static FluidStack[] getFluidStackArray(final FluidStack fluidName, final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of "+fluidName);
+ Logger.WARNING("Trying to get a fluid stack of "+fluidName);
try {
final FluidStack[] singleFluid = {FluidRegistry.getFluidStack(fluidName.getLocalizedName(), amount)};
return singleFluid;
@@ -244,13 +245,13 @@ public class FluidUtils {
if (aMaterial.getLocalizedName().toLowerCase().contains("clay") || (aMaterial.getComposites().size()>1) || aMaterial.getLocalizedName().toLowerCase().contains("wrought")){
return null;
}
- Utils.LOG_INFO("Generating a "+aMaterial.getLocalizedName()+" Plasma Cell");
+ Logger.INFO("Generating a "+aMaterial.getLocalizedName()+" Plasma Cell");
if (aMaterial.vComponentCount != 1){
- Utils.LOG_INFO("Compound made from: ");
+ Logger.INFO("Compound made from: ");
for (final MaterialStack x : aMaterial.getComposites()){
- Utils.LOG_INFO(x.getStackMaterial().getLocalizedName());
+ Logger.INFO(x.getStackMaterial().getLocalizedName());
}
- Utils.LOG_INFO("Material is a composite, not generating plasma.");
+ Logger.INFO("Material is a composite, not generating plasma.");
return null;
}
@@ -410,7 +411,7 @@ public class FluidUtils {
public final static Fluid generateFluid(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA){
if ((FluidUtils.getFluidStack("molten"+"."+unlocalizedName.toLowerCase(), 1) == null) && (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+Utils.sanitizeString(localizedName), 1) != null)){
- Utils.LOG_WARNING("Generating our own fluid.");
+ Logger.WARNING("Generating our own fluid.");
//Generate a Cell if we need to
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){
@@ -439,7 +440,7 @@ public class FluidUtils {
);
return gtFluid;
}
- Utils.LOG_INFO("FLUID GENERATION FAILED FOR "+localizedName);
+ Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName);
return null;
}
@@ -452,7 +453,7 @@ public class FluidUtils {
dustStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+Utils.sanitizeString(localizedName), 1);
}
if ((FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null)/* && ((dustStack != null) || (dustStack2 != null))*/){
- Utils.LOG_WARNING("Generating our own fluid.");
+ Logger.WARNING("Generating our own fluid.");
//Generate a Cell if we need to
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){
@@ -494,14 +495,14 @@ public class FluidUtils {
return gtFluid;
}
- Utils.LOG_INFO("FLUID GENERATION FAILED FOR "+localizedName);
+ Logger.INFO("FLUID GENERATION FAILED FOR "+localizedName);
return null;
}
public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA){
Fluid gtFluid;
if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){
- Utils.LOG_WARNING("Generating our own fluid.");
+ Logger.WARNING("Generating our own fluid.");
gtFluid = FluidUtils.addGTFluidNoPrefix(
unlocalizedName,
localizedName,
diff --git a/src/Java/gtPlusPlus/core/util/geo/GeoUtils.java b/src/Java/gtPlusPlus/core/util/geo/GeoUtils.java
index e1dba3b22d..84528e0cd5 100644
--- a/src/Java/gtPlusPlus/core/util/geo/GeoUtils.java
+++ b/src/Java/gtPlusPlus/core/util/geo/GeoUtils.java
@@ -5,7 +5,7 @@ import java.net.*;
import org.apache.http.client.utils.URIBuilder;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.networking.NetworkUtils;
public class GeoUtils {
@@ -19,7 +19,7 @@ public class GeoUtils {
return "Offline.";
}
} catch (Throwable T){
- Utils.LOG_INFO("Failed to initialise GeoUtils.");
+ Logger.INFO("Failed to initialise GeoUtils.");
return "Failed.";
}
}
@@ -78,7 +78,7 @@ public class GeoUtils {
return result;
//Catch block for bad connection
} catch (IOException e) {
- Utils.LOG_INFO("Method 1 - Failed.");
+ Logger.INFO("Method 1 - Failed.");
}
//Secondary method
@@ -87,19 +87,19 @@ public class GeoUtils {
return r.replaceAll("(\\r|\\n)", "");
//Catch block for bad connection
} catch (java.io.IOException e) {
- Utils.LOG_INFO("Method 2 - Failed.");
+ Logger.INFO("Method 2 - Failed.");
}
}
//Catch block for all the Bad URI/URL building
catch (URISyntaxException | MalformedURLException e1) {
if (e1 instanceof URISyntaxException){
- Utils.LOG_INFO("Bad URI Syntax for builder.");
+ Logger.INFO("Bad URI Syntax for builder.");
}
else {
- Utils.LOG_INFO("Malformed URL.");
+ Logger.INFO("Malformed URL.");
}
- Utils.LOG_INFO("Country Check - Failed.");
+ Logger.INFO("Country Check - Failed.");
}
return "Error getting users Country. "+ipAddress;
}
diff --git a/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java b/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
index 8ba355d57f..9bc5ee804d 100644
--- a/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
+++ b/src/Java/gtPlusPlus/core/util/gregtech/recipehandlers/GregtechRecipe.java
@@ -3,23 +3,23 @@ package gtPlusPlus.core.util.gregtech.recipehandlers;
import java.lang.reflect.Method;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.item.ItemStack;
public final class GregtechRecipe {
public LibraryProxy ourProxy;
public GregtechRecipe(){
- Utils.LOG_INFO("Initializing a recipe handler for different versions of Gregtech 5.");
+ Logger.INFO("Initializing a recipe handler for different versions of Gregtech 5.");
try {
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
this.ourProxy = new LibProxy1();
- Utils.LOG_INFO("Selecting GT 5.7/5.8 Recipe Set");
+ Logger.INFO("Selecting GT 5.7/5.8 Recipe Set");
}
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
this.ourProxy = new LibProxy2();
- Utils.LOG_INFO("Selecting GT 5.9 Recipe Set");
+ Logger.INFO("Selecting GT 5.9 Recipe Set");
}
} catch (final NoSuchMethodException e) {
this.ourProxy = null;
@@ -27,7 +27,7 @@ public final class GregtechRecipe {
}
public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
- Utils.LOG_WARNING("Adding a GT Furnace/Alloy Smelter Recipe"+"| Input:"+aInput.getDisplayName()+" | Output:"+aOutput.getDisplayName()+" |");
+ Logger.WARNING("Adding a GT Furnace/Alloy Smelter Recipe"+"| Input:"+aInput.getDisplayName()+" | Output:"+aOutput.getDisplayName()+" |");
return this.ourProxy.addSmeltingAndAlloySmeltingRecipe(aInput, aOutput);
}
@@ -47,7 +47,7 @@ class LibProxy1 extends LibraryProxy {
@Override
public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
try {
- Utils.LOG_INFO("Trying with Gt 5.7/5.8 Method.");
+ Logger.INFO("Trying with Gt 5.7/5.8 Method.");
return (boolean) this.m1.invoke(null, aInput, aOutput);
} catch (final Exception e) {
throw new RuntimeException(e);
@@ -65,7 +65,7 @@ class LibProxy2 extends LibraryProxy {
@Override
public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
try {
- Utils.LOG_INFO("Trying with Gt 5.9 Method.");
+ Logger.INFO("Trying with Gt 5.9 Method.");
return (boolean) this.m2.invoke(null, aInput, aOutput, true);
} catch (final Exception e) {
throw new RuntimeException(e);
diff --git a/src/Java/gtPlusPlus/core/util/inventory/InventoryUtils.java b/src/Java/gtPlusPlus/core/util/inventory/InventoryUtils.java
index 51ae393c06..779f9b14c1 100644
--- a/src/Java/gtPlusPlus/core/util/inventory/InventoryUtils.java
+++ b/src/Java/gtPlusPlus/core/util/inventory/InventoryUtils.java
@@ -20,7 +20,7 @@ public class InventoryUtils {
{
for (int i1 = 0; i1 < ((IInventory) tileentity).getSizeInventory(); ++i1)
{
- ItemStack itemstack = (ItemStack) ((IInventory) tileentity).getStackInSlot(i1);
+ ItemStack itemstack = ((IInventory) tileentity).getStackInSlot(i1);
if (itemstack != null)
{
@@ -38,11 +38,11 @@ public class InventoryUtils {
}
itemstack.stackSize -= j1;
- entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
+ entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
float f3 = 0.05F;
- entityitem.motionX = (double)((float)mRandom.nextGaussian() * f3);
- entityitem.motionY = (double)((float)mRandom.nextGaussian() * f3 + 0.2F);
- entityitem.motionZ = (double)((float)mRandom.nextGaussian() * f3);
+ entityitem.motionX = (float)mRandom.nextGaussian() * f3;
+ entityitem.motionY = (float)mRandom.nextGaussian() * f3 + 0.2F;
+ entityitem.motionZ = (float)mRandom.nextGaussian() * f3;
if (itemstack.hasTagCompound())
{
diff --git a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
index c212afda2f..098cb3e953 100644
--- a/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/item/ItemUtils.java
@@ -11,6 +11,7 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.base.BasicSpawnEgg;
import gtPlusPlus.core.item.base.dusts.BaseItemDust;
@@ -115,7 +116,7 @@ public class ItemUtils {
GT_OreDictUnificator.registerOre(oreDictName, new ItemStack(itemStackWithMeta.getItem()));*/
}
} catch (final NullPointerException e) {
- Utils.LOG_ERROR(itemName+" not found. [NULL]");
+ Logger.ERROR(itemName+" not found. [NULL]");
}
}
@@ -123,7 +124,7 @@ public class ItemUtils {
try {
GT_OreDictUnificator.registerOre(oreDictName, stack);
} catch (final NullPointerException e) {
- Utils.LOG_ERROR(stack.getDisplayName()+" not registered. [NULL]");
+ Logger.ERROR(stack.getDisplayName()+" not registered. [NULL]");
}
}
@@ -144,7 +145,7 @@ public class ItemUtils {
}
return null;
} catch (final NullPointerException e) {
- Utils.LOG_ERROR(itemName+" not found. [NULL]");
+ Logger.ERROR(itemName+" not found. [NULL]");
return null;
}
}
@@ -167,7 +168,7 @@ public class ItemUtils {
}
return null;
} catch (final NullPointerException e) {
- Utils.LOG_ERROR(FQRN+" not found. [NULL]");
+ Logger.ERROR(FQRN+" not found. [NULL]");
return null;
}
}
@@ -180,7 +181,7 @@ public class ItemUtils {
}
Item em = item;
final Item em1 = item;
- Utils.LOG_WARNING("Found: "+em1.getUnlocalizedName()+":"+meta);
+ Logger.WARNING("Found: "+em1.getUnlocalizedName()+":"+meta);
if (em1 != null){
if (null == em){
em = em1;
@@ -282,11 +283,11 @@ public class ItemUtils {
public static ItemStack getItemStackOfAmountFromOreDictNoBroken(final String oredictName, final int amount){
if (CORE.DEBUG){
- Utils.LOG_WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(1));
- Utils.LOG_WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(2));
- Utils.LOG_WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(3));
- Utils.LOG_WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(4));
- Utils.LOG_WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(5));
+ Logger.WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(1));
+ Logger.WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(2));
+ Logger.WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(3));
+ Logger.WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(4));
+ Logger.WARNING("Looking up: "+oredictName+" - from method: "+ReflectionUtils.getMethodName(5));
}
try{
@@ -309,7 +310,7 @@ public class ItemUtils {
}
}
}
- Utils.LOG_WARNING(oredictName+" was not valid.");
+ Logger.WARNING(oredictName+" was not valid.");
return null;
}
catch (final Throwable t){
@@ -324,7 +325,7 @@ public class ItemUtils {
return returnValue.copy();
}
}
- Utils.LOG_WARNING(material+" was not valid.");
+ Logger.WARNING(material+" was not valid.");
return null;
}
@@ -400,20 +401,20 @@ public class ItemUtils {
}
public static MultiPickaxeBase generateMultiPick(final boolean GT_Durability, final ToolMaterial customMaterial, final String name, final int durability, final short[] rgba, final Object enchantment){
- Utils.LOG_WARNING("Generating a Multi-Pick out of "+name);
+ Logger.WARNING("Generating a Multi-Pick out of "+name);
final short[] rgb = rgba;
int dur = customMaterial.getMaxUses();
- Utils.LOG_WARNING("Determined durability for "+name+" is "+dur);
+ Logger.WARNING("Determined durability for "+name+" is "+dur);
if (GT_Durability){
dur = durability*100;
- Utils.LOG_WARNING("Using gregtech durability value, "+name+" is now "+dur+".");
+ Logger.WARNING("Using gregtech durability value, "+name+" is now "+dur+".");
}
else if (dur <= 0){
dur = durability;
- Utils.LOG_WARNING("Determined durability too low, "+name+" is now "+dur+" based on the GT material durability.");
+ Logger.WARNING("Determined durability too low, "+name+" is now "+dur+" based on the GT material durability.");
}
if (dur <= 0){
- Utils.LOG_WARNING("Still too low, "+name+" will now go unused.");
+ Logger.WARNING("Still too low, "+name+" will now go unused.");
return null;
}
@@ -437,7 +438,7 @@ public class ItemUtils {
if (MP_Redstone.isValid){
return MP_Redstone;
}
- Utils.LOG_WARNING("Pickaxe was not valid.");
+ Logger.WARNING("Pickaxe was not valid.");
return null;
}
@@ -457,20 +458,20 @@ public class ItemUtils {
}
public static MultiSpadeBase generateMultiShovel(final boolean GT_Durability, final ToolMaterial customMaterial, final String name, final int durability, final short[] rgba){
- Utils.LOG_WARNING("Generating a Multi-Spade out of "+name);
+ Logger.WARNING("Generating a Multi-Spade out of "+name);
final short[] rgb = rgba;
int dur = customMaterial.getMaxUses();
- Utils.LOG_WARNING("Determined durability for "+name+" is "+dur);
+ Logger.WARNING("Determined durability for "+name+" is "+dur);
if (GT_Durability){
dur = durability*100;
- Utils.LOG_WARNING("Using gregtech durability value, "+name+" is now "+dur+".");
+ Logger.WARNING("Using gregtech durability value, "+name+" is now "+dur+".");
}
else if (dur <= 0){
dur = durability;
- Utils.LOG_WARNING("Determined durability too low, "+name+" is now "+dur+" based on the GT material durability.");
+ Logger.WARNING("Determined durability too low, "+name+" is now "+dur+" based on the GT material durability.");
}
if (dur <= 0){
- Utils.LOG_WARNING("Still too low, "+name+" will now go unused.");
+ Logger.WARNING("Still too low, "+name+" will now go unused.");
return null;
}
final MultiSpadeBase MP_Redstone = new MultiSpadeBase(
diff --git a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
index 66c991ce99..48279a91d9 100644
--- a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
+++ b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java
@@ -1,19 +1,14 @@
package gtPlusPlus.core.util.materials;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.List;
import org.apache.commons.lang3.reflect.FieldUtils;
import gregtech.api.enums.*;
-import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.StringUtils;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@@ -217,6 +212,7 @@ public class MaterialUtils {
}*/
+ @SuppressWarnings("deprecation")
public static String getMaterialName(Materials mat){
String mName;
try {
@@ -231,26 +227,4 @@ public class MaterialUtils {
return mName;
}
- public static boolean tryEnableMaterial(Materials mMaterial){
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- return false;
- }
- return ReflectionUtils.setField(mMaterial, "mHasParentMod", true);
- }
-
- public static boolean tryEnableMaterialPart(OrePrefixes prefix, Materials mMaterial){
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- return false;
- }
- try {
- Method enableComponent = Class.forName("gregtech.api.enums.OrePrefixes").getDeclaredMethod("enableComponent", Materials.class);
- enableComponent.invoke(prefix, mMaterial);
- return true;
- }
- catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException | ClassNotFoundException e) {
- Utils.LOG_INFO("Failed to enabled "+prefix.mRegularLocalName+" for "+mMaterial.mDefaultLocalName);
- }
- return false;
- }
-
}
diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
index 3361591ce8..adb5548f1d 100644
--- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
@@ -4,6 +4,7 @@ import java.util.Map;
import java.util.Random;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.objects.XSTR;
@@ -315,10 +316,10 @@ public class MathUtils {
temp = "0F0F0F";
}
- Utils.LOG_WARNING("Operating with "+temp);
+ Logger.WARNING("Operating with "+temp);
temp = Utils.appenedHexNotationToString(String.valueOf(temp));
- Utils.LOG_WARNING("Made "+temp+" - Hopefully it's not a mess.");
- Utils.LOG_WARNING("It will decode into "+Integer.decode(temp)+".");
+ Logger.WARNING("Made "+temp+" - Hopefully it's not a mess.");
+ Logger.WARNING("It will decode into "+Integer.decode(temp)+".");
return Integer.decode(temp);
}
diff --git a/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java b/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java
index 5d9da4da1e..2e8e29c372 100644
--- a/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java
+++ b/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.util.nbt;
import baubles.api.BaubleType;
import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.array.Pair;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -115,7 +115,7 @@ public class ModularArmourUtils {
}
public static void setBaubleType(ItemStack aStack, BT aMod) {
- Utils.LOG_INFO("Changing bauble type.");
+ Logger.INFO("Changing bauble type.");
NBTTagCompound tNBT = NBTUtils.getNBT(aStack);
if (aMod != null) {
tNBT.setInteger("mBaubleType", aMod.getID());
diff --git a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java
index 31d00efc94..58d47eb0fa 100644
--- a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java
+++ b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java
@@ -7,7 +7,7 @@ import java.util.Map;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.entity.Entity;
@@ -210,11 +210,11 @@ public class NBTUtils {
Map<?, ?> mInternalMap = ReflectionUtils.getField(aNBT, "tagMap");
if (mInternalMap != null) {
for (Map.Entry<?, ?> e : mInternalMap.entrySet()) {
- Utils.LOG_INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue());
+ Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue());
}
return true;
} else {
- Utils.LOG_INFO("Data map reflected from NBTTagCompound was not valid.");
+ Logger.INFO("Data map reflected from NBTTagCompound was not valid.");
return false;
}
}
@@ -408,7 +408,7 @@ public class NBTUtils {
Map<?, ?> mInternalMap = ReflectionUtils.getField(aNBT, "tagMap");
if (mInternalMap != null) {
for (Map.Entry<?, ?> e : mInternalMap.entrySet()) {
- Utils.LOG_INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue().toString());
+ Logger.INFO("Key: " + e.getKey().toString() + " | Value: " + e.getValue().toString());
if (e.getValue().getClass() == String.class){
createStringTagCompound(aStack, "mEntityTag", (String) e.getKey(), (String) e.getValue());
}
diff --git a/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
index b09b1a1056..ce2888ef29 100644
--- a/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
+++ b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java
@@ -4,7 +4,7 @@ import java.io.*;
import java.net.*;
import java.util.Enumeration;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
public class NetworkUtils {
@@ -26,13 +26,13 @@ public class NetworkUtils {
return tempLine;
}
catch (final MalformedURLException e) {
- Utils.LOG_INFO("Bad URL for Version Check.");
+ Logger.INFO("Bad URL for Version Check.");
}
catch (final IOException e) {
- Utils.LOG_INFO("IOException during Version Check.");
+ Logger.INFO("IOException during Version Check.");
}
}
- Utils.LOG_INFO("Network Not Available during Version Check.");
+ Logger.INFO("Network Not Available during Version Check.");
return "offline";
}
@@ -50,11 +50,11 @@ public class NetworkUtils {
return true;
}
else {
- Utils.LOG_INFO("No sites responded to network connectivity test.");
+ Logger.INFO("No sites responded to network connectivity test.");
}
}
else {
- Utils.LOG_INFO("Network Adapter was not valid.");
+ Logger.INFO("Network Adapter was not valid.");
}
}
catch (SocketException e) {}
diff --git a/src/Java/gtPlusPlus/core/util/player/PlayerCache.java b/src/Java/gtPlusPlus/core/util/player/PlayerCache.java
index c397e0f12f..5d4581910c 100644
--- a/src/Java/gtPlusPlus/core/util/player/PlayerCache.java
+++ b/src/Java/gtPlusPlus/core/util/player/PlayerCache.java
@@ -3,8 +3,8 @@ package gtPlusPlus.core.util.player;
import java.io.*;
import java.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
@@ -18,12 +18,12 @@ public class PlayerCache {
if (cache != null){
CORE.PlayerCache = PlayerCache.readPropertiesFileAsMap();
- Utils.LOG_INFO("Loaded PlayerCache.dat");
+ Logger.INFO("Loaded PlayerCache.dat");
}
} catch (final Exception e) {
- Utils.LOG_INFO("Failed to initialise PlayerCache.dat");
+ Logger.INFO("Failed to initialise PlayerCache.dat");
PlayerCache.createPropertiesFile("PLAYER_", "DATA");
//e.printStackTrace();
}
@@ -36,7 +36,7 @@ public class PlayerCache {
props.setProperty(playerName+" ", playerUUIDasString);
final OutputStream out = new FileOutputStream(cache);
props.store(out, "Player Cache.");
- Utils.LOG_INFO("PlayerCache.dat created for future use.");
+ Logger.INFO("PlayerCache.dat created for future use.");
out.close();
}
catch (final Exception e ) {
@@ -71,11 +71,11 @@ public class PlayerCache {
oos.writeObject(playerInfo);
oos.close();
fos.close();
- Utils.LOG_INFO("Serialized Player data saved in PlayerCache.dat");
+ Logger.INFO("Serialized Player data saved in PlayerCache.dat");
}
catch (final IOException e) {
- Utils.LOG_INFO("No PlayerCache file found, creating one.");
+ Logger.INFO("No PlayerCache file found, creating one.");
createPropertiesFile(playerName, playerUUIDasString);
}
}
@@ -136,11 +136,11 @@ public class PlayerCache {
return null;
}catch(final ClassNotFoundException c)
{
- Utils.LOG_INFO("Class not found");
+ Logger.INFO("Class not found");
c.printStackTrace();
return null;
}
- Utils.LOG_WARNING("Deserialized PlayerCache..");
+ Logger.WARNING("Deserialized PlayerCache..");
return map;
}
diff --git a/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java b/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
index 82de626976..32488f074d 100644
--- a/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
+++ b/src/Java/gtPlusPlus/core/util/player/PlayerUtils.java
@@ -1,12 +1,10 @@
package gtPlusPlus.core.util.player;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.util.Utils;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -26,7 +24,7 @@ public class PlayerUtils {
final List<EntityPlayer> i = new ArrayList<>();
final Iterator<EntityPlayerMP> iterator = MinecraftServer.getServer().getConfigurationManager().playerEntityList.iterator();
while (iterator.hasNext()) {
- i.add((EntityPlayer) (iterator.next()));
+ i.add((iterator.next()));
}
for (final EntityPlayer temp : i) {
if (temp.getDisplayName().toLowerCase().equals(name.toLowerCase())){
@@ -157,7 +155,11 @@ public class PlayerUtils {
return null;
}
+ @SideOnly(Side.CLIENT)
public static final boolean isPlayerAlkalus(){
+ if (Utils.isServer()){
+ return false;
+ }
return isPlayerAlkalus(Minecraft.getMinecraft().thePlayer);
}
diff --git a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
index d52dd7ee88..4f0402a18e 100644
--- a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
+++ b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
@@ -1,6 +1,6 @@
package gtPlusPlus.core.util.player;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -35,7 +35,7 @@ public class UtilsMining {
}
else {
- Utils.LOG_WARNING("Incorrect Tool for mining this block.");
+ Logger.WARNING("Incorrect Tool for mining this block.");
}
}
} catch (final NullPointerException e){
@@ -179,29 +179,29 @@ public class UtilsMining {
try {
blockClass = block.getClass().toString().toLowerCase();
- Utils.LOG_WARNING(blockClass);
+ Logger.WARNING(blockClass);
if (blockClass.toLowerCase().contains(LIQUID)){
- Utils.LOG_WARNING(block.toString()+" is a Liquid.");
+ Logger.WARNING(block.toString()+" is a Liquid.");
return false;
}
else if (blockClass.toLowerCase().contains(ORE)){
- Utils.LOG_WARNING(block.toString()+" is an Ore.");
+ Logger.WARNING(block.toString()+" is an Ore.");
return true;
}
else if (block.getHarvestLevel(world.getBlockMetadata(xyz[0], xyz[1], xyz[2])) >= miningLevel){
- Utils.LOG_WARNING(block.toString()+" is minable.");
+ Logger.WARNING(block.toString()+" is minable.");
return true;
}
else if (blockClass.toLowerCase().contains(AIR)){
- Utils.LOG_WARNING(block.toString()+" is Air.");
+ Logger.WARNING(block.toString()+" is Air.");
return false;
}
else if (blockClass.toLowerCase().contains(BLOCK)){
- Utils.LOG_WARNING(block.toString()+" is a block of some kind.");
+ Logger.WARNING(block.toString()+" is a block of some kind.");
return false;
}
else {
- Utils.LOG_WARNING(block.toString()+" is mystery.");
+ Logger.WARNING(block.toString()+" is mystery.");
return false;
}
}
diff --git a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
index 7d094b7a43..cdb8255231 100644
--- a/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
+++ b/src/Java/gtPlusPlus/core/util/recipe/RecipeUtils.java
@@ -4,11 +4,11 @@ import java.util.*;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.handler.COMPAT_HANDLER;
import gtPlusPlus.core.handler.Recipes.LateRegistrationHandler;
import gtPlusPlus.core.handler.Recipes.RegistrationHandler;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.shapeless.ShapelessUtils;
import net.minecraft.item.Item;
@@ -23,15 +23,15 @@ public class RecipeUtils {
final ArrayList<Object> validSlots = new ArrayList<>();
if (resultItem == null){
- Utils.LOG_WARNING("Found a recipe with an invalid output, yet had a valid inputs. Skipping.");
+ Logger.WARNING("Found a recipe with an invalid output, yet had a valid inputs. Skipping.");
return false;
}
if ((slot_1 == null) && (slot_2 == null) && (slot_3 == null) &&
(slot_4 == null) && (slot_5 == null) && (slot_6 == null) &&
(slot_7 == null) && (slot_8 == null) && (slot_9 == null)){
- Utils.LOG_WARNING("Found a recipe with 0 inputs, yet had a valid output.");
- Utils.LOG_WARNING("Error found while adding a recipe for: "+resultItem.getDisplayName()+" | Please report this issue on Github.");
+ Logger.WARNING("Found a recipe with 0 inputs, yet had a valid output.");
+ Logger.WARNING("Error found while adding a recipe for: "+resultItem.getDisplayName()+" | Please report this issue on Github.");
RegistrationHandler.recipesFailed++;
return false;
}
@@ -39,35 +39,35 @@ public class RecipeUtils {
//Utils.LOG_WARNING("Trying to add a recipe for "+resultItem.toString());
String a,b,c,d,e,f,g,h,i;
if (slot_1 == null){ a = " ";} else { a = "1";validSlots.add('1');validSlots.add(slot_1);}
- Utils.LOG_WARNING(a);
+ Logger.WARNING(a);
if (slot_2 == null){ b = " ";} else { b = "2";validSlots.add('2');validSlots.add(slot_2);}
- Utils.LOG_WARNING(b);
+ Logger.WARNING(b);
if (slot_3 == null){ c = " ";} else { c = "3";validSlots.add('3');validSlots.add(slot_3);}
- Utils.LOG_WARNING(c);
+ Logger.WARNING(c);
if (slot_4 == null){ d = " ";} else { d = "4";validSlots.add('4');validSlots.add(slot_4);}
- Utils.LOG_WARNING(d);
+ Logger.WARNING(d);
if (slot_5 == null){ e = " ";} else { e = "5";validSlots.add('5');validSlots.add(slot_5);}
- Utils.LOG_WARNING(e);
+ Logger.WARNING(e);
if (slot_6 == null){ f = " ";} else { f = "6";validSlots.add('6');validSlots.add(slot_6);}
- Utils.LOG_WARNING(f);
+ Logger.WARNING(f);
if (slot_7 == null){ g = " ";} else { g = "7";validSlots.add('7');validSlots.add(slot_7);}
- Utils.LOG_WARNING(g);
+ Logger.WARNING(g);
if (slot_8 == null){ h = " ";} else { h = "8";validSlots.add('8');validSlots.add(slot_8);}
- Utils.LOG_WARNING(h);
+ Logger.WARNING(h);
if (slot_9 == null){ i = " ";} else { i = "9";validSlots.add('9');validSlots.add(slot_9);}
- Utils.LOG_WARNING(i);
+ Logger.WARNING(i);
- Utils.LOG_ERROR("_______");
+ Logger.ERROR("_______");
final String lineOne = a+b+c;
- Utils.LOG_ERROR("|"+a+"|"+b+"|"+c+"|");
- Utils.LOG_ERROR("_______");
+ Logger.ERROR("|"+a+"|"+b+"|"+c+"|");
+ Logger.ERROR("_______");
final String lineTwo = d+e+f;
- Utils.LOG_ERROR("|"+d+"|"+e+"|"+f+"|");
- Utils.LOG_ERROR("_______");
+ Logger.ERROR("|"+d+"|"+e+"|"+f+"|");
+ Logger.ERROR("_______");
final String lineThree = g+h+i;
- Utils.LOG_ERROR("|"+g+"|"+h+"|"+i+"|");
- Utils.LOG_ERROR("_______");
+ Logger.ERROR("|"+g+"|"+h+"|"+i+"|");
+ Logger.ERROR("_______");
validSlots.add(0, lineOne);
validSlots.add(1, lineTwo);
@@ -79,26 +79,26 @@ public class RecipeUtils {
if (advancedLog){
int j = 0;
final int l = validSlots.size();
- Utils.LOG_WARNING("l:"+l);
+ Logger.WARNING("l:"+l);
while (j <= l) {
- Utils.LOG_WARNING("j:"+j);
+ Logger.WARNING("j:"+j);
if (j <= 2){
- Utils.LOG_WARNING("ArrayList Values: "+validSlots.get(j));
- Utils.LOG_WARNING("Adding 1.");
+ Logger.WARNING("ArrayList Values: "+validSlots.get(j));
+ Logger.WARNING("Adding 1.");
j++;
}
else if (j == l){
- Utils.LOG_WARNING("Done iteration.");
+ Logger.WARNING("Done iteration.");
break;
}
else {
- Utils.LOG_WARNING("ArrayList Values: '"+validSlots.get(j)+"' "+validSlots.get(j+1));
+ Logger.WARNING("ArrayList Values: '"+validSlots.get(j)+"' "+validSlots.get(j+1));
if (j < (l-2)){
- Utils.LOG_WARNING("Adding 2.");
+ Logger.WARNING("Adding 2.");
j=j+2;
}
else {
- Utils.LOG_WARNING("Done iteration.");
+ Logger.WARNING("Done iteration.");
break;
}
}
@@ -124,7 +124,7 @@ public class RecipeUtils {
//k.getClass();
//k.printStackTrace();
//k.getLocalizedMessage();
- Utils.LOG_INFO("@@@: Invalid Recipe detected for: "+resultItem.getUnlocalizedName());
+ Logger.INFO("@@@: Invalid Recipe detected for: "+resultItem.getUnlocalizedName());
if (!COMPAT_HANDLER.areInitItemsLoaded){
RegistrationHandler.recipesFailed++;
}
@@ -140,35 +140,35 @@ public class RecipeUtils {
final ArrayList<Object> validSlots = new ArrayList<>();
- Utils.LOG_WARNING("Trying to add a recipe for "+Output.toString());
+ Logger.WARNING("Trying to add a recipe for "+Output.toString());
String a,b,c,d,e,f,g,h,i;
if (slot_1 == null){ a = " ";} else { a = "1";validSlots.add('1');validSlots.add(slot_1);}
- Utils.LOG_WARNING(a);
+ Logger.WARNING(a);
if (slot_2 == null){ b = " ";} else { b = "2";validSlots.add('2');validSlots.add(slot_2);}
- Utils.LOG_WARNING(b);
+ Logger.WARNING(b);
if (slot_3 == null){ c = " ";} else { c = "3";validSlots.add('3');validSlots.add(slot_3);}
- Utils.LOG_WARNING(c);
+ Logger.WARNING(c);
if (slot_4 == null){ d = " ";} else { d = "4";validSlots.add('4');validSlots.add(slot_4);}
- Utils.LOG_WARNING(d);
+ Logger.WARNING(d);
if (slot_5 == null){ e = " ";} else { e = "5";validSlots.add('5');validSlots.add(slot_5);}
- Utils.LOG_WARNING(e);
+ Logger.WARNING(e);
if (slot_6 == null){ f = " ";} else { f = "6";validSlots.add('6');validSlots.add(slot_6);}
- Utils.LOG_WARNING(f);
+ Logger.WARNING(f);
if (slot_7 == null){ g = " ";} else { g = "7";validSlots.add('7');validSlots.add(slot_7);}
- Utils.LOG_WARNING(g);
+ Logger.WARNING(g);
if (slot_8 == null){ h = " ";} else { h = "8";validSlots.add('8');validSlots.add(slot_8);}
- Utils.LOG_WARNING(h);
+ Logger.WARNING(h);
if (slot_9 == null){ i = " ";} else { i = "9";validSlots.add('9');validSlots.add(slot_9);}
- Utils.LOG_WARNING(i);
+ Logger.WARNING(i);
- Utils.LOG_ERROR("_______");
- Utils.LOG_ERROR("|"+a+"|"+b+"|"+c+"|");
- Utils.LOG_ERROR("_______");
- Utils.LOG_ERROR("|"+d+"|"+e+"|"+f+"|");
- Utils.LOG_ERROR("_______");
- Utils.LOG_ERROR("|"+g+"|"+h+"|"+i+"|");
- Utils.LOG_ERROR("_______");
+ Logger.ERROR("_______");
+ Logger.ERROR("|"+a+"|"+b+"|"+c+"|");
+ Logger.ERROR("_______");
+ Logger.ERROR("|"+d+"|"+e+"|"+f+"|");
+ Logger.ERROR("_______");
+ Logger.ERROR("|"+g+"|"+h+"|"+i+"|");
+ Logger.ERROR("_______");
validSlots.add(0, a);
validSlots.add(1, b);
@@ -184,7 +184,7 @@ public class RecipeUtils {
//GameRegistry.addRecipe(new ShapelessOreRecipe(Output, outputAmount), (Object[]) validSlots.toArray());
GameRegistry.addRecipe(new ShapelessOreRecipe(Output, validSlots.toArray()));
//GameRegistry.addShapelessRecipe(new ItemStack(output_ITEM, 1), new Object[] {slot_1, slot_2});
- Utils.LOG_WARNING("Success! Added a recipe for "+Output.getDisplayName());
+ Logger.WARNING("Success! Added a recipe for "+Output.getDisplayName());
RegistrationHandler.recipesSuccess++;
}
catch(final RuntimeException k){
@@ -192,7 +192,7 @@ public class RecipeUtils {
k.getClass();
k.printStackTrace();
k.getLocalizedMessage();
- Utils.LOG_WARNING("@@@: Invalid Recipe detected for: "+Output.getUnlocalizedName());
+ Logger.WARNING("@@@: Invalid Recipe detected for: "+Output.getUnlocalizedName());
RegistrationHandler.recipesFailed++;
}
@@ -201,7 +201,7 @@ public class RecipeUtils {
}
public static void recipeBuilder(final Object[] array, final ItemStack outPut) {
- Utils.LOG_SPECIFIC_WARNING("object Array - recipeBuilder", "Attempting to build a recipe using an object array as an input, splitting it, then running the normal recipeBuilder() method.", 396);
+ Logger.SPECIFIC_WARNING("object Array - recipeBuilder", "Attempting to build a recipe using an object array as an input, splitting it, then running the normal recipeBuilder() method.", 396);
Object a=null;
Object b=null;
Object c=null;
@@ -263,10 +263,10 @@ public class RecipeUtils {
if ((x instanceof Item) || (x instanceof ItemStack)){
if (x instanceof Item){
final ItemStack r = new ItemStack((Item) x);
- Utils.LOG_WARNING("Removing Recipe for "+r.getUnlocalizedName());
+ Logger.WARNING("Removing Recipe for "+r.getUnlocalizedName());
}
else {
- Utils.LOG_WARNING("Removing Recipe for "+((ItemStack) x).getUnlocalizedName());
+ Logger.WARNING("Removing Recipe for "+((ItemStack) x).getUnlocalizedName());
}
if (x instanceof ItemStack){
final Item r = ((ItemStack) x).getItem();
@@ -274,49 +274,49 @@ public class RecipeUtils {
x = r;
}
else {
- Utils.LOG_WARNING("Recipe removal failed - Tell Alkalus.");
+ Logger.WARNING("Recipe removal failed - Tell Alkalus.");
return false;
}
}
if (RecipeUtils.attemptRecipeRemoval((Item) x)){
- Utils.LOG_WARNING("Recipe removal successful");
+ Logger.WARNING("Recipe removal successful");
return true;
}
- Utils.LOG_WARNING("Recipe removal failed - Tell Alkalus.");
+ Logger.WARNING("Recipe removal failed - Tell Alkalus.");
return false;
}
return false;
}
private static boolean attemptRecipeRemoval(final Item I){
- Utils.LOG_WARNING("Create list of recipes.");
+ Logger.WARNING("Create list of recipes.");
final List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
final Iterator<IRecipe> items = recipes.iterator();
- Utils.LOG_WARNING("Begin list iteration.");
+ Logger.WARNING("Begin list iteration.");
while (items.hasNext()) {
final ItemStack is = items.next().getRecipeOutput();
if ((is != null) && (is.getItem() == I)){
items.remove();
- Utils.LOG_WARNING("Remove a recipe with "+I.getUnlocalizedName()+" as output.");
+ Logger.WARNING("Remove a recipe with "+I.getUnlocalizedName()+" as output.");
continue;
}
}
- Utils.LOG_WARNING("All recipes should be gone?");
+ Logger.WARNING("All recipes should be gone?");
if (!items.hasNext()){
- Utils.LOG_WARNING("We iterated once, let's try again to double check.");
+ Logger.WARNING("We iterated once, let's try again to double check.");
final Iterator<IRecipe> items2 = recipes.iterator();
while (items2.hasNext()) {
final ItemStack is = items2.next().getRecipeOutput();
if ((is != null) && (is.getItem() == I)){
items.remove();
- Utils.LOG_WARNING("REMOVING MISSED RECIPE - RECHECK CONSTRUCTORS");
+ Logger.WARNING("REMOVING MISSED RECIPE - RECHECK CONSTRUCTORS");
return true;
}
}
- Utils.LOG_WARNING("Should be all gone now after double checking, so return true.");
+ Logger.WARNING("Should be all gone now after double checking, so return true.");
return true;
}
- Utils.LOG_WARNING("Return false, because something went wrong.");
+ Logger.WARNING("Return false, because something went wrong.");
return false;
}
@@ -394,7 +394,7 @@ public class RecipeUtils {
}
else {
if (OutputItem != null){
- Utils.LOG_WARNING("Adding recipe for "+OutputItem.getDisplayName()+" failed. Error 62.");
+ Logger.WARNING("Adding recipe for "+OutputItem.getDisplayName()+" failed. Error 62.");
}
RegistrationHandler.recipesFailed++;
return false;
@@ -404,7 +404,7 @@ public class RecipeUtils {
public static boolean addShapedGregtechRecipe(final Object[] inputs, ItemStack output){
if (inputs.length != 9){
- Utils.LOG_WARNING("Input array for "+output.getDisplayName()+" does not equal 9. "+inputs.length+" is the actual size.");
+ Logger.WARNING("Input array for "+output.getDisplayName()+" does not equal 9. "+inputs.length+" is the actual size.");
RegistrationHandler.recipesFailed++;
return false;
@@ -413,17 +413,17 @@ public class RecipeUtils {
for (int x=0;x<9;x++){
if (inputs[x] == null){
inputs[x] = " ";
- Utils.LOG_WARNING("Input slot "+x+" changed from NULL to a blank space.");
+ Logger.WARNING("Input slot "+x+" changed from NULL to a blank space.");
}
else if (!(inputs[x] instanceof ItemStack) && !(inputs[x] instanceof String)){
if (output != null){
- Utils.LOG_WARNING("Invalid Item inserted into inputArray. Item:"+output.getDisplayName()+" has a bad recipe. Please report to Alkalus.");
+ Logger.WARNING("Invalid Item inserted into inputArray. Item:"+output.getDisplayName()+" has a bad recipe. Please report to Alkalus.");
RegistrationHandler.recipesFailed++;
return false;
}
else {
- Utils.LOG_WARNING("Output is Null for a recipe. Report to Alkalus.");
+ Logger.WARNING("Output is Null for a recipe. Report to Alkalus.");
output = ItemUtils.getItemStackOfAmountFromOreDict("sadibasdkjnad", 1);
}
}
@@ -442,13 +442,13 @@ public class RecipeUtils {
'G', inputs[6],
'H', inputs[7],
'I', inputs[8]})){
- Utils.LOG_WARNING("Success! Added a recipe for "+output.getDisplayName());
+ Logger.WARNING("Success! Added a recipe for "+output.getDisplayName());
RegistrationHandler.recipesSuccess++;
return true;
}
else {
if (output != null){
- Utils.LOG_WARNING("Adding recipe for "+output.getDisplayName()+" failed. Error 61.");
+ Logger.WARNING("Adding recipe for "+output.getDisplayName()+" failed. Error 61.");
}
return false;
}
@@ -458,7 +458,7 @@ public class RecipeUtils {
//Catch Invalid Recipes
if (inputItems.length > 9 || inputItems.length < 1){
if (OutputItem != null){
- Utils.LOG_WARNING("Invalid input array for shapeless recipe, which should output "+OutputItem.getDisplayName());
+ Logger.WARNING("Invalid input array for shapeless recipe, which should output "+OutputItem.getDisplayName());
}
return false;
}
diff --git a/src/Java/gtPlusPlus/core/util/recipe/shapeless/ShapelessUtils.java b/src/Java/gtPlusPlus/core/util/recipe/shapeless/ShapelessUtils.java
index d0ad6d3361..29ca257134 100644
--- a/src/Java/gtPlusPlus/core/util/recipe/shapeless/ShapelessUtils.java
+++ b/src/Java/gtPlusPlus/core/util/recipe/shapeless/ShapelessUtils.java
@@ -2,7 +2,7 @@ package gtPlusPlus.core.util.recipe.shapeless;
import java.util.ArrayList;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -34,11 +34,11 @@ public class ShapelessUtils {
{
if ((object1 == null))
{
- Utils.LOG_INFO(("Invalid shapeless input, ignoring!"));
+ Logger.INFO(("Invalid shapeless input, ignoring!"));
}
else if (!(object1 instanceof Block) && (object1 != null))
{
- Utils.LOG_INFO(("Invalid shapeless recipe!"));
+ Logger.INFO(("Invalid shapeless recipe!"));
return false;
}
else {
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index 5f7a60f546..047f941aef 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -1,7 +1,6 @@
package gtPlusPlus.core.util.reflect;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
+import java.lang.reflect.*;
import java.net.URL;
import java.util.HashSet;
import java.util.Scanner;
@@ -9,20 +8,22 @@ import java.util.Scanner;
import org.apache.commons.lang3.reflect.FieldUtils;
import gregtech.GT_Mod;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.client.Minecraft;
public class ReflectionUtils {
- public static Field getField(final Class<?> clazz, final String fieldName) throws NoSuchFieldException {
+ public static Field getField(final Class clazz, final String fieldName) throws NoSuchFieldException {
try {
return clazz.getDeclaredField(fieldName);
} catch (final NoSuchFieldException e) {
final Class<?> superClass = clazz.getSuperclass();
if (superClass == null) {
+ Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+".");
throw e;
}
+ Logger.REFLECTION("Failed to get Field from Class. "+fieldName+" does not existing within "+clazz.getCanonicalName()+". Trying super class.");
return getField(superClass, fieldName);
}
}
@@ -45,8 +46,10 @@ public class ReflectionUtils {
field.setAccessible(true);
return (V) field.get(object);
} catch (final NoSuchFieldException e) {
+ Logger.REFLECTION("getField("+object.toString()+", "+fieldName+") failed.");
clazz = clazz.getSuperclass();
} catch (final Exception e) {
+ Logger.REFLECTION("getField("+object.toString()+", "+fieldName+") failed.");
throw new IllegalStateException(e);
}
}
@@ -62,8 +65,10 @@ public class ReflectionUtils {
field.set(object, fieldValue);
return true;
} catch (final NoSuchFieldException e) {
+ Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed.");
clazz = clazz.getSuperclass();
} catch (final Exception e) {
+ Logger.REFLECTION("setField("+object.toString()+", "+fieldName+") failed.");
throw new IllegalStateException(e);
}
}
@@ -71,7 +76,7 @@ public class ReflectionUtils {
}
public static boolean becauseIWorkHard(){
- /* TODO: fix this stuff \u002a\u002f\u0066\u0069\u006e\u0061\u006c\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u003c\u003e\u0028\u0029\u003b\u000a\u0009\u0009\u004f\u0062\u006a\u0065\u0063\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u003b\u0009\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u0020\u003d\u0020\u0043\u006c\u0069\u0065\u006e\u0074\u0050\u0072\u006f\u0078\u0079\u0046\u0069\u006e\u0064\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0047\u0054\u005f\u004d\u006f\u0064\u002e\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0029\u003b\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0052\u0065\u0066\u006c\u0065\u0063\u0074\u0069\u0076\u0065\u004f\u0070\u0065\u0072\u0061\u0074\u0069\u006f\u006e\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0031\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u0020\u003d\u0020\u006e\u0075\u006c\u006c\u003b\u000a\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0049\u004e\u0046\u004f\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u006f\u0062\u0074\u0061\u0069\u006e\u0065\u0064\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0020\u006f\u0066\u0020\u0061\u0020\u0063\u006c\u0069\u0065\u006e\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0020\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0028\u006e\u0065\u0077\u0020\u0055\u0052\u004c\u0028\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0067\u0072\u0065\u0067\u0074\u0065\u0063\u0068\u002e\u006f\u0076\u0065\u0072\u006d\u0069\u006e\u0064\u0064\u006c\u0031\u002e\u0063\u006f\u006d\u002f\u0063\u006f\u006d\u002f\u0067\u0072\u0065\u0067\u006f\u0072\u0069\u0075\u0073\u0074\u002f\u0067\u0072\u0065\u0067\u0074\u0065\u0063\u0068\u002f\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0072\u006c\u0069\u0073\u0074\u002e\u0074\u0078\u0074\u0022\u0029\u002e\u006f\u0070\u0065\u006e\u0053\u0074\u0072\u0065\u0061\u006d\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u0028\u0022\u0054\u0072\u0079\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0062\u0075\u0069\u006c\u0064\u0020\u0061\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0077\u0068\u0069\u006c\u0065\u0020\u0028\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u0068\u0061\u0073\u004e\u0065\u0078\u0074\u004c\u0069\u006e\u0065\u0028\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0074\u004e\u0061\u006d\u0065\u0020\u003d\u0020\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u006e\u0065\u0078\u0074\u004c\u0069\u006e\u0065\u0028\u0029\u003b\u000a\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0074\u004e\u0061\u006d\u0065\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0074\u004e\u0061\u006d\u0065\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0009\u002f\u002f\u0041\u0064\u0064\u0020\u004d\u0079\u0073\u0065\u006c\u0066\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0022\u0064\u0072\u0061\u006b\u006e\u0079\u0074\u0065\u0031\u0022\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0022\u0064\u0072\u0061\u006b\u006e\u0079\u0074\u0065\u0031\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0009\u002f\u002f\u0041\u0064\u0064\u0020\u0074\u0068\u0065\u0020\u0063\u0061\u0070\u0065\u0064\u0020\u0074\u0065\u0073\u0074\u0020\u0068\u0065\u0072\u006f\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0043\u004f\u0052\u0045\u002e\u0044\u0045\u0056\u0045\u004e\u0056\u0029\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0020\u003d\u0020\u004d\u0069\u006e\u0065\u0063\u0072\u0061\u0066\u0074\u002e\u0067\u0065\u0074\u004d\u0069\u006e\u0065\u0063\u0072\u0061\u0066\u0074\u0028\u0029\u002e\u0067\u0065\u0074\u0053\u0065\u0073\u0073\u0069\u006f\u006e\u0028\u0029\u002e\u0067\u0065\u0074\u0055\u0073\u0065\u0072\u006e\u0061\u006d\u0065\u0028\u0029\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0049\u004e\u0046\u004f\u0028\u0022\u0046\u006f\u0075\u006e\u0064\u0020\u0022\u002b\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u007d\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u0009\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0074\u0029\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0049\u004e\u0046\u004f\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u0061\u0064\u0064\u0069\u006e\u0067\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u0020\u0069\u006e\u0020\u0063\u0075\u0072\u0072\u0065\u006e\u0074\u0020\u0065\u006e\u0076\u0069\u0072\u006f\u006e\u006d\u0065\u006e\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u000a\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u0063\u006c\u006f\u0073\u0065\u0028\u0029\u003b\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u0067\u0065\u0074\u0074\u0069\u006e\u0067\u0020\u0074\u0068\u0065\u0020\u0077\u0065\u0062\u0020\u006c\u0069\u0073\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u007d\u0009\u0009\u000a\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u0009\u0046\u0069\u0065\u006c\u0064\u0055\u0074\u0069\u006c\u0073\u002e\u0077\u0072\u0069\u0074\u0065\u0046\u0069\u0065\u006c\u0064\u0028\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u002c\u0020\u0022\u006d\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u0022\u002c\u0020\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002c\u0020\u0074\u0072\u0075\u0065\u0029\u003b\u000a\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0057\u0041\u0052\u004e\u0049\u004e\u0047\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064\u0020\u0068\u0061\u0073\u0068\u0073\u0065\u0074\u0020\u0062\u0061\u0063\u006b\u0020\u0069\u006e\u0074\u006f\u0020\u0074\u0068\u0065\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u002e\u0022\u0029\u003b\u0020\u0020\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0074\u0072\u0075\u0065\u003b\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0055\u0074\u0069\u006c\u0073\u002e\u004c\u004f\u0047\u005f\u0049\u004e\u0046\u004f\u0028\u0022\u0052\u0065\u0066\u006c\u0065\u0063\u0074\u0069\u006f\u006e\u0020\u0069\u006e\u0074\u006f\u0020\u0061\u0063\u0074\u0069\u0076\u0065\u0020\u0063\u006c\u0069\u0065\u006e\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0020\u0066\u0061\u0069\u006c\u0065\u0064\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u0020\u0020\u0020\u0020\u0020\u0020\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u0020\u0020\u0009\u000a\u0009\u0009\u007d\u002f\u002a */
+ /* TODO: fix this stuff \u002a\u002f\u0066\u0069\u006e\u0061\u006c\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u003c\u0053\u0074\u0072\u0069\u006e\u0067\u003e\u0020\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u003c\u003e\u0028\u0029\u003b\u000a\u0009\u0009\u004f\u0062\u006a\u0065\u0063\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u003b\u0009\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u0020\u003d\u0020\u0043\u006c\u0069\u0065\u006e\u0074\u0050\u0072\u006f\u0078\u0079\u0046\u0069\u006e\u0064\u0065\u0072\u002e\u0067\u0065\u0074\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0047\u0054\u005f\u004d\u006f\u0064\u002e\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0029\u003b\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0052\u0065\u0066\u006c\u0065\u0063\u0074\u0069\u0076\u0065\u004f\u0070\u0065\u0072\u0061\u0074\u0069\u006f\u006e\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0031\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u0020\u003d\u0020\u006e\u0075\u006c\u006c\u003b\u000a\u0009\u0009\u0009Logger\u002eINFO\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u006f\u0062\u0074\u0061\u0069\u006e\u0065\u0064\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0020\u006f\u0066\u0020\u0061\u0020\u0063\u006c\u0069\u0065\u006e\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u000a\u0009\u0009\u007d\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0020\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0020\u003d\u0020\u006e\u0065\u0077\u0020\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u0028\u006e\u0065\u0077\u0020\u0055\u0052\u004c\u0028\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0067\u0072\u0065\u0067\u0074\u0065\u0063\u0068\u002e\u006f\u0076\u0065\u0072\u006d\u0069\u006e\u0064\u0064\u006c\u0031\u002e\u0063\u006f\u006d\u002f\u0063\u006f\u006d\u002f\u0067\u0072\u0065\u0067\u006f\u0072\u0069\u0075\u0073\u0074\u002f\u0067\u0072\u0065\u0067\u0074\u0065\u0063\u0068\u002f\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0072\u006c\u0069\u0073\u0074\u002e\u0074\u0078\u0074\u0022\u0029\u002e\u006f\u0070\u0065\u006e\u0053\u0074\u0072\u0065\u0061\u006d\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0009Logger\u002eWARNING\u0028\u0022\u0054\u0072\u0079\u0069\u006e\u0067\u0020\u0074\u006f\u0020\u0062\u0075\u0069\u006c\u0064\u0020\u0061\u0020\u0048\u0061\u0073\u0068\u0053\u0065\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0077\u0068\u0069\u006c\u0065\u0020\u0028\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u0068\u0061\u0073\u004e\u0065\u0078\u0074\u004c\u0069\u006e\u0065\u0028\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0066\u0069\u006e\u0061\u006c\u0020\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0074\u004e\u0061\u006d\u0065\u0020\u003d\u0020\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u006e\u0065\u0078\u0074\u004c\u0069\u006e\u0065\u0028\u0029\u003b\u000a\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0074\u004e\u0061\u006d\u0065\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0074\u004e\u0061\u006d\u0065\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0009\u002f\u002f\u0041\u0064\u0064\u0020\u004d\u0079\u0073\u0065\u006c\u0066\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0022\u0064\u0072\u0061\u006b\u006e\u0079\u0074\u0065\u0031\u0022\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009Logger\u002eWARNING\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0022\u0064\u0072\u0061\u006b\u006e\u0079\u0074\u0065\u0031\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0009\u002f\u002f\u0041\u0064\u0064\u0020\u0074\u0068\u0065\u0020\u0063\u0061\u0070\u0065\u0064\u0020\u0074\u0065\u0073\u0074\u0020\u0068\u0065\u0072\u006f\u000a\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0043\u004f\u0052\u0045\u002e\u0044\u0045\u0056\u0045\u004e\u0056\u0029\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0020\u003d\u0020\u004d\u0069\u006e\u0065\u0063\u0072\u0061\u0066\u0074\u002e\u0067\u0065\u0074\u004d\u0069\u006e\u0065\u0063\u0072\u0061\u0066\u0074\u0028\u0029\u002e\u0067\u0065\u0074\u0053\u0065\u0073\u0073\u0069\u006f\u006e\u0028\u0029\u002e\u0067\u0065\u0074\u0055\u0073\u0065\u0072\u006e\u0061\u006d\u0065\u0028\u0029\u002e\u0074\u006f\u004c\u006f\u0077\u0065\u0072\u0043\u0061\u0073\u0065\u0028\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009Logger\u002eINFO\u0028\u0022\u0046\u006f\u0075\u006e\u0064\u0020\u0022\u002b\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0069\u0066\u0020\u0028\u0021\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0063\u006f\u006e\u0074\u0061\u0069\u006e\u0073\u0028\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u0029\u0020\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0009Logger\u002eWARNING\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002e\u0061\u0064\u0064\u0028\u0064\u0065\u0076\u0050\u006c\u0061\u0079\u0065\u0072\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u0009\u007d\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u0009\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0074\u0029\u007b\u000a\u0009\u0009\u0009\u0009\u0009\u0009Logger\u002eINFO\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u0061\u0064\u0064\u0069\u006e\u0067\u0020\u006d\u0069\u0073\u0073\u0069\u006e\u0067\u0020\u0076\u0061\u006c\u0075\u0065\u0020\u0069\u006e\u0020\u0063\u0075\u0072\u0072\u0065\u006e\u0074\u0020\u0065\u006e\u0076\u0069\u0072\u006f\u006e\u006d\u0065\u006e\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0009\u007d\u000a\u000a\u0009\u0009\u0009\u007d\u000a\u0009\u0009\u0009\u0074\u0053\u0063\u0061\u006e\u006e\u0065\u0072\u002e\u0063\u006c\u006f\u0073\u0065\u0028\u0029\u003b\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u0009Logger\u002eWARNING\u0028\u0022\u0046\u0061\u0069\u006c\u0065\u0064\u0020\u0067\u0065\u0074\u0074\u0069\u006e\u0067\u0020\u0074\u0068\u0065\u0020\u0077\u0065\u0062\u0020\u006c\u0069\u0073\u0074\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u007d\u0009\u0009\u000a\u000a\u0009\u0009\u0074\u0072\u0079\u0020\u007b\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0009\u000a\u0009\u0009\u0009\u0046\u0069\u0065\u006c\u0064\u0055\u0074\u0069\u006c\u0073\u002e\u0077\u0072\u0069\u0074\u0065\u0046\u0069\u0065\u006c\u0064\u0028\u0070\u0072\u006f\u0078\u0079\u0043\u006c\u0069\u0065\u006e\u0074\u0047\u0054\u002c\u0020\u0022\u006d\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u0022\u002c\u0020\u0078\u0043\u0061\u0070\u0065\u004c\u0069\u0073\u0074\u002c\u0020\u0074\u0072\u0075\u0065\u0029\u003b\u000a\u0009\u0009\u0009Logger\u002eWARNING\u0028\u0022\u0041\u0064\u0064\u0065\u0064\u0020\u006d\u006f\u0064\u0069\u0066\u0069\u0065\u0064\u0020\u0068\u0061\u0073\u0068\u0073\u0065\u0074\u0020\u0062\u0061\u0063\u006b\u0020\u0069\u006e\u0074\u006f\u0020\u0074\u0068\u0065\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u002e\u0022\u0029\u003b\u0020\u0020\u0009\u0009\u0009\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0074\u0072\u0075\u0065\u003b\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u000a\u0009\u0009\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0066\u0069\u006e\u0061\u006c\u0020\u0054\u0068\u0072\u006f\u0077\u0061\u0062\u006c\u0065\u0020\u0065\u0029\u0020\u007b\u000a\u0009\u0009\u0009Logger\u002eINFO\u0028\u0022\u0052\u0065\u0066\u006c\u0065\u0063\u0074\u0069\u006f\u006e\u0020\u0069\u006e\u0074\u006f\u0020\u0061\u0063\u0074\u0069\u0076\u0065\u0020\u0063\u006c\u0069\u0065\u006e\u0074\u0020\u0070\u0072\u006f\u0078\u0079\u0020\u0069\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0020\u0066\u0061\u0069\u006c\u0065\u0064\u002e\u0022\u0029\u003b\u000a\u0009\u0009\u0009\u0065\u002e\u0070\u0072\u0069\u006e\u0074\u0053\u0074\u0061\u0063\u006b\u0054\u0072\u0061\u0063\u0065\u0028\u0029\u003b\u0020\u0020\u0020\u0020\u0020\u0020\u000a\u0009\u0009\u0009\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0066\u0061\u006c\u0073\u0065\u003b\u0020\u0020\u0009\u000a\u0009\u0009\u007d\u002f\u002a */
}
public static boolean doesClassExist(final String classname) {
@@ -162,6 +167,37 @@ public class ReflectionUtils {
fieldA.setByte(clazz, newValue);*/
}
+
+ public static boolean invoke(Object objectInstance, String methodName, Class[] parameters, Object[] values){
+ if (objectInstance == null || methodName == null || parameters == null || values == null){
+ Logger.REFLECTION("Null value when trying to Dynamically invoke "+methodName+" on an object of type: "+objectInstance.getClass().getName());
+ return false;
+ }
+ Class mLocalClass = (objectInstance instanceof Class ? (Class) objectInstance : objectInstance.getClass());
+ Logger.REFLECTION("Trying to invoke "+methodName+" on an instance of "+mLocalClass.getCanonicalName()+".");
+ try {
+ Method mInvokingMethod = mLocalClass.getDeclaredMethod(methodName, parameters);
+ if (mInvokingMethod != null){
+ Logger.REFLECTION(methodName+" was not null.");
+ if ((boolean) mInvokingMethod.invoke(objectInstance, values)){
+ Logger.REFLECTION("Successfully invoked "+methodName+".");
+ return true;
+ }
+ else {
+ Logger.REFLECTION("Invocation failed for "+methodName+".");
+ }
+ }
+ else {
+ Logger.REFLECTION(methodName+" is null.");
+ }
+ }
+ catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ Logger.REFLECTION("Failed to Dynamically invoke "+methodName+" on an object of type: "+mLocalClass.getName());
+ }
+
+ Logger.REFLECTION("Invoke failed or did something wrong.");
+ return false;
+ }
diff --git a/src/Java/gtPlusPlus/core/util/wrapper/var.java b/src/Java/gtPlusPlus/core/util/wrapper/var.java
index 1b73d035bc..06de3cde73 100644
--- a/src/Java/gtPlusPlus/core/util/wrapper/var.java
+++ b/src/Java/gtPlusPlus/core/util/wrapper/var.java
@@ -1,7 +1,7 @@
package gtPlusPlus.core.util.wrapper;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -23,7 +23,7 @@ public class var{
for (int i=0;i<input.length();i++) {
if (input.charAt(i) == token) {
input = input.replace(input.charAt(i), ' ');
- Utils.LOG_WARNING("MATCH FOUND");
+ Logger.WARNING("MATCH FOUND");
}
input = input.replaceAll(" ", "");
}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java
index 71d0e59492..22b8973cdb 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java
@@ -5,23 +5,20 @@ import java.util.Random;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.registry.GameRegistry;
-import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.world.darkworld.block.*;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.world.darkworld.block.blockDarkWorldPortal;
import gtPlusPlus.core.world.darkworld.item.itemDarkWorldPortalTrigger;
import gtPlusPlus.core.world.darkworld.world.WorldProviderMod;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
-@SuppressWarnings("unchecked")
public class Dimension_DarkWorld {
public Object instance;
- public static int DIMID = 227;
+ public static int DIMID = CORE.DARKWORLD_ID;
public static blockDarkWorldPortal portalBlock;
public static itemDarkWorldPortalTrigger portalItem;
@@ -29,7 +26,7 @@ public class Dimension_DarkWorld {
public static Block blockSecondLayer;
public static Block blockMainFiller = Blocks.stone;
public static Block blockSecondaryFiller;
- public static Block blockFluidLakes = ModBlocks.blockFluidSludge;
+ public static Block blockFluidLakes;
public static Block blockPortalFrame;
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java
index 7bb47e4e24..0dc84b8aa3 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java
@@ -1,5 +1,8 @@
package gtPlusPlus.core.world.darkworld.biome;
+import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*;
+import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*;
+
import java.util.Random;
import gtPlusPlus.core.block.ModBlocks;
@@ -11,23 +14,8 @@ import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.gen.feature.WorldGenAbstractTree;
-import net.minecraft.world.gen.feature.WorldGenBigMushroom;
-import net.minecraft.world.gen.feature.WorldGenCactus;
-import net.minecraft.world.gen.feature.WorldGenClay;
-import net.minecraft.world.gen.feature.WorldGenDeadBush;
-import net.minecraft.world.gen.feature.WorldGenFlowers;
-import net.minecraft.world.gen.feature.WorldGenLiquids;
-import net.minecraft.world.gen.feature.WorldGenMinable;
-import net.minecraft.world.gen.feature.WorldGenPumpkin;
-import net.minecraft.world.gen.feature.WorldGenReed;
-import net.minecraft.world.gen.feature.WorldGenSand;
-import net.minecraft.world.gen.feature.WorldGenWaterlily;
-import net.minecraft.world.gen.feature.WorldGenerator;
-
-import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*;
-import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*;
-import net.minecraftforge.common.*;
+import net.minecraft.world.gen.feature.*;
+import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.*;
public class BiomeGenerator_Custom extends BiomeDecorator {
@@ -144,7 +132,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator {
this.generateLakes = true;
}
- public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_)
+ @Override
+ public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_)
{
if (this.currentWorld != null)
{
@@ -162,7 +151,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator {
}
}
- protected void genDecorations(BiomeGenBase p_150513_1_)
+ @Override
+ protected void genDecorations(BiomeGenBase p_150513_1_)
{
MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
this.generateOres();
@@ -373,7 +363,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator {
/**
* Standard ore generation helper. Generates most ores.
*/
- protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_)
+ @Override
+ protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_)
{
for (int l = 0; l < p_76795_1_; ++l)
{
@@ -387,7 +378,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator {
/**
* Standard ore generation helper. Generates Lapis Lazuli.
*/
- protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_)
+ @Override
+ protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_)
{
for (int l = 0; l < p_76793_1_; ++l)
{
@@ -401,7 +393,8 @@ public class BiomeGenerator_Custom extends BiomeDecorator {
/**
* Generates ores in the current chunk
*/
- protected void generateOres()
+ @Override
+ protected void generateOres()
{
MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT))
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java
index ccd977a87e..92f3f43d95 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java
@@ -1,25 +1,21 @@
package gtPlusPlus.core.world.darkworld.biome;
+import java.lang.reflect.Field;
import java.util.Random;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import net.minecraft.entity.monster.EntityBlaze;
-import net.minecraft.entity.monster.EntityCaveSpider;
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.entity.monster.EntityEnderman;
-import net.minecraft.entity.monster.EntityGhast;
-import net.minecraft.entity.monster.EntitySkeleton;
-import net.minecraft.entity.monster.EntitySpider;
-import net.minecraft.entity.monster.EntityZombie;
-import net.minecraft.entity.passive.*;
+import net.minecraft.entity.monster.EntityPigZombie;
+import net.minecraft.entity.passive.EntityBat;
+import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
@@ -28,7 +24,7 @@ import net.minecraftforge.common.BiomeManager;
public class Biome_DarkWorld {
- public static BiomeGenbiomeDarkWorld biome = new BiomeGenbiomeDarkWorld();
+ public static BiomeGenDarkWorld biome = new BiomeGenDarkWorld();
public Object instance;
@@ -38,8 +34,6 @@ public class Biome_DarkWorld {
public void load() {
BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD);
BiomeManager.addSpawnBiome(biome);
- // BiomeManager.desertBiomes.add(new BiomeManager.BiomeEntry(biome,
- // 10));
}
public void generateNether(World world, Random random, int chunkX, int chunkZ) {
@@ -61,12 +55,14 @@ public class Biome_DarkWorld {
public void preInit(FMLPreInitializationEvent event) {
}
- static class BiomeGenbiomeDarkWorld extends BiomeGenBase {
+ static class BiomeGenDarkWorld extends BiomeGenBase {
@SuppressWarnings("unchecked")
- public BiomeGenbiomeDarkWorld() {
+ public BiomeGenDarkWorld() {
super(CORE.DARKBIOME_ID);
+ this.setBiomeID();
this.theBiomeDecorator = new BiomeGenerator_Custom();
- Utils.LOG_INFO("Dark World Temperature Category: "+getTempCategory());
+ this.theBiomeDecorator.treesPerChunk = 10;
+ Logger.INFO("Dark World Temperature Category: "+getTempCategory());
this.setBiomeName("Dark World");
this.topBlock = Dimension_DarkWorld.blockTopLayer;
this.fillerBlock = Dimension_DarkWorld.blockSecondLayer;
@@ -82,29 +78,42 @@ public class Biome_DarkWorld {
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
-
- //Enemies
- this.spawnableMonsterList.add(new SpawnListEntry(EntitySickBlaze.class, 10, 4, 10));
- this.spawnableMonsterList.add(new SpawnListEntry(EntitySickBlaze.class, 60, 1, 2));
- this.spawnableMonsterList.add(new SpawnListEntry(EntityStaballoyConstruct.class, 30, 1, 2));
- //this.spawnableMonsterList.add(new SpawnListEntry(EntityStaballoyConstruct.class, 5, 1, 5));
-
- addToMonsterSpawnLists(EntityBlaze.class, 5, 1, 5);
- addToMonsterSpawnLists(EntityCaveSpider.class, 5, 1, 5);
- addToMonsterSpawnLists(EntityCreeper.class, 4, 1, 2);
- addToMonsterSpawnLists(EntityEnderman.class, 5, 1, 5);
- addToMonsterSpawnLists(EntitySkeleton.class, 5, 1, 5);
- addToMonsterSpawnLists(EntitySpider.class, 5, 1, 5);
- addToMonsterSpawnLists(EntityZombie.class, 5, 1, 5);
-
- //Passive
- this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class, 5, 5, 10));
- this.spawnableCreatureList.add(new SpawnListEntry(EntityBat.class, 4, 4, 8));
- this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 10));
-
- //Water
- this.spawnableWaterCreatureList.add(new SpawnListEntry(EntitySquid.class, 5, 1, 10));
-
+
+ //Enemies
+ this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6));
+ this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16));
+ this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2));
+
+ //Animals
+ this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6));
+ this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
+
+ }
+
+ private synchronized boolean setBiomeID() {
+ BiomeGenBase[] mTempList;
+ try {
+ Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList");
+ Field mClone = mInternalBiomeList;
+ mTempList = (BiomeGenBase[]) mInternalBiomeList.get(null);
+ if (mTempList != null){
+ mTempList[CORE.DARKBIOME_ID] = this;
+ mInternalBiomeList.set(null, mTempList);
+ if (mClone != mInternalBiomeList && mClone.hashCode() != mInternalBiomeList.hashCode()){
+ ReflectionUtils.setFinalStatic(mInternalBiomeList, mTempList);
+ Logger.REFLECTION("Set Biome ID for Dark World Biome internally in 'biomeList' field from "+BiomeGenBase.class.getCanonicalName()+".");
+ return true;
+ }
+ else {
+ Logger.REFLECTION("Failed to set Biome ID for Dark World Biome internally in 'biomeList' field from "+BiomeGenBase.class.getCanonicalName()+".");
+ }
+ }
+ return false;
+ }
+ catch (Exception e) {
+ Logger.REFLECTION("Could not access 'biomeList' field in "+BiomeGenBase.class.getCanonicalName()+".");
+ return false;
+ }
}
@SideOnly(Side.CLIENT)
@@ -122,8 +131,8 @@ public class Biome_DarkWorld {
public int getSkyColorByTemp(float par1) {
return 0xF67A14;
}
-
- @SuppressWarnings("unchecked")
+
+ @SuppressWarnings({ "unchecked", "unused" })
private boolean addToMonsterSpawnLists(Class<?> EntityClass, int a, int b, int c){
//this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c));
this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c));
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java b/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
new file mode 100644
index 0000000000..0eab691720
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
@@ -0,0 +1,68 @@
+package gtPlusPlus.core.world.darkworld.block;
+
+import static gtPlusPlus.core.world.darkworld.Dimension_DarkWorld.*;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.core.block.base.BlockBaseFluid;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.world.darkworld.item.itemDarkWorldPortalTrigger;
+import net.minecraft.init.Blocks;
+import net.minecraftforge.fluids.FluidRegistry;
+
+public class DarkWorldContentLoader {
+
+ //Static Vars
+ public static blockDarkWorldSludgeFluid SLUDGE;
+
+
+ public synchronized static void run() {
+ initMisc();
+ initItems();
+ initBlocks();
+ }
+
+ public synchronized static boolean initMisc(){
+
+ //Fluids
+ SLUDGE = (blockDarkWorldSludgeFluid) new blockDarkWorldSludgeFluid(
+ "sludge",
+ Utils.rgbtoHexValue(30, 130, 30))
+ .setDensity(1800)
+ .setGaseous(false)
+ .setLuminosity(2)
+ .setViscosity(25000)
+ .setTemperature(300);
+ FluidRegistry.registerFluid(SLUDGE);
+
+ return true;
+ }
+
+ public synchronized static boolean initItems(){
+ portalItem = (itemDarkWorldPortalTrigger) (new itemDarkWorldPortalTrigger().setUnlocalizedName("dimensionDarkWorld_trigger"));
+ GameRegistry.registerItem(portalItem, "dimensionDarkWorld_trigger");
+
+ return true;
+ }
+
+ public synchronized static boolean initBlocks(){
+
+ //Create Block Instances
+ blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, blockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("blockDarkWorldSludgeFluid");
+ portalBlock = new blockDarkWorldPortal();
+ blockTopLayer = new blockDarkWorldGround();
+ blockSecondLayer = new blockDarkWorldPollutedDirt();
+ blockPortalFrame = new blockDarkWorldPortalFrame();
+
+ //Registry
+ GameRegistry.registerBlock(blockTopLayer, "blockDarkWorldGround");
+ GameRegistry.registerBlock(blockSecondLayer, "blockDarkWorldGround2");
+ GameRegistry.registerBlock(blockPortalFrame, "blockDarkWorldPortalFrame");
+
+ //Make Flammable
+ Blocks.fire.setFireInfo(blockTopLayer, 30, 20);
+
+ return true;
+ }
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldPollutedDirt.java b/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldPollutedDirt.java
index 2168677d56..5f3f7e0bfd 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldPollutedDirt.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldPollutedDirt.java
@@ -5,7 +5,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.core.creative.AddToCreativeTab;
import net.minecraft.block.BlockDirt;
-import net.minecraft.block.BlockGrass;
import net.minecraft.world.ColorizerGrass;
import net.minecraft.world.IBlockAccess;
@@ -19,6 +18,7 @@ public class blockDarkWorldPollutedDirt extends BlockDirt {
LanguageRegistry.addName(this, "Polluted Soil");
}
+ @Override
@SideOnly(Side.CLIENT)
public int getBlockColor()
{
@@ -30,6 +30,7 @@ public class blockDarkWorldPollutedDirt extends BlockDirt {
/**
* Returns the color this block should be rendered. Used by leaves.
*/
+ @Override
@SideOnly(Side.CLIENT)
public int getRenderColor(int p_149741_1_)
{
@@ -40,6 +41,7 @@ public class blockDarkWorldPollutedDirt extends BlockDirt {
* Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
* when first determining what to render.
*/
+ @Override
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)
{
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldSludgeFluid.java b/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldSludgeFluid.java
new file mode 100644
index 0000000000..c3c9beddc8
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/block/blockDarkWorldSludgeFluid.java
@@ -0,0 +1,98 @@
+package gtPlusPlus.core.world.darkworld.block;
+
+import net.minecraft.block.material.*;
+import net.minecraftforge.fluids.Fluid;
+
+public class blockDarkWorldSludgeFluid extends Fluid {
+
+
+ public static final Material SLUDGE = new MaterialLiquid(MapColor.dirtColor);
+
+ protected static int mapColor = 0xFFFFFFFF;
+ protected static float overlayAlpha = 0.2F;
+ //protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY;
+ //protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL;
+ protected static Material material = SLUDGE;
+
+
+ public blockDarkWorldSludgeFluid(String fluidName, int rgbColour) {
+ this(fluidName, rgbColour, null);
+ }
+
+ public blockDarkWorldSludgeFluid(String fluidName, int rgbColour, Float overlayAlpha) {
+ super(fluidName);
+ setColor(rgbColour);
+ if (overlayAlpha != null){
+ setAlpha(overlayAlpha.floatValue());
+ }
+ else {
+ setAlpha(0);
+ }
+ }
+
+ @Override
+ public int getColor()
+ {
+ return mapColor;
+ }
+
+ public blockDarkWorldSludgeFluid setColor(int parColor)
+ {
+ mapColor = parColor;
+ return this;
+ }
+
+ public float getAlpha()
+ {
+ return overlayAlpha;
+ }
+
+ public blockDarkWorldSludgeFluid setAlpha(float parOverlayAlpha)
+ {
+ overlayAlpha = parOverlayAlpha;
+ return this;
+ }
+
+ /*public blockDarkWorldSludgeFluid setEmptySound(SoundEvent parSound)
+ {
+ emptySound = parSound;
+ return this;
+ }
+
+ public SoundEvent getEmptySound()
+ {
+ return emptySound;
+ }
+
+ @Override
+ public blockDarkWorldSludgeFluid setFillSound(SoundEvent parSound)
+ {
+ fillSound = parSound;
+ return this;
+ }
+
+ @Override
+ public SoundEvent getFillSound()
+ {
+ return fillSound;
+ }*/
+
+ public blockDarkWorldSludgeFluid setMaterial(Material parMaterial)
+ {
+ material = parMaterial;
+ return this;
+ }
+
+ public Material getMaterial()
+ {
+ return material;
+ }
+
+ /*@Override
+ public boolean doesVaporize(FluidStack fluidStack)
+ {
+ if (block == null)
+ return false;
+ return block.getDefaultState().getMaterial() == getMaterial();
+ }*/
+}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java b/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java
index 2e5ce4510e..82b21d7c0d 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java
@@ -3,7 +3,7 @@ package gtPlusPlus.core.world.darkworld.chunk;
import java.util.List;
import java.util.Random;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
@@ -171,7 +171,12 @@ public class ChunkProviderModded implements IChunkProvider {
p_147424_3_[j3 += short1] = Dimension_DarkWorld.blockMainFiller;
}
else if (k2 * 8 + l2 < b0) {
- p_147424_3_[j3 += short1] = Blocks.water; //River Fluid
+ try {
+ p_147424_3_[j3 += short1] = Dimension_DarkWorld.blockFluidLakes; //River Fluid .
+ }
+ catch (Throwable t){
+ p_147424_3_[j3 += short1] = Blocks.water; //River Fluid Fallback
+ }
}
else {
p_147424_3_[j3 += short1] = null;
@@ -391,7 +396,7 @@ public class ChunkProviderModded implements IChunkProvider {
} catch (NullPointerException n){
n.getStackTrace();
(new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
- Utils.LOG_INFO("Error while generating DarkWorld Lake.");
+ Logger.INFO("Error while generating DarkWorld Lake.");
}
}
@@ -406,7 +411,7 @@ public class ChunkProviderModded implements IChunkProvider {
try{
(new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
} catch (NullPointerException n){
- Utils.LOG_INFO("Error while generating DarkWorld Lake. [2]");
+ Logger.INFO("Error while generating DarkWorld Lake. [2]");
}
}
}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java
index 292eff3289..22c3b5a090 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java
@@ -1,13 +1,15 @@
package gtPlusPlus.core.world.darkworld.gen;
import java.util.Random;
+
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenWaterlily;
public class WorldGenDeadLilly extends WorldGenWaterlily {
- public boolean generate(World world, Random rand, int x, int y, int z)
+ @Override
+ public boolean generate(World world, Random rand, int x, int y, int z)
{
for (int l = 0; l < 10; ++l)
{
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java
index 4dc033214f..58937c8a40 100644
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java
@@ -1,6 +1,10 @@
package gtPlusPlus.core.world.darkworld.gen;
+import static gtPlusPlus.core.lib.CORE.PI;
+
import java.util.Random;
+
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
@@ -9,83 +13,77 @@ import net.minecraft.world.gen.feature.WorldGenMinable;
public class WorldGenMinable_Custom extends WorldGenMinable
{
- /** The block to generate. */
- private Block oreToGenerate;
- /** The number of blocks to generate. */
- private int numberOfBlocks;
- /** The block to replace. */
- private Block blockToReplace;
- /** The meta of the block. */
- private int mineableBlockMeta;
-
- public WorldGenMinable_Custom(Block block, int count){
- super(block, count, Blocks.stone);
- }
-
- public WorldGenMinable_Custom(Block block, int count, Block target){
- super(block, count, target);
- this.oreToGenerate = block;
- this.numberOfBlocks = count;
- this.blockToReplace = target;
- }
-
- public WorldGenMinable_Custom(Block block, int meta, int number, Block target){
- this(block, number, target);
- this.mineableBlockMeta = meta;
- }
+ /** The block to generate. */
+ private Block oreToGenerate;
+ /** The number of blocks to generate. */
+ private int numberOfBlocks;
+ /** The block to replace. */
+ private Block blockToReplace;
+ /** The meta of the block. */
+ private int mineableBlockMeta;
- public boolean generate(World world, Random rand, int x, int y, int z)
- {
- float f = rand.nextFloat() * (float)Math.PI;
- double d0 = (double)((float)(x + 16) + MathHelper.sin(f) * (float)this.numberOfBlocks / 4.0F);
- double d1 = (double)((float)(x + 16) - MathHelper.sin(f) * (float)this.numberOfBlocks / 4.0F);
- double d2 = (double)((float)(z + 16) + MathHelper.cos(f) * (float)this.numberOfBlocks / 4.0F);
- double d3 = (double)((float)(z + 16) - MathHelper.cos(f) * (float)this.numberOfBlocks / 4.0F);
- double d4 = (double)(y + rand.nextInt(5) - 2);
- double d5 = (double)(y + rand.nextInt(5) - 2);
+ public WorldGenMinable_Custom(final Block block, final int count){
+ super(block, count, Blocks.stone);
+ }
- for (int l = 0; l <= this.numberOfBlocks; ++l)
- {
- double d6 = d0 + (d1 - d0) * (double)l / (double)this.numberOfBlocks;
- double d7 = d4 + (d5 - d4) * (double)l / (double)this.numberOfBlocks;
- double d8 = d2 + (d3 - d2) * (double)l / (double)this.numberOfBlocks;
- double d9 = rand.nextDouble() * (double)this.numberOfBlocks / 8.0D;
- double d10 = (double)(MathHelper.sin((float)l * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * d9 + 1.0D;
- double d11 = (double)(MathHelper.sin((float)l * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * d9 + 1.0D;
- int i1 = MathHelper.floor_double(d6 - d10 / 2.0D);
- int j1 = MathHelper.floor_double(d7 - d11 / 2.0D);
- int k1 = MathHelper.floor_double(d8 - d10 / 2.0D);
- int l1 = MathHelper.floor_double(d6 + d10 / 2.0D);
- int i2 = MathHelper.floor_double(d7 + d11 / 2.0D);
- int j2 = MathHelper.floor_double(d8 + d10 / 2.0D);
+ public WorldGenMinable_Custom(final Block block, final int count, final Block target){
+ super(block, count, target);
+ this.oreToGenerate = block;
+ this.numberOfBlocks = count;
+ this.blockToReplace = target;
+ }
- for (int k2 = i1; k2 <= l1; ++k2)
- {
- double d12 = ((double)k2 + 0.5D - d6) / (d10 / 2.0D);
+ public WorldGenMinable_Custom(final Block block, final int meta, final int number, final Block target){
+ this(block, number, target);
+ this.mineableBlockMeta = meta;
+ }
- if (d12 * d12 < 1.0D)
- {
- for (int l2 = j1; l2 <= i2; ++l2)
- {
- double d13 = ((double)l2 + 0.5D - d7) / (d11 / 2.0D);
+ @Override
+ public boolean generate(final World world, final Random rand, final int x, final int y, final int z)
+ {
+ final float f = rand.nextFloat() * PI;
+ final double d0 = x + 16 + ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F);
+ final double d1 = (x + 16) - ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F);
+ final double d2 = z + 16 + ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F);
+ final double d3 = (z + 16) - ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F);
+ final double d4 = (y + rand.nextInt(8)) - 1;
+ final double d5 = (y + rand.nextInt(8)) - 1;
- if (d12 * d12 + d13 * d13 < 1.0D)
- {
- for (int i3 = k1; i3 <= j2; ++i3)
- {
- double d14 = ((double)i3 + 0.5D - d8) / (d10 / 2.0D);
+ for (int l = 0; l <= this.numberOfBlocks; ++l)
+ {
+ final double d6 = d0 + (((d1 - d0) * l) / this.numberOfBlocks);
+ final double d7 = d4 + (((d5 - d4) * l) / this.numberOfBlocks);
+ final double d8 = d2 + (((d3 - d2) * l) / this.numberOfBlocks);
+ final double d9 = (rand.nextDouble() * this.numberOfBlocks) / 8.0D;
+ final double d10 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D;
+ final double d11 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D;
+ final int i1 = MathHelper.floor_double(d6 - (d10 / 2.0D));
+ final int j1 = MathHelper.floor_double(d7 - (d11 / 2.0D));
+ final int k1 = MathHelper.floor_double(d8 - (d10 / 2.0D));
+ final int l1 = MathHelper.floor_double(d6 + (d10 / 2.0D));
+ final int i2 = MathHelper.floor_double(d7 + (d11 / 2.0D));
+ final int j2 = MathHelper.floor_double(d8 + (d10 / 2.0D));
- if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && world.getBlock(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, blockToReplace))
- {
- world.setBlock(k2, l2, i3, this.oreToGenerate, mineableBlockMeta, 2);
- }
- }
- }
- }
- }
- }
- }
+ for (int k2 = i1; k2 <= l1; ++k2){
+ final double d12 = ((k2 + 0.5D) - d6) / (d10 / 2.0D);
+ if ((d12 * d12) < 1.0D){
+ for (int l2 = j1; l2 <= i2; ++l2){
+ final double d13 = ((l2 + 0.5D) - d7) / (d11 / 2.0D);
+ if (((d12 * d12) + (d13 * d13)) < 1.0D){
+ for (int i3 = k1; i3 <= j2; ++i3){
+ final double d14 = ((i3 + 0.5D) - d8) / (d10 / 2.0D);
+ if ((((d12 * d12) + (d13 * d13) + (d14 * d14)) < 1.0D) && world.getBlock(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, this.blockToReplace))
+ {
+ world.setBlock(k2, l2, i3, this.oreToGenerate, this.mineableBlockMeta, 3);
+ Logger.INFO("Generated a "+this.oreToGenerate.getLocalizedName()+" at x: "+k2+" | y: "+l2+" | z: "+i3);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
- return true;
- }
+ return true;
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
new file mode 100644
index 0000000000..f04609dc6f
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
@@ -0,0 +1,412 @@
+package gtPlusPlus.core.world.darkworld.gen.gt;
+
+import java.util.*;
+
+import cpw.mods.fml.common.IWorldGenerator;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Log;
+import gregtech.api.world.GT_Worldgen;
+import gtPlusPlus.api.objects.CSPRNG;
+import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
+import gtPlusPlus.xmod.gregtech.api.objects.XSTR;
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraft.world.gen.ChunkProviderEnd;
+import net.minecraft.world.gen.ChunkProviderHell;
+import net.minecraft.world.gen.feature.WorldGenMinable;
+
+public class WorldGen_GT_Base implements IWorldGenerator{
+
+ /**
+ * Class Variables
+ */
+
+ /**
+ * Control percentage of filled 3x3 chunks. Lower number means less oreveins spawn
+ */
+ public static int oreveinPercentage;
+ /**
+ * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap
+ */
+ public static int oreveinAttempts;
+ /**
+ * Control number of attempts to place a valid orevein. If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried.
+ */
+ public static int oreveinMaxPlacementAttempts;
+ /**
+ * Debug parameter for world generation. Tracks chunks added/removed from run queue.
+ */
+ public static boolean debugWorldGen = false;
+ /**
+ * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from his GT5u fork.
+ */
+
+ public static List<Runnable> mList = new ArrayList<Runnable>();
+ public static HashSet<Long> ProcChunks = new HashSet<Long>();
+ // This is probably not going to work. Trying to create a fake orevein to put into hashtable when there will be no ores in a vein.
+ public static WorldGen_GT_Ore_Layer noOresInVein = new WorldGen_GT_Ore_Layer( "NoOresInVein", false, 0, 255, 0, 255, 16, false, false, false, false, false, false, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium);
+ public static Hashtable<Long, WorldGen_GT_Ore_Layer> validOreveins = new Hashtable<Long, WorldGen_GT_Ore_Layer>(1024);
+ public boolean mIsGenerating = false;
+ public static final Object listLock = new Object();
+ //private static boolean gcAsteroids = true;
+
+
+ public WorldGen_GT_Base(){
+ GameRegistry.registerWorldGenerator(this, 7735);
+ if (debugWorldGen) {
+ GT_Log.out.println("GTPP_Worldgenerator created");
+ }
+ }
+
+
+ @Override
+ public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
+ if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) {
+ generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
+ }
+ }
+
+ public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){
+ int xDim = Dimension_DarkWorld.DIMID;
+ switch(world.provider.dimensionId){
+ case -1: //Nether
+ generateNether(world, random, chunkX * 16, chunkZ * 16);
+ break;
+ case 0: //Overworld
+ generateSurface(world, random, chunkX * 16, chunkZ * 16);
+ break;
+ case 1: //End
+ generateEnd(world, random, chunkX * 16, chunkZ * 16);
+ break;
+ default: //Any other dimension
+ if (world.provider.dimensionId != xDim){
+ break;
+ }
+ else {
+ generateDarkWorld(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
+ break;
+ }
+ }
+ }
+
+ private void generateEnd(World world, Random random, int x, int z)
+ {
+ //...
+ }
+
+ private void generateSurface(World world, Random random, int x, int z)
+ {
+ //...
+ }
+
+ private void generateNether(World world, Random random, int x, int z)
+ {
+ //...
+ }
+
+ private void generateDarkWorld(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider){
+ synchronized (listLock)
+ {
+ WorldGen_GT_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) +1), aX, aZ, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName));
+ if (debugWorldGen) GT_Log.out.println(
+ "ADD WorldSeed:"+aWorld.getSeed() +
+ " DimId" + aWorld.provider.dimensionId +
+ " chunk x:" + aX +
+ " z:" + aZ +
+ " SIZE: " + WorldGen_GT_Base.mList.size()
+ );
+ }
+
+ if (!this.mIsGenerating) {
+ this.mIsGenerating = true;
+ int mList_sS=WorldGen_GT_Base.mList.size();
+ mList_sS = Math.min(mList_sS, 5); // Run a maximum of 5 chunks at a time through worldgen. Extra chunks get done later.
+ for (int i = 0; i < mList_sS; i++) {
+ WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Base.mList.get(0);
+ if (debugWorldGen) GT_Log.out.println(
+ "RUN WorldSeed:"+aWorld.getSeed()+
+ " DimId" + aWorld.provider.dimensionId +
+ " chunk x:" + toRun.mX +
+ " z:" + toRun.mZ +
+ " SIZE: " + WorldGen_GT_Base.mList.size() +
+ " i: " + i
+ );
+ synchronized (listLock)
+ {
+ WorldGen_GT_Base.mList.remove(0);
+ }
+ toRun.run();
+ }
+ this.mIsGenerating = false;
+ }
+ }
+
+ public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn)
+ {
+
+
+ int heightRange = maxY - minY;
+ WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn);
+ for (int k1 = 0; k1 < chancesToSpawn; ++k1)
+ {
+ int xrand = random.nextInt(16);
+ int yrand = random.nextInt(heightRange) + minY;
+ int zrand = random.nextInt(16);
+ worldgenminable.generate(world, random, chunk_x+xrand, yrand, chunk_z+zrand);
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public static class WorldGenContainer
+ implements Runnable {
+ public final Random mRandom;
+ public final int mX;
+ public final int mZ;
+ public final int mDimensionType;
+ public final World mWorld;
+ public final IChunkProvider mChunkGenerator;
+ public final IChunkProvider mChunkProvider;
+ public final String mBiome;
+ // Local class to track which orevein seeds must be checked when doing chunkified worldgen
+ class NearbySeeds {
+ public int mX;
+ public int mZ;
+ NearbySeeds( int x, int z) {
+ this.mX = x;
+ this.mZ = z;
+ }
+ };
+ public static ArrayList<NearbySeeds> seedList = new ArrayList<NearbySeeds>();
+
+ // aX and aZ are now the by-chunk X and Z for the chunk of interest
+ public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) {
+ this.mRandom = aRandom;
+ this.mX = aX;
+ this.mZ = aZ;
+ this.mDimensionType = aDimensionType;
+ this.mWorld = aWorld;
+ this.mChunkGenerator = aChunkGenerator;
+ this.mChunkProvider = aChunkProvider;
+ this.mBiome = aBiome;
+ }
+
+ public void worldGenFindVein( int oreseedX, int oreseedZ) {
+ // Explanation of oreveinseed implementation.
+ // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen passes, one with getSeed set to +1 the original world seed. This pushes that +1 off the low bits of oreseedZ, so that the hashes are far apart for the two passes.
+ // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the dimension in the top bits of the hash, to make sure to get unique hashes per dimension
+ // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in the bits 29-55. Cuts off the top few bits of the chunk so we have bits for dimension.
+ // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the bits 0-27. Cuts off the top few bits of the chunk so we have bits for dimension.
+ long oreveinSeed = (this.mWorld.getSeed()<<16) ^ ((this.mWorld.provider.dimensionId & 0xffL)<<56 |( (oreseedX & 0x000000000fffffffL) << 28) | ( oreseedZ & 0x000000000fffffffL )); // Use an RNG that is identical every time it is called for this oreseed.
+ CSPRNG oreveinRNG = CSPRNG.generate(new XSTR(oreveinSeed));
+ int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the dice, see if we get an orevein here at all
+ int noOrePlacedCount=0;
+ String tDimensionName = "";
+ if (debugWorldGen) { tDimensionName = this.mWorld.provider.getDimensionName(); }
+
+ if (debugWorldGen) GT_Log.out.println(
+ " Finding oreveins for oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ +
+ " worldSeed="+this.mWorld.getSeed()
+ );
+
+ // Search for a valid orevein for this dimension
+ if(validOreveins.size() > 0 && !validOreveins.containsKey(oreveinSeed) ) {
+ if ( (oreveinPercentageRoll<oreveinPercentage) && (WorldGen_GT_Ore_Layer.sWeight > 0) && (WorldGen_GT_Ore_Layer.sList.size() > 0)) {
+ int placementAttempts = 0;
+ boolean oreveinFound = false;
+ int i;
+ for( i = 0; (i < oreveinAttempts) && (!oreveinFound) && (placementAttempts<oreveinMaxPlacementAttempts); i++ ) {
+ int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Ore_Layer.sWeight);
+ for (WorldGen_GT_Ore_Layer tWorldGen : WorldGen_GT_Ore_Layer.sList) {
+ tRandomWeight -= ( tWorldGen).mWeight;
+ if (tRandomWeight <= 0) {
+ try {
+ // Adjust the seed so that this layer has a series of unique random numbers. Otherwise multiple attempts at this same oreseed will get the same offset and X/Z values. If an orevein failed, any orevein with the
+ // same minimum heights would fail as well. This prevents that, giving each orevein a unique height each pass through here.
+ int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, new XSTR( oreveinSeed ^ (tWorldGen.mPrimaryMeta)), this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider);
+ switch(placementResult) {
+ case WorldGen_GT_Ore_Layer.ORE_PLACED:
+ if (debugWorldGen) GT_Log.out.println(
+ " Added oreveinSeed=" + oreveinSeed +
+ " tries at oremix=" + i +
+ " placementAttempts=" + placementAttempts +
+ " dimensionName=" + tDimensionName
+ );
+ validOreveins.put(oreveinSeed, tWorldGen);
+ oreveinFound = true;
+ break;
+ case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER:
+ placementAttempts++;
+ // SHould do retry in this case until out of chances
+ break;
+ case WorldGen_GT_Ore_Layer.NO_OVERLAP:
+ // Orevein didn't reach this chunk, can't add it yet to the hash
+ break;
+ }
+ break; // Try the next orevein
+ } catch (Throwable e) {
+ if (debugWorldGen) GT_Log.out.println(
+ "Exception occurred on oreVein" + tWorldGen +
+ " oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ
+ );
+ e.printStackTrace(GT_Log.err);
+ }
+ }
+ }
+ }
+ // Only add an empty orevein if are unable to place a vein at the oreseed chunk.
+ if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)){
+ if (debugWorldGen) GT_Log.out.println(
+ " Empty oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ +
+ " tries at oremix=" + i +
+ " placementAttempts=" + placementAttempts +
+ " dimensionName=" + tDimensionName
+ );
+ validOreveins.put(oreveinSeed, noOresInVein );
+ }
+ } else if(oreveinPercentageRoll >= oreveinPercentage) {
+ if (debugWorldGen) GT_Log.out.println(
+ " Skipped oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX=" + oreseedX +
+ " oreseedZ="+ oreseedZ +
+ " RNG=" + oreveinPercentageRoll +
+ " %=" + oreveinPercentage+
+ " dimensionName=" + tDimensionName
+ );
+ validOreveins.put(oreveinSeed, noOresInVein);
+ }
+ }else {
+ // oreseed is located in the previously processed table
+ if (debugWorldGen) GT_Log.out.print(
+ " Valid oreveinSeed="+ oreveinSeed +
+ " validOreveins.size()=" + validOreveins.size() + " "
+ );
+ WorldGen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed);
+ oreveinRNG.setSeed(oreveinSeed ^ (tWorldGen.mPrimaryMeta)); // Reset RNG to only be based on oreseed X/Z and type of vein
+ int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider);
+ switch( placementResult )
+ {
+ case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER:
+ if (debugWorldGen) GT_Log.out.println(
+ " No ore in bottom layer"
+ );
+ break;
+ case WorldGen_GT_Ore_Layer.NO_OVERLAP:
+ if (debugWorldGen) GT_Log.out.println(
+ " No overlap"
+ );
+ }
+ }
+ }
+
+ @Override
+ public void run() {
+ long startTime = System.nanoTime();
+ int oreveinMaxSize;
+
+ // Determine bounding box on how far out to check for oreveins affecting this chunk
+ // For now, manually reducing oreveinMaxSize when not in the Underdark for performance
+ if(this.mWorld.provider.getDimensionName().equals("Underdark") ) {
+ oreveinMaxSize=32; // Leave Deep Dark/Underdark max oregen at 32, instead of 64
+ } else {
+ oreveinMaxSize=32;
+ }
+
+ int wXbox = this.mX - (oreveinMaxSize/16);
+ int eXbox = this.mX + (oreveinMaxSize/16 + 1); // Need to add 1 since it is compared using a <
+ int nZbox = this.mZ - (oreveinMaxSize/16);
+ int sZbox = this.mZ + (oreveinMaxSize/16 + 1);
+
+ // Search for orevein seeds and add to the list;
+ for( int x = wXbox; x < eXbox; x++ ) {
+ for( int z = nZbox; z < sZbox; z++ ) {
+ // Determine if this X/Z is an orevein seed
+ if ( ( (Math.abs(x)%3) == 1) && ( (Math.abs(z)%3) == 1 ) ) {
+ if (debugWorldGen) GT_Log.out.println(
+ "Adding seed x="+x+
+ " z="+z
+ );
+ seedList.add( new NearbySeeds(x,z) );
+ }
+ }
+ }
+
+ // Now process each oreseed vs this requested chunk
+ for( ; seedList.size() != 0; seedList.remove(0) ) {
+ if (debugWorldGen) GT_Log.out.println(
+ "Processing seed x="+seedList.get(0).mX+
+ " z="+seedList.get(0).mZ
+ );
+ worldGenFindVein( seedList.get(0).mX, seedList.get(0).mZ );
+ }
+
+ long oregenTime = System.nanoTime();
+
+ // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores)
+ try {
+ for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
+ /*
+ if (debugWorldGen) GT_Log.out.println(
+ "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName
+ );
+ */
+ tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, this.mChunkGenerator, this.mChunkProvider);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
+
+ long leftOverTime = System.nanoTime();
+
+
+
+ Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ);
+ if (tChunk != null) {
+ tChunk.isModified = true;
+ }
+ long endTime = System.nanoTime();
+ long duration = (endTime - startTime);
+ if (debugWorldGen) {
+ GT_Log.out.println(
+ " Oregen took " + (oregenTime-startTime)+
+ " Leftover gen took " + (leftOverTime - oregenTime ) +
+ " Worldgen took " + duration +
+ " nanoseconds"
+ );
+ }
+ }
+ }
+
+
+}
+
+
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java
new file mode 100644
index 0000000000..3f2673a770
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java
@@ -0,0 +1,272 @@
+package gtPlusPlus.core.world.darkworld.gen.gt;
+
+import static gtPlusPlus.core.world.darkworld.gen.gt.WorldGen_GT_Base.debugWorldGen;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Log;
+import gregtech.api.world.GT_Worldgen;
+import gregtech.common.blocks.GT_TileEntity_Ores;
+import gregtech.loaders.misc.GT_Achievements;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.IChunkProvider;
+
+public class WorldGen_GT_Ore_Layer
+ extends GT_Worldgen {
+ public static ArrayList<WorldGen_GT_Ore_Layer> sList = new ArrayList<WorldGen_GT_Ore_Layer>();
+ public static int sWeight = 0;
+ public final short mMinY;
+ public final short mMaxY;
+ public final short mWeight;
+ public final short mDensity;
+ public final short mSize;
+ public final short mPrimaryMeta;
+ public final short mSecondaryMeta;
+ public final short mBetweenMeta;
+ public final short mSporadicMeta;
+ //public final String mBiome;
+ public final String mRestrictBiome;
+ public final boolean mOverworld;
+ public final boolean mNether;
+ public final boolean mEnd;
+ public static final int WRONG_BIOME=0;
+ public static final int WRONG_DIMENSION=1;
+ public static final int NO_ORE_IN_BOTTOM_LAYER=2;
+ public static final int NO_OVERLAP=3;
+ public static final int ORE_PLACED=4;
+
+
+ //public final boolean mMoon;
+ //public final boolean mMars;
+ //public final boolean mAsteroid;
+ public final String aTextWorldgen = "worldgen.";
+
+ public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
+ super(aName, sList, aDefault);
+ this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
+ this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
+ this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", 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 + 7)) {
+ GT_Log.out.println(
+ "Oremix " + this.mWorldGenName +
+ " has invalid Min/Max heights!"
+ );
+ mMaxY = (short) (this.mMinY + 7);
+ }
+ this.mMaxY = mMaxY;
+ this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
+ this.mDensity = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
+ this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
+ this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID));
+ this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
+ this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
+ this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
+ this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
+
+ //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist");
+ //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist");
+ //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist");
+ //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist");
+
+ if (this.mEnabled) {
+ GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ sWeight += this.mWeight;
+ }
+ }
+
+ public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
+ if( mWorldGenName.equals("NoOresInVein") ) {
+ if (debugWorldGen) GT_Log.out.println(
+ " NoOresInVein"
+ );
+ // This is 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 (debugWorldGen) {
+ GT_Log.out.println(
+ "Wrong dimension"
+ );
+ }
+ */
+ return WRONG_DIMENSION;
+ }
+ if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) {
+ return WRONG_BIOME;
+ }
+ int[] placeCount=new int[4];
+
+ int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5);
+ // Determine West/East ends of orevein
+ int wXVein = aSeedX - aRandom.nextInt(mSize); // West side
+ int eXVein = aSeedX + 16 + aRandom.nextInt(mSize);
+ // Limit Orevein to only blocks present in current chunk
+ int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade.
+ int eX = Math.min( eXVein, aChunkX + 2 + 16);
+ if (wX >= eX) { //No overlap between orevein and this chunk exists in X
+ /*
+ if (debugWorldGen) {
+ GT_Log.out.println(
+ "No X overlap"
+ );
+ }
+ */
+ return NO_OVERLAP;
+ }
+ // Determine North/Sound ends of orevein
+ int nZVein = aSeedZ - aRandom.nextInt(mSize);
+ int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize);
+
+ int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade.
+ int sZ = Math.min(sZVein, aChunkZ + 2 + 16);
+ if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z
+ /*
+ if (debugWorldGen) {
+ GT_Log.out.println(
+ "No Z overlap"
+ );
+ }
+ */
+ return NO_OVERLAP;
+ }
+ // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt().
+ int localDensity = Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2))) );
+
+ // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop
+ // Now we do bottom-level-first oregen, and work our way upwards.
+ int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure.
+ for (int tX = wX; tX < eX; tX++) {
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
+ for (int tZ = nZ; tZ < sZ; tZ++) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) {
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
+ placeCount[1]++;
+ }
+ }
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
+ placeCount[3]++;
+ }
+ }
+ }
+ if ((placeCount[1]+placeCount[3])==0) {
+ if (debugWorldGen) GT_Log.out.println(
+ " No ore in bottom layer"
+ );
+ return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer
+ }
+ for (level = tMinY; level < (tMinY-1+3); level++) {
+ for (int tX = wX; tX < eX; tX++) {
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
+ for (int tZ = nZ; tZ < sZ; tZ++) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) {
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
+ placeCount[1]++;
+ }
+ }
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
+ placeCount[3]++;
+ }
+ }
+ }
+ }
+ // Low Middle layer is between + sporadic
+ // level should be = tMinY-1+3 from end of for loop
+ for (int tX = wX; tX < eX; tX++) {
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
+ for (int tZ = nZ; tZ < sZ; tZ++) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
+ if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
+ placeCount[2]++;
+ }
+ }
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
+ placeCount[3]++;
+ }
+ }
+ }
+ // High Middle layer is between + primary + sporadic
+ level++; // Increment level to next layer
+ for (int tX = wX; tX < eX; tX++) {
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
+ for (int tZ = nZ; tZ < sZ; tZ++) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
+ if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
+ placeCount[2]++;
+ }
+ }
+ else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) {
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
+ placeCount[0]++;
+ }
+ }
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
+ placeCount[3]++;
+ }
+ }
+ }
+ // Top two layers are primary + sporadic
+ level++; // Increment level to next layer
+ for( ; level < (tMinY + 6); level++){ // should do two layers
+ for (int tX = wX; tX < eX; tX++) {
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
+ for (int tZ = nZ; tZ < sZ; tZ++) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) {
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
+ placeCount[0]++;
+ }
+ }
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
+ placeCount[3]++;
+ }
+ }
+ }
+ }
+ if (debugWorldGen) {
+ String tDimensionName = aWorld.provider.getDimensionName();
+ GT_Log.out.println(
+ "Generated Orevein:" + this.mWorldGenName +
+ " Dimension=" + tDimensionName +
+ " mX="+aChunkX/16+
+ " mZ="+aChunkZ/16+
+ " oreseedX="+ aSeedX/16 +
+ " oreseedZ="+ aSeedZ/16 +
+ " cY="+tMinY+
+ " wXVein" + wXVein +
+ " eXVein" + eXVein +
+ " nZVein" + nZVein +
+ " sZVein" + sZVein +
+ " locDen=" + localDensity +
+ " Den=" + this.mDensity +
+ " Sec="+placeCount[1]+
+ " Spo="+placeCount[3]+
+ " Bet="+placeCount[2]+
+ " Pri="+placeCount[0]
+ );
+ }
+ // Something (at least the bottom layer must have 1 block) must have been placed, return true
+ return ORE_PLACED;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java
new file mode 100644
index 0000000000..76ccfdcc80
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java
@@ -0,0 +1,53 @@
+package gtPlusPlus.core.world.darkworld.gen.gt;
+
+import gtPlusPlus.core.util.array.Pair;
+import gtPlusPlus.core.world.darkworld.object.BoxedQuad;
+import net.minecraft.block.Block;
+
+public class WorldGen_Ores {
+
+ /**
+ * Set Ore Types on by one.
+ */
+
+ public static volatile Pair<Block, Integer> Geikielite; // MgTiO3
+ public static volatile Pair<Block, Integer> Zimbabweite; // (Na,K)2PbAs4(Nb,Ta,Ti)4O18
+ public static volatile Pair<Block, Integer> Titanite; // CaTiSiO5
+ public static volatile Pair<Block, Integer> Zirconolite; // CaZrTi2O7
+ public static volatile Pair<Block, Integer> Crocoite; // PbCrO4
+ public static volatile Pair<Block, Integer> Nichromite; // (Ni,Co,Fe)(Cr,Fe,Al)2O4
+ public static volatile Pair<Block, Integer> Yttriaite; // Y2O3
+ public static volatile Pair<Block, Integer> Samarskite_Y; // (YFe3+Fe2+U,Th,Ca)2(Nb,Ta)2O8
+ public static volatile Pair<Block, Integer> Samarskite_Yb; // (YbFe3+)2(Nb,Ta)2O8
+ public static volatile Pair<Block, Integer> Zircon; // ZrSiO4
+ public static volatile Pair<Block, Integer> Gadolinite_Ce; // (Ce2,La,Nd,Y)2FeBe2Si1O14
+ public static volatile Pair<Block, Integer> Gadolinite_Y; // (Ce,La,Nd,Y2)2FeBe2Si4O9
+ public static volatile Pair<Block, Integer> Lepersonnite; // Ca(Gd,Dy)2(UO2)24(SiO4)4(CO3)8(OH)24·48H2O
+ public static volatile Pair<Block, Integer> Xenotime; // YPO4
+ public static volatile Pair<Block, Integer> Yttrialite; // Y2Th2Si2O7
+ public static volatile Pair<Block, Integer> Yttrocerite; // CaF5YCe
+ public static volatile Pair<Block, Integer> Polycrase; // YCaCeUThTi2Nb2Ta2O6
+ public static volatile Pair<Block, Integer> Zircophyllite; // (K,Na)3(Mn,Fe)7(Zr,Ti,Nb)2Si8O24(OH,F)7
+ public static volatile Pair<Block, Integer> Zirkelite; // (Ca,Th,Ce)Zr(Ti,Nb)2O7
+ public static volatile Pair<Block, Integer> Lanthanite_La; // (La)2(CO3)3·8(H2O).
+ public static volatile Pair<Block, Integer> Lanthanite_Ce; // (Ce)2(CO3)3·8(H2O).
+ public static volatile Pair<Block, Integer> Lanthanite_Nd; // (Nd)2(CO3)3·8(H2O).
+ public static volatile Pair<Block, Integer> Hibonite; // ((Ca,Ce)(Al,Ti,Mg)12O19)
+ public static volatile Pair<Block, Integer> Cerite; // (Ce,La,Ca)9(Mg,Fe+3)(SiO4)6(SiO3OH)(OH)3
+ public static volatile Pair<Block, Integer> Agardite_Y; // (YCa)Cu5(As2O4)3(OH)6·3H2O
+ public static volatile Pair<Block, Integer> Agardite_Cd; // (CdCa)Cu7(AsO2)4(O2H)5·3H2O
+ public static volatile Pair<Block, Integer> Agardite_La; // (LaCa)Cu5(AsO6)2(OH)4·3H2O
+ public static volatile Pair<Block, Integer> Agardite_Nd; // (NdCa)Cu6(As3O3)2(O2H)6·3H2O
+ public static volatile Pair<Block, Integer> Fluorcaphite; // (Ca,Sr,Ce,Na)5(PO4)3F
+ public static volatile Pair<Block, Integer> Florencite; // SmAl3(PO4)2(OH)6
+ public static volatile Pair<Block, Integer> Cryolite; // Na3AlF6
+ //public static volatile Pair<Block, Integer> Pyroxene; //
+
+
+
+
+
+ public static volatile BoxedQuad<Integer, Integer, Integer, Integer> OreVein1 = new BoxedQuad(null, null, null, null);
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java b/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java
new file mode 100644
index 0000000000..d3c400896b
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java
@@ -0,0 +1,55 @@
+package gtPlusPlus.core.world.darkworld.object;
+
+import gtPlusPlus.core.util.array.Pair;
+import net.minecraft.block.Block;
+
+public class BoxedQuad<K,V,C,R> {
+
+ private final Pair<Block, Integer> key;
+ private final Pair<Block, Integer> value;
+ private final Pair<Block, Integer> value2;
+ private final Pair<Block, Integer> value3;
+ private final Pair<Block, Integer> [] mInternalPairArray;
+
+
+ public BoxedQuad(final Pair<Block, Integer> key, final Pair<Block, Integer> value, final Pair<Block, Integer> value2, final Pair<Block, Integer> value3){
+ this.key = key;
+ this.value = value;
+ this.value2 = value2;
+ this.value3 = value3;
+ mInternalPairArray = new Pair[]{key, value, value2, value3};
+ }
+
+ final public Pair<Block, Integer> getKey(){
+ return this.key;
+ }
+
+ final public Pair<Block, Integer> getValue_1(){
+ return this.value;
+ }
+
+ final public Pair<Block, Integer> getValue_2(){
+ return this.value2;
+ }
+
+ final public Pair<Block, Integer> getValue_3(){
+ return this.value3;
+ }
+
+ final synchronized Pair<Block, Integer> unbox(int pos){
+ return this.mInternalPairArray[pos];
+ }
+
+ final synchronized Block getBlock(int pos){
+ return this.mInternalPairArray[pos].getKey();
+ }
+
+ final synchronized int getMeta(int pos){
+ return this.mInternalPairArray[pos].getValue();
+ }
+
+
+
+
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_DefaultHandler.java b/src/Java/gtPlusPlus/nei/GT_NEI_DefaultHandler.java
index 017fe3012b..717fe3aaef 100644
--- a/src/Java/gtPlusPlus/nei/GT_NEI_DefaultHandler.java
+++ b/src/Java/gtPlusPlus/nei/GT_NEI_DefaultHandler.java
@@ -328,7 +328,7 @@ extends TemplateRecipeHandler {
if (!permutations.isEmpty()) {
ItemStack stack;
for (final Iterator<ItemStack> i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) {
- stack = (ItemStack) i$.next();
+ stack = i$.next();
}
} else {
final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize);
diff --git a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java b/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java
index 018e0bee82..b6f6dfccdc 100644
--- a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java
+++ b/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java
@@ -48,7 +48,7 @@ public class Preloader_GT_OreDict {
}
//Mekanism Support - Let's not make Mek Osmium useful in GT anymore.
- if ((((bannedItem != null) && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism"))) || (LoadedMods.Mekanism)) && !LoadedMods.RedTech){
+ if ((((bannedItem != null) && !LoadedMods.RedTech && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism"))) || (LoadedMods.Mekanism)) && !LoadedMods.RedTech){
//Circuits
if (Class.forName("mekanism.common.item.ItemControlCircuit") != null) {
final Class<?> MekCircuit = Class.forName("mekanism.common.item.ItemControlCircuit");
diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_ClassTransformer.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_ClassTransformer.java
index a475ec139f..f4c06107a7 100644
--- a/src/Java/gtPlusPlus/preloader/asm/Preloader_ClassTransformer.java
+++ b/src/Java/gtPlusPlus/preloader/asm/Preloader_ClassTransformer.java
@@ -8,6 +8,7 @@ import org.apache.logging.log4j.Level;
import org.objectweb.asm.*;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.preloader.CORE_Preloader;
import net.minecraft.launchwrapper.IClassTransformer;
@@ -22,10 +23,10 @@ public class Preloader_ClassTransformer implements IClassTransformer {
// Circuits
CORE_Preloader.enableOldGTcircuits = config.getBoolean("enableOldGTcircuits", "gregtech", false,
"Restores circuits and their recipes from Pre-5.09.28 times.");
- Utils.LOG_INFO("GT++ ASM - Loaded the configuration file.");
+ Logger.INFO("GT++ ASM - Loaded the configuration file.");
return CORE_Preloader.enableOldGTcircuits;
}
- Utils.LOG_INFO("GT++ ASM - Failed loading the configuration file.");
+ Logger.INFO("GT++ ASM - Failed loading the configuration file.");
return false;
}
diff --git a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java b/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java
index a54abab9cf..f5421e7fdd 100644
--- a/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java
+++ b/src/Java/gtPlusPlus/preloader/asm/Preloader_DummyContainer.java
@@ -11,7 +11,7 @@ import cpw.mods.fml.common.*;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.versioning.ArtifactVersion;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.preloader.CORE_Preloader;
import net.minecraftforge.common.config.Configuration;
@@ -53,19 +53,19 @@ public class Preloader_DummyContainer extends DummyModContainer {
@EventHandler
public void load(final FMLInitializationEvent e) {
- Utils.LOG_INFO("[GT++ ASM] Begin resource allocation for " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION);
+ Logger.INFO("[GT++ ASM] Begin resource allocation for " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION);
}
@Subscribe
public void preInit(FMLPreInitializationEvent event) {
- Utils.LOG_INFO("[GT++ ASM] Loading " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION);
+ Logger.INFO("[GT++ ASM] Loading " + CORE_Preloader.MODID + " V" + CORE_Preloader.VERSION);
// Handle GT++ Config
handleConfigFile(event);
}
@Subscribe
public void postInit(FMLPostInitializationEvent evt) {
- Utils.LOG_INFO("[GT++ ASM] Finished loading GT++ Pre-Loader.");
+ Logger.INFO("[GT++ ASM] Finished loading GT++ Pre-Loader.");
}
public static void handleConfigFile(final FMLPreInitializationEvent event) {
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
index 6ac0800b85..93a8d1febb 100644
--- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/base/LeavesBase.java
@@ -7,6 +7,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
@@ -58,7 +59,7 @@ public class LeavesBase extends BlockLeaves {
}
}
else {
- Utils.LOG_WARNING("Unable to drop anything, Leaf Type array and Loot array are different sizes.");
+ Logger.WARNING("Unable to drop anything, Leaf Type array and Loot array are different sizes.");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java b/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
index a4346622a1..727b36638e 100644
--- a/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/base/SaplingBase.java
@@ -7,6 +7,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
@@ -59,7 +60,7 @@ public class SaplingBase extends BlockSapling
try {
return this.saplingTextures[meta];
}catch(Throwable T){
- Utils.LOG_WARNING("Invalid Sapling meta is "+meta);
+ Logger.WARNING("Invalid Sapling meta is "+meta);
return this.saplingTextures[0];
}
}
@@ -72,11 +73,11 @@ public class SaplingBase extends BlockSapling
if (!world.isRemote){
super.updateTick(world, x, y, z, rand);
if (world.getBlockLightValue(x, y + 1, z) >= 9 && rand.nextInt(7) == 0){
- Utils.LOG_WARNING("Update Tick");
+ Logger.WARNING("Update Tick");
this.updateMeta(world, x, y, z, rand);
}
else {
- Utils.LOG_WARNING("Tried to Tick.");
+ Logger.WARNING("Tried to Tick.");
}
}
}
@@ -84,7 +85,7 @@ public class SaplingBase extends BlockSapling
//Dunno - Think it is doGrow || doGrowthTick
@Override
public void func_149853_b(World world, Random rand, int x, int y, int z){
- Utils.LOG_WARNING("Please find what calls me - func_149853_b");
+ Logger.WARNING("Please find what calls me - func_149853_b");
this.updateMeta(world, x, y, z, rand);
}
@@ -94,22 +95,22 @@ public class SaplingBase extends BlockSapling
@Override
public void func_149879_c(World world, int x, int y, int z, Random rand){
- Utils.LOG_WARNING("func_149879_c - 1");
+ Logger.WARNING("func_149879_c - 1");
int l = world.getBlockMetadata(x, y, z);
if ((l & 8) == 0){
- Utils.LOG_WARNING("func_149879_c - 2");
+ Logger.WARNING("func_149879_c - 2");
world.setBlockMetadataWithNotify(x, y, z, l | 8, 4);
}
else{
- Utils.LOG_WARNING("func_149879_c - 3");
+ Logger.WARNING("func_149879_c - 3");
this.func_149878_d(world, x, y, z, rand);
}
}
@Override
public void func_149878_d(World world, int x, int y, int z, Random rand){
- Utils.LOG_WARNING("func_149878_d - 1");
+ Logger.WARNING("func_149878_d - 1");
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return;
int l = world.getBlockMetadata(x, y, z) & 7;
Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
@@ -121,7 +122,7 @@ public class SaplingBase extends BlockSapling
{
case 0:
default:
- Utils.LOG_WARNING("Case 0 - Grow Tree");
+ Logger.WARNING("Case 0 - Grow Tree");
break;
}
diff --git a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
index 0cd76fa734..26accd283e 100644
--- a/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
+++ b/src/Java/gtPlusPlus/xmod/bop/blocks/rainforest/SaplingRainforestTree.java
@@ -2,7 +2,7 @@ package gtPlusPlus.xmod.bop.blocks.rainforest;
import java.util.Random;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
import gtPlusPlus.xmod.bop.blocks.base.SaplingBase;
import gtPlusPlus.xmod.bop.world.features.trees.WorldGenRainForestTree_Ex;
@@ -19,7 +19,7 @@ public class SaplingRainforestTree extends SaplingBase {
@Override
public void func_149878_d(World world, int x, int y, int z, Random rand){
- Utils.LOG_WARNING("func_149878_d - 1");
+ Logger.WARNING("func_149878_d - 1");
if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(world, rand, x, y, z)) return;
int l = world.getBlockMetadata(x, y, z) & 7;
rand.nextInt(10);
diff --git a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
index 15ce246515..2357fe4ea6 100644
--- a/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
+++ b/src/Java/gtPlusPlus/xmod/bop/world/features/trees/WorldGenRainForestTree_Ex.java
@@ -2,7 +2,7 @@ package gtPlusPlus.xmod.bop.world.features.trees;
import java.util.Random;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.init.Blocks;
@@ -74,23 +74,23 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
block2.onPlantGrow(world, x, y - 1, z, x, y, z);
byte b0 = 3;
byte b1 = 0;
- Utils.LOG_WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z);
+ Logger.WARNING("Sapling located at X:"+x+" | Y:"+y+" | Z:"+z);
for (int k1 = y - b0 + treeHeight; k1 <= y + treeHeight; k1++)
{
- Utils.LOG_WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | ");
+ Logger.WARNING("[1]| k1 = "+k1+" | y = "+y+" | b0 = "+b0+" | l = "+treeHeight+" | ");
int i3 = k1 - (y + treeHeight);
int l1 = b1 + 1 - i3;
for (int i2 = x - l1; i2 <= x + l1; i2++){
int j2 = i2 - x;
- Utils.LOG_WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | ");
+ Logger.WARNING("[2]| i2 = "+i2+" | x = "+x+" | l1 = "+l1+" | j2 = "+j2+" | ");
for (int k2 = z - l1; k2 <= z + l1; k2++){
int l2 = k2 - z;
- Utils.LOG_WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | ");
+ Logger.WARNING("[3]| k2 = "+k2+" | z = "+z+" | l1 = "+l1+" | l2 = "+l2+" | ");
if ((Math.abs(j2) != l1) || (Math.abs(l2) != l1) || ((random.nextInt(2) != 0) && (i3 != 0)))
{
Block block1 = world.getBlock(i2, k1, k2);
if ((block1.isAir(world, i2, k1, k2)) || (block1.isLeaves(world, i2, k1, k2))) {
- Utils.LOG_WARNING("Setting something as leaves?");
+ Logger.WARNING("Setting something as leaves?");
setBlockAndNotifyAdequately(world, i2, k1, k2, this.leaves, this.leavesMeta);
}
}
@@ -99,7 +99,7 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
}
for (int k1 = 0; k1 < treeHeight; k1++)
{
- Utils.LOG_WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight);
+ Logger.WARNING("Building tree - Layer "+k1+" | Max height is "+treeHeight);
Block block = world.getBlock(x, y + k1, z);
if ((block.isAir(world, x, y + k1, z)) || (block.isLeaves(world, x, y + k1, z))){
setBlockAndNotifyAdequately(world, x, y + k1, z, this.wood, this.woodMeta);
@@ -118,10 +118,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
for (int xDir = -5; xDir <= 5; xDir++){
for (int zDir = -5; zDir <= 5; zDir++){
if (canRemoveLeafBlockLayer2(-5, 5, xDir, -5, 5, zDir)){
- Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir);
+ Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+" z="+zDir);
}
else {
- Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir);
+ Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+" z="+zDir);
block5 = world.getBlock(x+xDir, y+k1, z+zDir);
if (block5.isAir(world, x+xDir, y+k1, x+zDir)){
setBlockAndNotifyAdequately(world, x+xDir, y + k1, z+zDir, this.leaves, this.leavesMeta);
@@ -133,10 +133,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
for (int xDir = -4; xDir <= 4; xDir++){
for (int zDir = -4; zDir <= 4; zDir++){
if (canRemoveLeafBlockLayer2(-4, 4, xDir, -4, 4, zDir)){
- Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir);
+ Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+1+" z="+zDir);
}
else {
- Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir);
+ Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y + k1 + 1+" z="+zDir);
block5 = world.getBlock(x+xDir, y+k1 + 1, z+zDir);
if (block5.isAir(world, x+xDir, y+k1 + 1, x+zDir)){
setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 1, z+zDir, this.leaves, this.leavesMeta);
@@ -149,10 +149,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
for (int xDir = -3; xDir <= 3; xDir++){
for (int zDir = -3; zDir <= 3; zDir++){
if (canRemoveLeafBlockLayer2(-3, 3, xDir, -3, 3, zDir)){
- Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir);
+ Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir);
}
else {
- Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir);
+ Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+2+" z="+zDir);
block5 = world.getBlock(x+xDir, y+k1+2, z+zDir);
if (block5.isAir(world, x+xDir, y+k1+2, x+zDir)){
setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 2, z+zDir, this.leaves, this.leavesMeta);
@@ -165,10 +165,10 @@ public class WorldGenRainForestTree_Ex extends WorldGenAbstractTree{
for (int xDir = -2; xDir <= 2; xDir++){
for (int zDir = -2; zDir <= 2; zDir++){
if (canRemoveLeafBlockLayer2(-2, 2, xDir, -2, 2, zDir)){
- Utils.LOG_WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir);
+ Logger.WARNING("Doing Nothing at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir);
}
else {
- Utils.LOG_WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir);
+ Logger.WARNING("Trying to place leaves at "+"x="+xDir+" | y="+y+k1+3+" z="+zDir);
block5 = world.getBlock(x+xDir, y+k1+3, z+zDir);
if (block5.isAir(world, x+xDir, y+k1+3, x+zDir)){
setBlockAndNotifyAdequately(world, x+xDir, y + k1 + 3, z+zDir, this.leaves, this.leavesMeta);
diff --git a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java b/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
index cdb04c9b45..a8c5382a21 100644
--- a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
+++ b/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
@@ -1,10 +1,6 @@
package gtPlusPlus.xmod.eio.material;
-import gtPlusPlus.core.material.ALLOY;
-import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.material.MaterialStack;
-import gtPlusPlus.core.material.NONMATERIAL;
+import gtPlusPlus.core.material.*;
import gtPlusPlus.core.material.state.MaterialState;
public class MaterialEIO {
@@ -18,6 +14,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().GOLD, 1),
@@ -33,6 +30,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().IRON, 1),
@@ -48,6 +46,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().IRON, 1),
@@ -63,6 +62,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ALLOY.STEEL, 3),
@@ -78,6 +78,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().GOLD, 1),
@@ -94,6 +95,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ENERGETIC_ALLOY, 1),
@@ -109,6 +111,7 @@ public class MaterialEIO {
10,
10,
false, //Uses Blast furnace?
+ false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
new MaterialStack(ELEMENT.getInstance().SILICON, 1),
diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
index 9bdf9a83dd..dbc0589fd2 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
@@ -6,8 +6,6 @@ import java.lang.reflect.Method;
import cpw.mods.fml.common.Optional;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.forestry.bees.custom.GTPP_Bees;
-import gtPlusPlus.xmod.forestry.bees.custom.GTPP_Branch_Definition;
import gtPlusPlus.xmod.forestry.bees.items.FR_ItemRegistry;
import gtPlusPlus.xmod.forestry.bees.recipe.FR_Gregtech_Recipes;
import net.minecraft.block.Block;
@@ -23,7 +21,7 @@ public class HANDLER_FR {
public static void Init(){
if (LoadedMods.Forestry){
- new GTPP_Bees();
+ //new GTPP_Bees(); TODO- Will Investigate this properly later.
}
}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
index f33d99af29..7e3738d9fb 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java
@@ -1,31 +1,27 @@
package gtPlusPlus.xmod.forestry.bees.custom;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Locale;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+import org.apache.commons.lang3.text.WordUtils;
+
import forestry.api.apiculture.*;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
-import forestry.apiculture.genetics.Bee;
-import forestry.apiculture.genetics.BeeDefinition;
-import forestry.apiculture.genetics.BeeVariation;
-import forestry.apiculture.genetics.IBeeDefinition;
+import forestry.apiculture.genetics.*;
import forestry.core.genetics.alleles.AlleleHelper;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.BiomeDictionary.Type;
-import org.apache.commons.lang3.reflect.FieldUtils;
-import org.apache.commons.lang3.text.WordUtils;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Locale;
-
public enum GTPP_Bee_Definition implements IBeeDefinition {
@@ -814,10 +810,10 @@ public enum GTPP_Bee_Definition implements IBeeDefinition {
protected final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance) {
IAllele[] template = getTemplate();
- Utils.LOG_INFO("[Bees-Debug] parent1: "+(parent1 != null));
- Utils.LOG_INFO("[Bees-Debug] parent2: "+(parent2 != null));
- Utils.LOG_INFO("[Bees-Debug] chance: "+(chance));
- Utils.LOG_INFO("[Bees-Debug] template: "+(template != null));
+ Logger.DEBUG_BEES("parent1: "+(parent1 != null));
+ Logger.DEBUG_BEES("parent2: "+(parent2 != null));
+ Logger.DEBUG_BEES("chance: "+(chance));
+ Logger.DEBUG_BEES("template: "+(template != null));
return BeeManager.beeMutationFactory.createMutation(parent1, parent2, template, chance);
}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
index 8873aa6a80..37e479efd2 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bees.java
@@ -1,30 +1,22 @@
package gtPlusPlus.xmod.forestry.bees.custom;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import java.lang.reflect.*;
import org.apache.commons.lang3.reflect.FieldUtils;
-import com.google.common.collect.ImmutableMap;
-
import cpw.mods.fml.common.Loader;
-import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
-import forestry.api.recipes.RecipeManagers;
import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.ingots.BaseItemIngot_OLD;
import gtPlusPlus.core.item.base.misc.BaseItemMisc;
import gtPlusPlus.core.item.base.misc.BaseItemMisc.MiscTypes;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
-import gtPlusPlus.core.util.materials.MaterialUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -57,38 +49,47 @@ public class GTPP_Bees {
if (Loader.isModLoaded("Forestry") /*&& tryGetBeesBoolean()*/) {
for (IAllele o : AlleleManager.alleleRegistry.getRegisteredAlleles().values()){
- //Utils.LOG_INFO("[Bees-Debug] ==================================================");
- //Utils.LOG_INFO("[Bees-Debug] Name: "+o.getName());
- //Utils.LOG_INFO("[Bees-Debug] Name: "+o.getUnlocalizedName());
- //Utils.LOG_INFO("[Bees-Debug] getUID: "+o.getUID());
- //Utils.LOG_INFO("[Bees-Debug] isDominant: "+o.isDominant());
+ //Utils.LOG_DEBUG_BEES(" ==================================================");
+ //Utils.LOG_DEBUG_BEES(" Name: "+o.getName());
+ //Utils.LOG_DEBUG_BEES(" Name: "+o.getUnlocalizedName());
+ //Utils.LOG_DEBUG_BEES(" getUID: "+o.getUID());
+ //Utils.LOG_DEBUG_BEES(" isDominant: "+o.isDominant());
}
//Set Materials and Comb stacks from GT via Reflection
setMaterials();
setCustomItems();
+ try {
combs = new ItemCustomComb();
combs.initCombsRecipes();
- GTPP_Bee_Definition.initBees();
+ GTPP_Bee_Definition.initBees();
+ }
+ catch (Throwable t){
+ Logger.BEES("Failed to load bees, probably due to an ancient forestry version");
+ t.printStackTrace();
+ }
}
}
private void setCustomItems() {
dropForceGem = new BaseItemMisc("Force", new short[]{250, 250, 20}, 64, MiscTypes.GEM, null);
- MaterialUtils.tryEnableMaterial(Materials.Force);
- MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force);
- MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force);
+ //mGregMatLoader.enableMaterial(Materials.Force);
+ //MaterialUtils.tryEnableMaterial(Materials.Force);
+ //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Force);
+ //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Force);
dropBiomassBlob = new BaseItemMisc("Biomass", new short[]{33, 225, 24}, 64, MiscTypes.DROP, null);
dropEthanolBlob = new BaseItemMisc("Ethanol", new short[]{255, 128, 0}, 64, MiscTypes.DROP, null);
//Nikolite may not exist, so lets make it.
dropNikoliteDust = ItemUtils.generateSpecialUseDusts("Nikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200))[2];
- MaterialUtils.tryEnableMaterial(Materials.Nikolite);
- MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite);
- MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite);
- MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite);
- MaterialUtils.tryEnableMaterial(Materials.BlueAlloy);
+ //mGregMatLoader.enableMaterial(Materials.BlueAlloy);
+ //mGregMatLoader.enableMaterial(Materials.Nikolite);
+ //MaterialUtils.tryEnableMaterial(Materials.Nikolite);
+ //MaterialUtils.tryEnableMaterialPart(OrePrefixes.dust, Materials.Nikolite);
+ //MaterialUtils.tryEnableMaterialPart(OrePrefixes.ingot, Materials.Nikolite);
+ //MaterialUtils.tryEnableMaterialPart(OrePrefixes.plate, Materials.Nikolite);
+ //MaterialUtils.tryEnableMaterial(Materials.BlueAlloy);
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotNikolite", 1) == null){
new BaseItemIngot_OLD("itemIngotNikolite", "Nikolite", Utils.rgbtoHexValue(60, 180, 200), 0);
}
@@ -139,22 +140,22 @@ public class GTPP_Bees {
Enum gtCombTypeStone = Enum.valueOf(gtCombEnumClass, "STONE");
Object oCombObject = gtCombs.get(null);
- Utils.LOG_INFO("[Bees-Debug] Field getModifiers: "+gtCombs.getModifiers());
- Utils.LOG_INFO("[Bees-Debug] Field toGenericString: "+gtCombs.toGenericString());
- Utils.LOG_INFO("[Bees-Debug] Field getClass: "+gtCombs.getClass());
- Utils.LOG_INFO("[Bees-Debug] Field isEnumConstant: "+gtCombs.isEnumConstant());
- Utils.LOG_INFO("[Bees-Debug] Field isSynthetic: "+gtCombs.isSynthetic());
- Utils.LOG_INFO("[Bees-Debug] Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null));
- Utils.LOG_INFO("[Bees-Debug] Field isAccessible: "+gtCombs.isAccessible());
+ Logger.DEBUG_BEES("Field getModifiers: "+gtCombs.getModifiers());
+ Logger.DEBUG_BEES("Field toGenericString: "+gtCombs.toGenericString());
+ Logger.DEBUG_BEES("Field getClass: "+gtCombs.getClass());
+ Logger.DEBUG_BEES("Field isEnumConstant: "+gtCombs.isEnumConstant());
+ Logger.DEBUG_BEES("Field isSynthetic: "+gtCombs.isSynthetic());
+ Logger.DEBUG_BEES("Field get(gtBees) != null: "+(gtCombs.get(gtBees) != null));
+ Logger.DEBUG_BEES("Field isAccessible: "+gtCombs.isAccessible());
- Utils.LOG_INFO("[Bees] gtBees: "+(gtBees != null));
- Utils.LOG_INFO("[Bees] gtCombItemClass: "+(gtCombItemClass != null));
- Utils.LOG_INFO("[Bees] gtCombEnumClass: "+(gtCombEnumClass != null));
- Utils.LOG_INFO("[Bees] gtCombs: "+(gtCombs != null));
- Utils.LOG_INFO("[Bees] gtCombTypeSlag: "+(gtCombTypeSlag != null));
- Utils.LOG_INFO("[Bees] gtCombTypeStone: "+(gtCombTypeStone != null));
- Utils.LOG_INFO("[Bees] oCombObject: "+(oCombObject != null));
+ Logger.BEES("gtBees: "+(gtBees != null));
+ Logger.BEES("gtCombItemClass: "+(gtCombItemClass != null));
+ Logger.BEES("gtCombEnumClass: "+(gtCombEnumClass != null));
+ Logger.BEES("gtCombs: "+(gtCombs != null));
+ Logger.BEES("gtCombTypeSlag: "+(gtCombTypeSlag != null));
+ Logger.BEES("gtCombTypeStone: "+(gtCombTypeStone != null));
+ Logger.BEES("oCombObject: "+(oCombObject != null));
//if (gtCombItemClass.isInstance(oCombObject)){
@@ -162,7 +163,7 @@ public class GTPP_Bees {
getStackForType = gtCombItemClass.getDeclaredMethod("getStackForType", gtCombEnumClass);
if (getStackForType != null) {
- Utils.LOG_INFO("[Bees] Found Method: getStackForType");
+ Logger.BEES("Found Method: getStackForType");
}
if (Comb_Slag == null){
Comb_Slag = (ItemStack) getStackForType.invoke(gtBees, gtCombTypeSlag);
@@ -172,12 +173,12 @@ public class GTPP_Bees {
}
/*}
else {
- Utils.LOG_INFO("[Bees] oCombObject was not an instance of gregtech.common.items.ItemComb");
+ Utils.LOG_BEES("oCombObject was not an instance of gregtech.common.items.ItemComb");
}*/
}
catch (NullPointerException | ClassNotFoundException | IllegalArgumentException | IllegalAccessException | NoSuchMethodException | SecurityException | InvocationTargetException e){
- Utils.LOG_INFO("[Bees] Bad Reflection. setMaterials()");
+ Logger.BEES("Bad Reflection. setMaterials()");
}
PTFE = trySetValue("Polytetrafluoroethylene");
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
index add7198bd8..f59f0c537f 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Branch_Definition.java
@@ -5,7 +5,7 @@ import java.lang.reflect.Method;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IClassification;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
public enum GTPP_Branch_Definition {
@@ -29,14 +29,14 @@ public enum GTPP_Branch_Definition {
Enum enumA = mActualValues;
Method methodMyMethod = gtBranchDefClass.getMethod("getTemplate");
- Utils.LOG_INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
- Utils.LOG_INFO("[Bees] enumA: "+(enumA != null));
- Utils.LOG_INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
+ Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
+ Logger.INFO("[Bees] enumA: "+(enumA != null));
+ Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
return (IAllele[]) methodMyMethod.invoke(enumA);
}
catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Utils.LOG_INFO("[Bees] Bad Reflection. getTemplate()");
+ Logger.INFO("[Bees] Bad Reflection. getTemplate()");
e.printStackTrace();
//gregtech.loaders.misc.GT_BranchDefinition.getTemplate()
return null;
@@ -51,14 +51,14 @@ public enum GTPP_Branch_Definition {
Method methodMyMethod = gtBranchDefClass.getMethod("getBranch");
- Utils.LOG_INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
- Utils.LOG_INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null));
- Utils.LOG_INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
+ Logger.INFO("[Bees] gtBranchDefClass: "+(gtBranchDefClass != null));
+ Logger.INFO("[Bees] enum_MY_SAMPLE_ENUM: "+(enum_MY_SAMPLE_ENUM != null));
+ Logger.INFO("[Bees] methodMyMethod: "+(methodMyMethod != null));
return (IClassification) methodMyMethod.invoke(enum_MY_SAMPLE_ENUM);
}
catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Utils.LOG_INFO("[Bees] Bad Reflection. getBranch()");
+ Logger.INFO("[Bees] Bad Reflection. getBranch()");
e.printStackTrace();
return null;
}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
index adfa6cbf11..d95993f2d2 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/ItemCustomComb.java
@@ -1,16 +1,19 @@
package gtPlusPlus.xmod.forestry.bees.custom;
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.apache.commons.lang3.reflect.FieldUtils;
+
import com.google.common.collect.ImmutableMap;
+
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.Tabs;
import forestry.api.recipes.RecipeManagers;
import gregtech.GT_Mod;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.*;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
@@ -21,11 +24,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
-import java.lang.reflect.Field;
-import java.util.List;
-
-import org.apache.commons.lang3.reflect.FieldUtils;
-
public class ItemCustomComb extends Item {
@SideOnly(Side.CLIENT)
private IIcon secondIcon;
@@ -68,6 +66,7 @@ public class ItemCustomComb extends Item {
return 2;
}
+ @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister) {
this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
index 6b21461b62..5cb1d06982 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
@@ -13,18 +13,13 @@ package gtPlusPlus.xmod.forestry.bees.inventory;
import java.util.ArrayList;
import java.util.Collection;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import forestry.api.apiculture.BeeManager;
-import forestry.api.apiculture.IBee;
-import forestry.api.apiculture.IBeeHousing;
-import forestry.api.apiculture.IBeekeepingMode;
-import forestry.api.apiculture.IHiveFrame;
+import forestry.api.apiculture.*;
import forestry.apiculture.InventoryBeeHousing;
import forestry.apiculture.inventory.IApiaryInventory;
import forestry.core.access.IAccessHandler;
import forestry.core.utils.SlotUtil;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory {
public static final int SLOT_FRAMES_1 = 9;
@@ -70,6 +65,7 @@ public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApia
return hiveFrames;
}
+ @Override
public void wearOutFrames(IBeeHousing beeHousing, int amount) {
IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld());
int wear = Math.round(amount * beekeepingMode.getWearModifier());
diff --git a/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java b/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java
index 74a627b2c5..155feae83c 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/trees/TreefarmManager.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.forestry.trees;
import cpw.mods.fml.common.Optional;
import gregtech.api.enums.OrePrefixes;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.block.Block;
@@ -100,10 +100,10 @@ public class TreefarmManager {
public static boolean isSapling(final Block log){
if (log != null){
if (OrePrefixes.sapling.contains(new ItemStack(log, 1))){
- Utils.LOG_INFO(""+log.getLocalizedName());
+ Logger.WARNING(""+log.getLocalizedName());
}
if (log.getLocalizedName().toLowerCase().contains("sapling")){
- Utils.LOG_INFO(""+log.getLocalizedName());
+ Logger.WARNING(""+log.getLocalizedName());
return true;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java
index fa5ff66310..5a1c305ab5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/Interface_ToolStats.java
@@ -122,6 +122,7 @@ public interface Interface_ToolStats extends IToolStats{
/**
* @return If this Tool can be used as an BC Wrench.
*/
+ @Override
public boolean isWrench();
/**
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
index 89deeb931d..3d3dcee94c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaTool.java
@@ -1,7 +1,5 @@
package gtPlusPlus.xmod.gregtech.api.items;
-import static gregtech.api.enums.GT_Values.MOD_ID_RC;
-
import java.util.*;
import java.util.Map.Entry;
@@ -147,6 +145,7 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements
}
+ @SuppressWarnings("unchecked")
public void addAdditionalToolTips(final List aList, final ItemStack aStack) {
final long tMaxDamage = getToolMaxDamage(aStack);
final Materials tMaterial = getPrimaryMaterial(aStack);
@@ -171,6 +170,8 @@ public abstract class Gregtech_MetaTool extends GT_MetaGenerated_Tool implements
}
}
+ @Override
+ @SuppressWarnings("unchecked")
public void addAdditionalToolTips(final List aList, final ItemStack aStack, final EntityPlayer aPlayer) {
final long tMaxDamage = getToolMaxDamage(aStack);
final Materials tMaterial = getPrimaryMaterial(aStack);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java
index a980a299d5..cf167888f3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/tools/GT_MetaGenTool.java
@@ -339,6 +339,7 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool {
}
}
+ @Override
public boolean canWrench(final EntityPlayer player, final int x, final int y, final int z) {
System.out.println("canWrench");
if(player==null) {
@@ -354,6 +355,7 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool {
return (tStats != null) && tStats.isWrench();
}
+ @Override
public void wrenchUsed(final EntityPlayer player, final int x, final int y, final int z) {
if(player==null) {
return;
@@ -367,14 +369,17 @@ public abstract class GT_MetaGenTool extends GT_MetaGenerated_Tool {
}
}
+ @Override
public boolean canUse(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){
return this.canWrench(player, x, y, z);
}
+ @Override
public void used(final ItemStack stack, final EntityPlayer player, final int x, final int y, final int z){
this.wrenchUsed(player, x, y, z);
}
+ @Override
public boolean shouldHideFacades(final ItemStack stack, final EntityPlayer player) {
if(player==null) {
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java
index 7b4cf471b0..83c2235d8c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeMachine.java
@@ -14,7 +14,7 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.objects.XSTR;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -452,7 +452,7 @@ public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_
}
boolean tRemovedOutputFluid = false;
- Utils.LOG_WARNING("R0");
+ Logger.WARNING("R0");
if (doesAutoOutputFluids() && getDrainableStack() != null && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || aTick % 20 == 0)) {
IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing());
@@ -477,27 +477,27 @@ public abstract class GT_MetaTileEntity_DeluxeMachine extends GT_MetaTileEntity_
if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0;
else mOutputBlocked++;
- Utils.LOG_WARNING("R1");
+ Logger.WARNING("R1");
if (allowToCheckRecipe()) {
- Utils.LOG_WARNING("R2--------------------------------------------------");
- Utils.LOG_WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())");
- Utils.LOG_WARNING("R2--------------------------------------------------");
- Utils.LOG_WARNING("R2-mMaxProgresstime: "+mMaxProgresstime);
- Utils.LOG_WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork());
- Utils.LOG_WARNING("R2--------------------------------------------------");
- Utils.LOG_WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid);
- Utils.LOG_WARNING("R2-tSucceeded: "+tSucceeded);
- Utils.LOG_WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified());
- Utils.LOG_WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0));
- Utils.LOG_WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled());
- Utils.LOG_WARNING("R2--------------------------------------------------");
- Utils.LOG_WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe());
- Utils.LOG_WARNING("R2--------------------------------------------------");
+ Logger.WARNING("R2--------------------------------------------------");
+ Logger.WARNING("R2: (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe())");
+ Logger.WARNING("R2--------------------------------------------------");
+ Logger.WARNING("R2-mMaxProgresstime: "+mMaxProgresstime);
+ Logger.WARNING("R2-isAllowedToWork(): "+aBaseMetaTileEntity.isAllowedToWork());
+ Logger.WARNING("R2--------------------------------------------------");
+ Logger.WARNING("R2-tRemovedOutputFluid: "+tRemovedOutputFluid);
+ Logger.WARNING("R2-tSucceeded: "+tSucceeded);
+ Logger.WARNING("R2-hasInventoryBeenModified(): "+aBaseMetaTileEntity.hasInventoryBeenModified());
+ Logger.WARNING("R2-(aTick % 600 == 0): "+(aTick % 600 == 0));
+ Logger.WARNING("R2-hasWorkJustBeenEnabled(): "+aBaseMetaTileEntity.hasWorkJustBeenEnabled());
+ Logger.WARNING("R2--------------------------------------------------");
+ Logger.WARNING("R2-hasEnoughEnergyToCheckRecipe(): "+hasEnoughEnergyToCheckRecipe());
+ Logger.WARNING("R2--------------------------------------------------");
if (mMaxProgresstime <= 0 && aBaseMetaTileEntity.isAllowedToWork() && (tRemovedOutputFluid || tSucceeded || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()) && hasEnoughEnergyToCheckRecipe()) {
- Utils.LOG_WARNING("R3");
+ Logger.WARNING("R3");
if (checkRecipe() == 2) {
if (mInventory[3] != null && mInventory[3].stackSize <= 0) mInventory[3] = null;
- Utils.LOG_WARNING("R4");
+ Logger.WARNING("R4");
for (int i = getInputSlot(), j = i + mInputSlotCount; i < j; i++)
if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null;
for (int i = 0; i < mOutputItems.length; i++) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java
index 175869a1ac..b5e7d7d64c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_DeluxeTank.java
@@ -5,7 +5,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_DeluxeTank;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_DeluxeTank;
import net.minecraft.entity.player.InventoryPlayer;
@@ -228,7 +228,7 @@ public abstract class GT_MetaTileEntity_DeluxeTank extends GT_MetaTileEntity_Bas
}
}
else {
- Utils.LOG_INFO("Something broke when trying to empty cells between two fluid tank areas.");
+ Logger.INFO("Something broke when trying to empty cells between two fluid tank areas.");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
index 9c93ca3889..8b5a1e520b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
@@ -3,21 +3,16 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
import static gregtech.api.enums.GT_Values.V;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_2by2;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_4by4;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_2by2;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_4by4;
+import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -219,10 +214,12 @@ GT_MetaTileEntity_Hatch {
&& (mRecipeMap == null || mRecipeMap.containsInput(aStack));
}
+ @Override
public int rechargerSlotStartIndex() {
return 0;
}
+ @Override
public int rechargerSlotCount() {
switch (mTier) {
case 2 :
@@ -234,10 +231,12 @@ GT_MetaTileEntity_Hatch {
}
}
+ @Override
public int dechargerSlotStartIndex() {
return 0;
}
+ @Override
public int dechargerSlotCount() {
return 0;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
index aa234a3dc9..29d32d4d9d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
@@ -2,7 +2,6 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
import static gregtech.api.enums.GT_Values.V;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
@@ -10,12 +9,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_2by2;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_4by4;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_2by2;
-import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_4by4;
+import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.*;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -178,18 +174,22 @@ GT_MetaTileEntity_Hatch {
}
}
+ @Override
public int rechargerSlotStartIndex() {
return 0;
}
+ @Override
public int rechargerSlotCount() {
return 0;
}
+ @Override
public int dechargerSlotStartIndex() {
return 0;
}
+ @Override
public int dechargerSlotCount() {
return mTier == 2 ? 4 : 16;
}
@@ -205,7 +205,7 @@ GT_MetaTileEntity_Hatch {
if (aBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) {
MetaTileEntity mMetaTileEntity = (MetaTileEntity) aBaseMetaTileEntity.getMetaTileEntity();
if (mMetaTileEntity.dechargerSlotCount() > 0 && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) {
- Utils.LOG_INFO("3");
+ Logger.INFO("3");
for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
if (mMetaTileEntity.mInventory[i] != null && mMetaTileEntity.getEUVar() < aBaseMetaTileEntity.getEUCapacity()) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, aBaseMetaTileEntity.getEUCapacity() - aBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
index 6de1594b69..220e6eb4dc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
@@ -19,8 +19,8 @@ import gregtech.api.metatileentity.MetaPipeEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import ic2.api.energy.tile.IEnergySink;
import net.minecraft.entity.Entity;
@@ -88,8 +88,8 @@ public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements
} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
// Utils.LOG_INFO("FATAL ERROR - REFLECTION FAILED FOR GT CABLES
// - PLEASE REPORT THIS.");
- Utils.LOG_WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS.");
- Utils.LOG_ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS.");
+ Logger.WARNING("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS.");
+ Logger.ERROR("FATAL ERROR - REFLECTION FAILED FOR GT CABLES - PLEASE REPORT THIS.");
temp = 4;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index fdcdab63fe..f6a8d55174 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -1,21 +1,21 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import java.lang.reflect.*;
import java.util.ArrayList;
import java.util.Iterator;
+import org.apache.commons.lang3.reflect.FieldUtils;
+
+import gregtech.api.enums.Materials;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.metatileentity.MetaTileEntity;
-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_Output;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.metatileentity.implementations.*;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
@@ -102,7 +102,7 @@ GT_MetaTileEntity_MultiBlockBase {
public int getValidOutputSlots(final IGregTechTileEntity machineCalling,
final GT_Recipe sRecipes, final ItemStack[] sInputs) {
- Utils.LOG_WARNING("Finding valid output slots for "
+ Logger.WARNING("Finding valid output slots for "
+ machineCalling.getInventoryName());
final ArrayList<ItemStack> tInputList = this.getStoredInputs();
final GT_Recipe tRecipe = sRecipes;
@@ -145,11 +145,11 @@ GT_MetaTileEntity_MultiBlockBase {
baseRecipe = tRecipe.copy();
if ((cloneRecipe != baseRecipe) || (cloneRecipe == null)) {
cloneRecipe = baseRecipe.copy();
- Utils.LOG_WARNING("Setting Recipe");
+ Logger.WARNING("Setting Recipe");
}
if ((cloneTime != baseRecipe.mDuration) || (cloneTime == 0)) {
cloneTime = baseRecipe.mDuration;
- Utils.LOG_WARNING("Setting Time");
+ Logger.WARNING("Setting Time");
}
if (cloneRecipe.mDuration > 0) {
@@ -158,16 +158,16 @@ GT_MetaTileEntity_MultiBlockBase {
(100 - percentage));
cloneRecipe.mDuration = tempTime;
if (cloneRecipe.mDuration < originalTime) {
- Utils.LOG_MACHINE_INFO("Generated recipe with a smaller time. | "
+ Logger.MACHINE_INFO("Generated recipe with a smaller time. | "
+ originalTime + " | " + cloneRecipe.mDuration + " |");
return cloneRecipe;
} else {
- Utils.LOG_MACHINE_INFO("Did not generate recipe with a smaller time. | "
+ Logger.MACHINE_INFO("Did not generate recipe with a smaller time. | "
+ originalTime + " | " + cloneRecipe.mDuration + " |");
return tRecipe;
}
}
- Utils.LOG_MACHINE_INFO("Error generating recipe, returning null.");
+ Logger.MACHINE_INFO("Error generating recipe, returning null.");
return null;
}
@@ -213,6 +213,15 @@ GT_MetaTileEntity_MultiBlockBase {
}
super.updateSlots();
}
+
+ public boolean isToolCreative(ItemStack mStack){
+ Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(mStack);
+ Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(mStack);
+ if (t1 == Materials._NULL && t2 == Materials._NULL){
+ return true;
+ }
+ return false;
+ }
@Override
public boolean addToMachineList(final IGregTechTileEntity aTileEntity,
@@ -401,4 +410,44 @@ GT_MetaTileEntity_MultiBlockBase {
return super.addDynamoToMachineList(aTileEntity, aBaseCasingIndex);
}
+
+ /**
+ * Pollution Management
+ */
+
+ public int getPollutionPerTick(ItemStack arg0) {
+ return 0;
+ }
+
+ public boolean polluteEnvironment(int aPollutionLevel) {
+ int mPollution = 0;
+ Field f = FieldUtils.getDeclaredField(this.getClass(), "mPollution", true);
+ if (f != null){
+ try {
+ mPollution = (int) f.get(this);
+ }
+ catch (IllegalArgumentException | IllegalAccessException e) {}
+ }
+
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && f != null){
+ mPollution += aPollutionLevel;
+ for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ if (mPollution < 10000) {
+ break;
+ }
+ if (!tHatch.polluteEnvironment()) {
+ continue;
+ }
+ mPollution -= 10000;
+ }
+ }
+ return mPollution < 10000;
+ }
+ else {
+ return false;
+ }
+
+ }
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java
index 717616ff71..c499b38ce8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechDoubleFuelGeneratorBase.java
@@ -10,8 +10,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -70,10 +70,10 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
@Override
public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()){
- Utils.LOG_WARNING("Entity is Client side, simply returning true");
+ Logger.WARNING("Entity is Client side, simply returning true");
return true;
}
- Utils.LOG_WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true");
+ Logger.WARNING("Entity is not Client side, opening entity Container and by extension, it's GUI, then returning true");
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}
@@ -216,19 +216,19 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
final int tFuelValue2 = this.getFuelValue(this.mFluid2), tConsumed2 = this.consumedFluidPerOperation(this.mFluid2);
if (((tFuelValue > 0) && (tConsumed > 0) && (this.mFluid.amount > tConsumed))/* && (tFuelValue2 > 0 && tConsumed2 > 0 && mFluid2.amount > tConsumed2)*/) {
- Utils.LOG_WARNING("tFuelValue: "+tFuelValue);
- Utils.LOG_WARNING("tConsumed: "+tConsumed);
- Utils.LOG_WARNING("mFluid.name: "+this.mFluid.getFluid().getName());
- Utils.LOG_WARNING("mFluid.amount: "+this.mFluid.amount);
- Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed));
+ Logger.WARNING("tFuelValue: "+tFuelValue);
+ Logger.WARNING("tConsumed: "+tConsumed);
+ Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName());
+ Logger.WARNING("mFluid.amount: "+this.mFluid.amount);
+ Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed));
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
- Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2);
- Utils.LOG_WARNING("tConsumed2: "+tConsumed2);
- Utils.LOG_WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName());
- Utils.LOG_WARNING("mFluid2.amount: "+this.mFluid2.amount);
- Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2));
+ Logger.WARNING("tFuelValue2: "+tFuelValue2);
+ Logger.WARNING("tConsumed2: "+tConsumed2);
+ Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName());
+ Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount);
+ Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2));
long tFluidAmountToUse = Math.min(this.mFluid.amount / tConsumed, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
long tFluidAmountToUse2 = Math.min(this.mFluid2.amount / tConsumed2, (((this.maxEUOutput() * 30) + this.getMinimumStoredEU()) - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue2);
@@ -239,9 +239,9 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){
tFluidAmountToUse = 1;
- Utils.LOG_WARNING("=========================================================");
- Utils.LOG_WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse);
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
+ Logger.WARNING("tFluidAmountToUse - Updated: "+tFluidAmountToUse);
+ Logger.WARNING("=========================================================");
}
}
@@ -251,15 +251,15 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
}*/
if (aBaseMetaTileEntity.getUniversalEnergyStored() <= (aBaseMetaTileEntity.getEUCapacity()-aBaseMetaTileEntity.getUniversalEnergyStored())){
tFluidAmountToUse2 = 1;
- Utils.LOG_WARNING("=========================================================");
- Utils.LOG_WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2);
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
+ Logger.WARNING("tFluidAmountToUse2 - Updated: "+tFluidAmountToUse2);
+ Logger.WARNING("=========================================================");
}
}
- Utils.LOG_WARNING("=========================================================");
- Utils.LOG_WARNING("tFluidAmountToUse: "+tFluidAmountToUse);
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
+ Logger.WARNING("tFluidAmountToUse: "+tFluidAmountToUse);
+ Logger.WARNING("=========================================================");
/*Utils.LOG_WARNING("mFluid.amount / tConsumed: "+("fluidAmount:"+mFluid.amount)+(" tConsumed:"+tConsumed)+" | "+(mFluid.amount / tConsumed));
Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU()));
@@ -272,9 +272,9 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
Utils.LOG_WARNING("(maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue): "+((maxEUOutput() * 30 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue));
*/
- Utils.LOG_WARNING("=========================================================");
- Utils.LOG_WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2);
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
+ Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2);
+ Logger.WARNING("=========================================================");
/*Utils.LOG_WARNING("mFluid2.amount / tConsumed2: "+("fluidAmount2:"+mFluid2.amount)+(" tConsumed2:"+tConsumed2)+" | "+(mFluid2.amount / tConsumed2));
Utils.LOG_WARNING("maxEUOutput() * 20 + getMinimumStoredEU(): "+(maxEUOutput() * 30 + getMinimumStoredEU()));
@@ -288,19 +288,19 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
*/
if (((tFluidAmountToUse > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) && ((tFluidAmountToUse2 > 0) && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse2 * tFuelValue2, true))){
- Utils.LOG_WARNING("tFuelValue: "+tFuelValue);
- Utils.LOG_WARNING("tConsumed: "+tConsumed);
- Utils.LOG_WARNING("mFluid.name: "+this.mFluid.getFluid().getName());
- Utils.LOG_WARNING("mFluid.amount: "+this.mFluid.amount);
- Utils.LOG_WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed));
+ Logger.WARNING("tFuelValue: "+tFuelValue);
+ Logger.WARNING("tConsumed: "+tConsumed);
+ Logger.WARNING("mFluid.name: "+this.mFluid.getFluid().getName());
+ Logger.WARNING("mFluid.amount: "+this.mFluid.amount);
+ Logger.WARNING("mFluid.amount > tConsumed: "+(this.mFluid.amount > tConsumed));
- Utils.LOG_WARNING("=========================================================");
+ Logger.WARNING("=========================================================");
- Utils.LOG_WARNING("tFuelValue2: "+tFuelValue2);
- Utils.LOG_WARNING("tConsumed2: "+tConsumed2);
- Utils.LOG_WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName());
- Utils.LOG_WARNING("mFluid2.amount: "+this.mFluid2.amount);
- Utils.LOG_WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2));
+ Logger.WARNING("tFuelValue2: "+tFuelValue2);
+ Logger.WARNING("tConsumed2: "+tConsumed2);
+ Logger.WARNING("mFluid2.name: "+this.mFluid2.getFluid().getName());
+ Logger.WARNING("mFluid2.amount: "+this.mFluid2.amount);
+ Logger.WARNING("mFluid2.amount > tConsumed2: "+(this.mFluid2.amount > tConsumed2));
if (this.useFuel){
this.mFluid.amount -= tFluidAmountToUse * tConsumed;
@@ -313,10 +313,10 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
}
else {
- Utils.LOG_WARNING("=========================================================");
- Utils.LOG_WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0");
- Utils.LOG_WARNING("tFluidAmountToUse1: "+tFluidAmountToUse);
- Utils.LOG_WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2);
+ Logger.WARNING("=========================================================");
+ Logger.WARNING("Either tFluidAmountToUse1 <= 0, power cannot be increased of tFluidAmountToUse2 <= 0");
+ Logger.WARNING("tFluidAmountToUse1: "+tFluidAmountToUse);
+ Logger.WARNING("tFluidAmountToUse2: "+tFluidAmountToUse2);
}
}
else {
@@ -335,12 +335,12 @@ public abstract class GregtechDoubleFuelGeneratorBase extends GT_MetaTileEntity_
}
}
else {
- Utils.LOG_WARNING("One mFluid is null");
+ Logger.WARNING("One mFluid is null");
if (this.mFluid != null) {
- Utils.LOG_WARNING("mFluid1 is not null");
+ Logger.WARNING("mFluid1 is not null");
}
if (this.mFluid2 != null) {
- Utils.LOG_WARNING("mFluid2 is not null");
+ Logger.WARNING("mFluid2 is not null");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java
index 289da38d53..058063a45f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/machines/GregtechMetaSafeBlockBase.java
@@ -10,7 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.player.PlayerCache;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -201,35 +201,35 @@ public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_Tiered
}*/
//Utils.LOG_INFO("test");
if (this.ownerUUID == null){
- Utils.LOG_INFO("No owner yet for this block.");
+ Logger.INFO("No owner yet for this block.");
}
else {
//Utils.LOG_INFO("test");
- Utils.LOG_INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID);
+ Logger.INFO("Current Owner: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID)+" - UUID: "+this.ownerUUID);
}
- Utils.LOG_WARNING("Is ownerUUID Null");
+ Logger.WARNING("Is ownerUUID Null");
if (this.ownerUUID == null){
- Utils.LOG_WARNING("OwnerUUID is Null, let's set it.");
- Utils.LOG_WARNING("Accessing Players UUID is: "+tempUUID);
+ Logger.WARNING("OwnerUUID is Null, let's set it.");
+ Logger.WARNING("Accessing Players UUID is: "+tempUUID);
this.ownerUUID = tempUUID;
//Utils.messagePlayer(aPlayer, "Owner of this safe, now set. Try accessing it again.");
- Utils.LOG_WARNING("Block Owner is now set to: "+this.ownerUUID);
+ Logger.WARNING("Block Owner is now set to: "+this.ownerUUID);
}
- Utils.LOG_WARNING("No, it is not.");
- Utils.LOG_WARNING("Checking ownerUUID.");
+ Logger.WARNING("No, it is not.");
+ Logger.WARNING("Checking ownerUUID.");
if (this.ownerUUID != null){
- Utils.LOG_WARNING("ownerUUID != Null, if accessor == owner.");
- Utils.LOG_WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID));
+ Logger.WARNING("ownerUUID != Null, if accessor == owner.");
+ Logger.WARNING("Accessing is: "+PlayerCache.lookupPlayerByUUID(tempUUID));
if (this.ownerUUID.equals(tempUUID)){
- Utils.LOG_WARNING("Owner's UUID: "+this.ownerUUID);
+ Logger.WARNING("Owner's UUID: "+this.ownerUUID);
aBaseMetaTileEntity.openGUI(aPlayer);
//Utils.LOG_WARNING("GUI should now be open for you sir.");
}
else {
PlayerUtils.messagePlayer(aPlayer, "Access Denied, This does not belong to you.");
PlayerUtils.messagePlayer(aPlayer, "it is owned by: "+PlayerCache.lookupPlayerByUUID(this.ownerUUID));
- Utils.LOG_WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID));
- Utils.LOG_ERROR("Access Denied.");
+ Logger.WARNING("Expecting Player : "+PlayerCache.lookupPlayerByUUID(this.ownerUUID));
+ Logger.ERROR("Access Denied.");
return true;
}
@@ -284,7 +284,7 @@ public abstract class GregtechMetaSafeBlockBase extends GT_MetaTileEntity_Tiered
this.value_last = this.value_current;
this.value_current = this.bUnbreakable;
if (this.value_last != this.value_current){
- Utils.LOG_WARNING("VALUE CHANGE - Ticking for a moment.");
+ Logger.WARNING("VALUE CHANGE - Ticking for a moment.");
if (this.bUnbreakable == true){
//Xasda.setmTileEntity((BaseMetaTileEntity) aBaseMetaTileEntity);
//Utils.LOG_ERROR("Safe is Indestructible.");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java
index 82048b17f7..d5ac473543 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_GT_Ore_Layer.java
@@ -2,6 +2,11 @@ package gtPlusPlus.xmod.gregtech.api.world;
import static gtPlusPlus.xmod.gregtech.HANDLER_GT.sCustomWorldgenFile;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Random;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -13,11 +18,6 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Random;
-
public class GTPP_Worldgen_GT_Ore_Layer
extends GTPP_Worldgen {
public static ArrayList<GTPP_Worldgen_GT_Ore_Layer> sList = new ArrayList<GTPP_Worldgen_GT_Ore_Layer>();
@@ -83,6 +83,7 @@ extends GTPP_Worldgen {
}
}
+ @Override
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) {
return false; //Not the correct biome for ore mix
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index e5c9cace94..6de9fa1259 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -6,7 +6,7 @@ import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraftforge.oredict.OreDictionary;
@@ -19,7 +19,7 @@ public class Meta_GT_Proxy {
public static IIconRegister sBlockIcons, sItemIcons;
public Meta_GT_Proxy() {
- Utils.LOG_INFO("GT_PROXY - initialized.");
+ Logger.INFO("GT_PROXY - initialized.");
for (final String tOreName : OreDictionary.getOreNames()) {
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
index e57a936697..89b7b728b6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.blocks.fluid;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.base.cell.BaseItemCell;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
@@ -40,14 +41,14 @@ public class GregtechFluidHandler {
if (!LoadedMods.ThermalFoundation){
- Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids");
+ Logger.INFO("Adding in our own GT versions of Thermal Foundation Fluids");
FluidUtils.addFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
FluidUtils.addFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
FluidUtils.addFluid("ender", "Resonant Ender", GT_Materials.Ender, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Ender, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
}
if (LoadedMods.IndustrialCraft2){
- Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content.");
+ Logger.INFO("Adding in GT Fluids for various nuclear related content.");
FluidUtils.addFluid("hydrofluoricAcid", "Industrial Strength Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
generateIC2FluidCell("HydrofluoricAcid");
@@ -65,10 +66,10 @@ public class GregtechFluidHandler {
if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){
if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){
if (LoadedMods.IHL){
- Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own.");
+ Logger.INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own.");
}
else {
- Utils.LOG_INFO("No Suitable versions of Hydrogen Chloride available, adding our own.");
+ Logger.INFO("No Suitable versions of Hydrogen Chloride available, adding our own.");
}
FluidUtils.addFluid("hydrogenChloride", "Industrial Strength Hydrogen Chloride", GT_Materials.HydrogenChloride, 4, 75, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrogenChloride, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
generateIC2FluidCell("HydrogenChloride");
@@ -87,7 +88,7 @@ public class GregtechFluidHandler {
}
private static ItemStack generateIC2FluidCell(final String fluidNameWithCaps){
- Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps);
+ Logger.INFO("Adding a Cell for "+fluidNameWithCaps);
if (LoadedMods.IndustrialCraft2){
return Utils.createInternalNameAndFluidCell(fluidNameWithCaps);
}
@@ -95,7 +96,7 @@ public class GregtechFluidHandler {
}
private static ItemStack generateIC2FluidCellNoOreDict(final String fluidNameWithCaps){
- Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps);
+ Logger.INFO("Adding a Cell for "+fluidNameWithCaps);
if (LoadedMods.IndustrialCraft2){
return Utils.createInternalNameAndFluidCellNoOreDict(fluidNameWithCaps);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index be1ceb2fd7..3795f9815f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
@@ -23,7 +23,7 @@ public class TexturesGtBlock {
public CustomIcon(final String aIconName) {
this.mIconName = aIconName;
- Utils.LOG_WARNING("Constructing a Custom Texture. " + this.mIconName);
+ Logger.WARNING("Constructing a Custom Texture. " + this.mIconName);
GregTech_API.sGTBlockIconload.add(this);
}
@@ -40,7 +40,7 @@ public class TexturesGtBlock {
@Override
public void run() {
this.mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName);
- Utils.LOG_WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath());
+ Logger.WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath());
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index 31a95560da..db3812ad92 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks.textures;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
@@ -29,7 +29,7 @@ public final class TexturesGtTools {
public CustomIcon(final String aIconName) {
this.mIconName = aIconName;
- Utils.LOG_INFO("Constructing a Custom Texture. " + this.mIconName);
+ Logger.INFO("Constructing a Custom Texture. " + this.mIconName);
GregTech_API.sGTItemIconload.add(this);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
index 35cf3d02e1..210603ec0d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
@@ -1,16 +1,13 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
-import gregtech.common.items.GT_MetaGenerated_Item_01;
-import gregtech.common.items.GT_MetaGenerated_Item_02;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import gregtech.common.items.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.BlockPos;
import gtPlusPlus.core.util.array.Pair;
@@ -184,20 +181,20 @@ public class ChargingHelper {
if (mEntity == null){
return false;
}
- Utils.LOG_WARNING("trying to map new player");
+ Logger.WARNING("trying to map new player");
if (mValidPlayers.containsKey(mPlayer)){
- Utils.LOG_WARNING("Key contains player already?");
+ Logger.WARNING("Key contains player already?");
return false;
}
else {
- Utils.LOG_WARNING("key not found, adding");
+ Logger.WARNING("key not found, adding");
Pair<GregtechMetaWirelessCharger, Byte> mEntry = new Pair<GregtechMetaWirelessCharger, Byte>(mEntity, (byte) mEntity.getMode());
if (mValidPlayers.put(mPlayer, mEntry) == null){
- Utils.LOG_WARNING("Added a Player to the Tick Map.");
+ Logger.WARNING("Added a Player to the Tick Map.");
return true;
}
else {
- Utils.LOG_WARNING("Tried to add player but it was already there?");
+ Logger.WARNING("Tried to add player but it was already there?");
return false;
}
}
@@ -207,21 +204,21 @@ public class ChargingHelper {
if (mEntity == null){
return false;
}
- Utils.LOG_WARNING("trying to remove player from map");
+ Logger.WARNING("trying to remove player from map");
if (mValidPlayers.containsKey(mPlayer)){
- Utils.LOG_WARNING("key found, removing");
+ Logger.WARNING("key found, removing");
Pair<GregtechMetaWirelessCharger, Byte> mEntry = new Pair<GregtechMetaWirelessCharger, Byte>(mEntity, (byte) mEntity.getMode());
if (mValidPlayers.remove(mPlayer, mEntry)){
- Utils.LOG_WARNING("Removed a Player to the Tick Map.");
+ Logger.WARNING("Removed a Player to the Tick Map.");
return true;
}
else {
- Utils.LOG_WARNING("Tried to remove player but it was not there?");
+ Logger.WARNING("Tried to remove player but it was not there?");
return false;
}
}
else {
- Utils.LOG_WARNING("Key does not contain player?");
+ Logger.WARNING("Key does not contain player?");
return false;
}
}
@@ -268,17 +265,17 @@ public class ChargingHelper {
for (ItemStack mTemp : mItems){
mItemSlot++;
if (mTemp != null){
- Utils.LOG_WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName());
+ Logger.WARNING("Slot "+mItemSlot+" contains "+mTemp.getDisplayName());
}
//Is item Electrical
if (isItemValid(mTemp)){
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
//Transfer Limit
double mItemEuTLimit = ((IElectricItem) mTemp.getItem()).getTransferLimit(mTemp);
//Check if Tile has more or equal EU to what can be transferred into the item.
if (mEuStored >= mItemEuTLimit){
- Utils.LOG_WARNING("2");
+ Logger.WARNING("2");
double mItemMaxCharge = ((IElectricItem) mTemp.getItem()).getMaxCharge(mTemp);
double mitemCurrentCharge = ElectricItem.manager.getCharge(mTemp);
@@ -289,7 +286,7 @@ public class ChargingHelper {
//Try get charge direct from NBT for GT and IC2 stacks
try {
- Utils.LOG_WARNING("3");
+ Logger.WARNING("3");
if (mTemp.getItem() instanceof GT_MetaGenerated_Tool_01
|| mTemp.getItem() instanceof GT_MetaGenerated_Item_01
|| mTemp.getItem() instanceof GT_MetaGenerated_Item_02
@@ -327,7 +324,7 @@ public class ChargingHelper {
mVoltageIncrease = mItemEuTLimit;
}
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
int mMulti;
if ((mitemCurrentCharge + (mVoltageIncrease*20)) <= (mItemMaxCharge - (mVoltageIncrease*20))){
@@ -342,15 +339,15 @@ public class ChargingHelper {
else {
mMulti = 1;
}
- Utils.LOG_WARNING("5");
+ Logger.WARNING("5");
int mMultiVoltage = (int) (mMulti*mVoltageIncrease);
if ((mitemCurrentCharge + mMultiVoltage) <= mItemMaxCharge){
- Utils.LOG_WARNING("6");
+ Logger.WARNING("6");
if (GT_ModHandler.chargeElectricItem(mTemp, mMultiVoltage, mTier, true, false) == 0){
- Utils.LOG_WARNING("6.5");
+ Logger.WARNING("6.5");
for (int i=0; i<mMulti;i++){
if (ElectricItem.manager.charge(mTemp, mVoltageIncrease, mTier, false, false) == 0){
continue;
@@ -358,10 +355,10 @@ public class ChargingHelper {
}
}
if (ElectricItem.manager.getCharge(mTemp) > mitemCurrentCharge){
- Utils.LOG_WARNING("7");
- mEntity.setEUVar((long) (mEuStored-(mVoltage*mMulti)));
+ Logger.WARNING("7");
+ mEntity.setEUVar(mEuStored-(mVoltage*mMulti));
mEuStored = mEntity.getEUVar();
- Utils.LOG_WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp));
+ Logger.WARNING("Charged "+mTemp.getDisplayName()+" | Slot: "+mItemSlot+" | EU Multiplier: "+mMulti+" | EU/t input: "+mVoltageIncrease+" | EU/t consumed by Tile: "+mVoltage+" | Item Max Charge: "+mItemMaxCharge+" | Item Start Charge: "+mitemCurrentCharge+" | Item New Charge"+ElectricItem.manager.getCharge(mTemp));
mChargedItems++;
}
}
@@ -371,7 +368,7 @@ public class ChargingHelper {
}
else {
if (mTemp != null){
- Utils.LOG_WARNING("Found Non-Valid item. "+mTemp.getDisplayName());
+ Logger.WARNING("Found Non-Valid item. "+mTemp.getDisplayName());
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
index e3bfc81291..6a69c9f61a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/CraftingHelper.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Container;
import gtPlusPlus.xmod.gregtech.common.helpers.autocrafter.AC_Helper_Utils;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GT4Entity_AutoCrafter;
@@ -23,7 +23,7 @@ public class CraftingHelper{
public final AC_Helper_Container inventory;
public CraftingHelper(GT4Entity_AutoCrafter AC){
- Utils.LOG_INFO("[A-C] Created a crafting helper.");
+ Logger.INFO("[A-C] Created a crafting helper.");
crafter = AC;
AC_Helper_Utils.addCrafter(AC);
//Get some variables.
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
index ed11baa5ed..d023307820 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
@@ -9,9 +9,9 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.common.items.GT_MetaGenerated_Item_02;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.particles.BlockBreakParticles;
@@ -121,7 +121,7 @@ public class TreeFarmHelper {
}
final BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ);
if (MinecraftForge.EVENT_BUS.post(event)){
- Utils.LOG_MACHINE_INFO("Not sure why this returned false");
+ Logger.MACHINE_INFO("Not sure why this returned false");
return false;
}
if (event.getResult() == Result.ALLOW){
@@ -145,7 +145,7 @@ public class TreeFarmHelper {
}
public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity){
- Utils.LOG_MACHINE_INFO("called cleanUp()");
+ Logger.MACHINE_INFO("called cleanUp()");
int cleanedUp = 0;
final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11;
@@ -173,7 +173,7 @@ public class TreeFarmHelper {
)){
if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
- Utils.LOG_INFO("5:"+testBlock.getUnlocalizedName());
+ Logger.WARNING("5:"+testBlock.getUnlocalizedName());
} else {
aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf);
}
@@ -193,14 +193,14 @@ public class TreeFarmHelper {
){
if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
- Utils.LOG_INFO("0:"+testBlock.getUnlocalizedName());
+ Logger.WARNING("0:"+testBlock.getUnlocalizedName());
} else {
aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block);
}
if (TreefarmManager.isLeaves(testBlock) || TreefarmManager.isWoodLog(testBlock)){
- Utils.LOG_INFO("1:"+testBlock.getUnlocalizedName());
+ Logger.WARNING("1:"+testBlock.getUnlocalizedName());
int posiX, posiY, posiZ;
posiX = aBaseMetaTileEntity.getXCoord()+xDir+i;
posiY = aBaseMetaTileEntity.getYCoord()+h;
@@ -211,11 +211,11 @@ public class TreeFarmHelper {
new BlockBreakParticles(aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, Blocks.dirt);
}
else {
- //Utils.LOG_INFO("2:"+testBlock.getUnlocalizedName());
+ //Utils.LOG_WARNING("2:"+testBlock.getUnlocalizedName());
}
}
else {
- //Utils.LOG_INFO("1");
+ //Utils.LOG_WARNING("1");
}
@@ -223,13 +223,13 @@ public class TreeFarmHelper {
}
}
- Utils.LOG_MACHINE_INFO("cleaning up | "+cleanedUp );
+ Logger.MACHINE_INFO("cleaning up | "+cleanedUp );
return true;
}
public static SAWTOOL isCorrectMachinePart(final ItemStack aStack) {
if (aStack != null){
- //Utils.LOG_INFO("Found "+aStack.getDisplayName()+" in the GUI slot.");
+ //Utils.LOG_WARNING("Found "+aStack.getDisplayName()+" in the GUI slot.");
if ((aStack.getItem() instanceof GT_MetaGenerated_Item_02) || (aStack.getItem() instanceof GT_MetaGenerated_Tool)){
if (OrePrefixes.craftingTool.contains(aStack)){
if (aStack.getDisplayName().toLowerCase().contains("saw") || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.10")){
@@ -239,6 +239,15 @@ public class TreeFarmHelper {
else if (aStack.getItemDamage() == 140 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")){
return SAWTOOL.BUZZSAW;
}
+ else if (aStack.getItemDamage() == 110 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.110")){
+ return SAWTOOL.CHAINSAW;
+ }
+ else if (aStack.getItemDamage() == 112 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.112")){
+ return SAWTOOL.CHAINSAW;
+ }
+ else if (aStack.getItemDamage() == 114 || aStack.getDisplayName().toLowerCase().contains("gt.metatool.01.114")){
+ return SAWTOOL.CHAINSAW;
+ }
else {
return SAWTOOL.NONE;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
index f5b066fdc2..b9a4d861b3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Container.java
@@ -1,14 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.helpers.autocrafter;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.InventoryCraftResult;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.inventory.SlotCrafting;
+import net.minecraft.inventory.*;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.world.World;
@@ -69,16 +64,18 @@ public class AC_Helper_Container extends Container
/**
* Callback for when the crafting matrix is changed.
*/
+ @Override
public void onCraftMatrixChanged(IInventory p_75130_1_)
{
this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));
- Utils.LOG_INFO("Crafted "+this.craftResult.getStackInSlot(0));
+ Logger.INFO("Crafted "+this.craftResult.getStackInSlot(0));
}
/**
* Called when the container is closed.
*/
+ @Override
public void onContainerClosed(EntityPlayer p_75134_1_)
{
super.onContainerClosed(p_75134_1_);
@@ -97,6 +94,7 @@ public class AC_Helper_Container extends Container
}
}
+ @Override
public boolean canInteractWith(EntityPlayer p_75145_1_)
{
return true;
@@ -105,11 +103,13 @@ public class AC_Helper_Container extends Container
/**
* Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
*/
+ @Override
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_){
ItemStack itemstack = null;
return itemstack;
}
+ @Override
public boolean func_94530_a(ItemStack p_94530_1_, Slot p_94530_2_)
{
return p_94530_2_.inventory != this.craftResult && super.func_94530_a(p_94530_1_, p_94530_2_);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
index 052b611250..84cf6067d1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/autocrafter/AC_Helper_Utils.java
@@ -6,8 +6,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GT4Entity_AutoCrafter;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -26,11 +26,11 @@ public class AC_Helper_Utils {
if (!sAutocrafterMap.containsValue(AC)){
int increase = sAutocrafterMap.size()+1;
sAutocrafterMap.put(increase, AC);
- Utils.LOG_INFO("[A-C] "+"Added Auto-Crafter to index on position "+increase+".");
+ Logger.INFO("[A-C] "+"Added Auto-Crafter to index on position "+increase+".");
return increase;
}
else {
- Utils.LOG_INFO("[A-C] Tried adding an Auto-Crafter to Index, but found one already there.");
+ Logger.INFO("[A-C] Tried adding an Auto-Crafter to Index, but found one already there.");
}
return 0;
}
@@ -68,7 +68,7 @@ public class AC_Helper_Utils {
}
}
}
- Utils.LOG_WARNING("Failed. [getCrafterByID]");
+ Logger.WARNING("Failed. [getCrafterByID]");
return null;
}
@@ -83,7 +83,7 @@ public class AC_Helper_Utils {
}
}
}
- Utils.LOG_WARNING("Failed. [getIDByCrafter]");
+ Logger.WARNING("Failed. [getIDByCrafter]");
return 0;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
index 2773bea825..cbf6445559 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/tesseract/TesseractHelper.java
@@ -10,7 +10,7 @@ import java.util.Map.Entry;
import static gtPlusPlus.core.lib.CORE.sTesseractGeneratorOwnershipMap;
import static gtPlusPlus.core.lib.CORE.sTesseractTerminalOwnershipMap;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractGenerator;
import gtPlusPlus.xmod.gregtech.common.tileentities.automation.GT_MetaTileEntity_TesseractTerminal;
import net.minecraft.entity.player.EntityPlayer;
@@ -28,7 +28,7 @@ public class TesseractHelper {
public final static boolean isGeneratorOwnedByPlayer(EntityPlayer player,
GT_MetaTileEntity_TesseractGenerator generator) {
if (player == null){
- Utils.LOG_WARNING("Failed. [isGeneratorOwnedByPlayer]");
+ Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]");
return false;
}
//Utils.LOG_WARNING("Success. [isGeneratorOwnedByPlayer] 1");
@@ -47,7 +47,7 @@ public class TesseractHelper {
}
}
}
- Utils.LOG_WARNING("Failed. [isGeneratorOwnedByPlayer]");
+ Logger.WARNING("Failed. [isGeneratorOwnedByPlayer]");
return false;
}
@@ -58,7 +58,7 @@ public class TesseractHelper {
return false;
}
UUID playerIdentifier = player.getUniqueID();
- Utils.LOG_WARNING("Setting Generator on "+freq+" for "+player.getDisplayName()+".");
+ Logger.WARNING("Setting Generator on "+freq+" for "+player.getDisplayName()+".");
if (playerIdentifier != null) {
Map<Integer, GT_MetaTileEntity_TesseractGenerator> playerOwned = sTesseractGeneratorOwnershipMap
.get(playerIdentifier);
@@ -66,7 +66,7 @@ public class TesseractHelper {
Map<Integer, GT_MetaTileEntity_TesseractGenerator> newOwnershipMap = new HashMap<Integer, GT_MetaTileEntity_TesseractGenerator>();
newOwnershipMap.put(freq, generator);
sTesseractGeneratorOwnershipMap.put(playerIdentifier, newOwnershipMap);
- Utils.LOG_WARNING("Success! [Empty Map]");
+ Logger.WARNING("Success! [Empty Map]");
return true;
} else if (sTesseractGeneratorOwnershipMap.containsKey(playerIdentifier)) {
Map<Integer, GT_MetaTileEntity_TesseractGenerator> ownershipMap = sTesseractGeneratorOwnershipMap
@@ -76,11 +76,11 @@ public class TesseractHelper {
}
ownershipMap.put(freq, generator);
sTesseractGeneratorOwnershipMap.put(playerIdentifier, ownershipMap);
- Utils.LOG_WARNING("Success!");
+ Logger.WARNING("Success!");
return true;
}
}
- Utils.LOG_WARNING("Failed. [setGeneratorOwnershipByPlayer]");
+ Logger.WARNING("Failed. [setGeneratorOwnershipByPlayer]");
return false;
}
@@ -91,7 +91,7 @@ public class TesseractHelper {
return null;
}
UUID playerIdentifier = player.getUniqueID();
- Utils.LOG_WARNING("Getting Generator on "+freq+" for "+player.getDisplayName()+".");
+ Logger.WARNING("Getting Generator on "+freq+" for "+player.getDisplayName()+".");
if (!sTesseractGeneratorOwnershipMap.isEmpty() && playerIdentifier != null) {
//Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 1");
Map<Integer, GT_MetaTileEntity_TesseractGenerator> generators = getGeneratorOwnershipByPlayer(player);
@@ -102,12 +102,12 @@ public class TesseractHelper {
Entry<Integer, GT_MetaTileEntity_TesseractGenerator> current = i.next();
if (current.getKey().equals(freq)) {
//Utils.LOG_WARNING("Success. [getGeneratorByFrequency] 3");
- Utils.LOG_WARNING("Success!");
+ Logger.WARNING("Success!");
return current.getValue();
}
}
}
- Utils.LOG_WARNING("Failed. [getGeneratorByFrequency]");
+ Logger.WARNING("Failed. [getGeneratorByFrequency]");
return null;
}
@@ -161,14 +161,14 @@ public class TesseractHelper {
}
UUID playerIdentifier = player.getUniqueID();
if (playerIdentifier != null) {
- Utils.LOG_WARNING("Setting Terminal on "+freq+" for "+player.getDisplayName()+".");
+ Logger.WARNING("Setting Terminal on "+freq+" for "+player.getDisplayName()+".");
Map<Integer, GT_MetaTileEntity_TesseractTerminal> playerOwned = sTesseractTerminalOwnershipMap
.get(playerIdentifier);
if (playerOwned == null || playerOwned.isEmpty()) {
Map<Integer, GT_MetaTileEntity_TesseractTerminal> newOwnershipMap = new HashMap<Integer, GT_MetaTileEntity_TesseractTerminal>();
newOwnershipMap.put(freq, generator);
sTesseractTerminalOwnershipMap.put(playerIdentifier, newOwnershipMap);
- Utils.LOG_WARNING("Success! [Empty Map]");
+ Logger.WARNING("Success! [Empty Map]");
return true;
} else if (sTesseractTerminalOwnershipMap.containsKey(playerIdentifier)) {
Map<Integer, GT_MetaTileEntity_TesseractTerminal> ownershipMap = sTesseractTerminalOwnershipMap
@@ -177,11 +177,11 @@ public class TesseractHelper {
ownershipMap.put(freq, generator);
}
sTesseractTerminalOwnershipMap.put(playerIdentifier, ownershipMap);
- Utils.LOG_WARNING("Success!");
+ Logger.WARNING("Success!");
return true;
}
}
- Utils.LOG_WARNING("Failed. [setTerminalOwnershipByPlayer]");
+ Logger.WARNING("Failed. [setTerminalOwnershipByPlayer]");
return false;
}
@@ -192,7 +192,7 @@ public class TesseractHelper {
return null;
}
UUID playerIdentifier = player.getUniqueID();
- Utils.LOG_WARNING("Getting Terminal on "+freq+" for "+player.getDisplayName()+".");
+ Logger.WARNING("Getting Terminal on "+freq+" for "+player.getDisplayName()+".");
if (!sTesseractTerminalOwnershipMap.isEmpty() && playerIdentifier != null) {
Map<Integer, GT_MetaTileEntity_TesseractTerminal> generators = getTerminalOwnershipByPlayer(player);
Set<Entry<Integer, GT_MetaTileEntity_TesseractTerminal>> players = generators.entrySet();
@@ -200,12 +200,12 @@ public class TesseractHelper {
while (i.hasNext()) {
Entry<Integer, GT_MetaTileEntity_TesseractTerminal> current = i.next();
if (current.getKey().equals(freq)) {
- Utils.LOG_WARNING("Success!");
+ Logger.WARNING("Success!");
return current.getValue();
}
}
}
- Utils.LOG_WARNING("Failed. [getTerminalByFrequency]");
+ Logger.WARNING("Failed. [getTerminalByFrequency]");
return null;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index 7a3862c34d..78d9a5867d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -12,6 +12,7 @@ import gregtech.api.util.*;
import gregtech.common.covers.*;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
import gregtech.common.items.behaviors.Behaviour_DataStick;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.RECIPES_Old_Circuits;
import gtPlusPlus.core.util.StringUtils;
@@ -35,7 +36,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
int tLastID = 0;
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Utils.LOG_INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
+ Logger.INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
GregtechItemList.Electric_Pump_LuV.set(this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
GregtechItemList.Electric_Pump_ZPM.set(this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)}));
GregtechItemList.Electric_Pump_UV.set(this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)}));
@@ -299,7 +300,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
private boolean registerOldCircuits(){
//Enable Old Circuits
- Utils.LOG_INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage.");
+ Logger.INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage.");
GregtechItemList.Old_Circuit_Primitive.set(this.addItem(200, "NAND Chip", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive)}));
GregtechItemList.Old_Circuit_Basic.set(this.addItem(201, "Basic Electronic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic)}));
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
index 8a0248e85c..0208fcbd49 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
@@ -13,8 +13,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.tesseract.TesseractHelper;
@@ -199,7 +199,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + (2 * (byte) (int) (tCoords[1] * 2.0F)))) {
case 0:
- Utils.LOG_WARNING("Freq. -1 | " + this.mFrequency);
+ Logger.WARNING("Freq. -1 | " + this.mFrequency);
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
} catch (Throwable t) {
@@ -208,7 +208,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
break;
case 1:
- Utils.LOG_WARNING("Freq. +1 | " + this.mFrequency);
+ Logger.WARNING("Freq. +1 | " + this.mFrequency);
try {
CORE.sTesseractGeneratorOwnershipMap.get(mOwner).remove(this.mFrequency);
} catch (Throwable t) {
@@ -557,21 +557,21 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
// Set owner
if (PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName()) != null) {
if (this.mOwner == null) {
- Utils.LOG_WARNING("Setting Generators Owner. 1");
+ Logger.WARNING("Setting Generators Owner. 1");
this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
}
}
if (this.mFrequency != this.oFrequency) {
- Utils.LOG_WARNING("mFreq != oFreq");
+ Logger.WARNING("mFreq != oFreq");
if (getGeneratorEntity() == this) {
getGeneratorEntity(this.oFrequency);
this.getBaseMetaTileEntity().issueBlockUpdate();
- Utils.LOG_WARNING("this Gen == oFreq on map - do block update");
+ Logger.WARNING("this Gen == oFreq on map - do block update");
}
- Utils.LOG_WARNING("mFreq will be set to oFreq");
+ Logger.WARNING("mFreq will be set to oFreq");
this.oFrequency = this.mFrequency;
}
if ((this.getBaseMetaTileEntity().isAllowedToWork())
@@ -586,7 +586,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
}
} else {
if (getGeneratorEntity(Integer.valueOf(this.mFrequency)) == this) {
- Utils.LOG_WARNING("this gen == mFreq on map - do block update");
+ Logger.WARNING("this gen == mFreq on map - do block update");
TesseractHelper.removeGenerator(PlayerUtils.getPlayerOnServerFromUUID(mOwner), this.mFrequency);
this.getBaseMetaTileEntity().issueBlockUpdate();
}
@@ -700,7 +700,7 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
if (this.getBaseMetaTileEntity().getOwnerName() != null
&& !this.getBaseMetaTileEntity().getOwnerName().equals("")) {
this.mOwner = PlayerUtils.getPlayersUUIDByName(this.getBaseMetaTileEntity().getOwnerName());
- Utils.LOG_WARNING("Setting Generators Owner. 2");
+ Logger.WARNING("Setting Generators Owner. 2");
}
super.onCreated(aStack, aWorld, aPlayer);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
index 8c89b96adf..4363e57ad3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
@@ -8,8 +8,8 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
import gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler;
import net.minecraft.entity.player.InventoryPlayer;
@@ -265,7 +265,7 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (fuelSlot != null)) {
if (isInputFuelItem(fuelSlot) && (this.mTemperature < (maxProgresstime() - 250))) {
- Utils.LOG_INFO("Current Heat:" + this.mTemperature + "/" + (maxProgresstime() - 250)
+ Logger.INFO("Current Heat:" + this.mTemperature + "/" + (maxProgresstime() - 250)
+ " Burning fuel because not yet at a suitable temp.");
useInputFuelItem(aBaseMetaTileEntity, fuelSlot);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
index b9fd375fdd..086b8d291f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
@@ -2,17 +2,13 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
+import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
+import gregtech.api.util.*;
import gtPlusPlus.core.lib.CORE;
import net.minecraft.item.ItemStack;
@@ -38,10 +34,12 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
onConfigLoad();
}
+ @Override
public int getPollution() {
return (int) (2.0D * Math.pow(2.0D, this.mTier));
}
+ @Override
public int getCapacity() {
return 8000;
}
@@ -51,10 +49,12 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
"SemiFluidGenerator.efficiency.tier." + this.mTier, 100 - (this.mTier * 10));
}
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_SemiFluidGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
return GT_Recipe.GT_Recipe_Map.sDenseLiquidFuels;
}
@@ -64,14 +64,17 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
return new String[]{this.mDescription, "Produces "+(this.getPollution()*20)+" pollution/sec", "Fuel Efficiency: "+this.getEfficiency() + "%", CORE.GT_Tooltip};
}
+ @Override
public int getEfficiency() {
return this.mEfficiency;
}
+ @Override
public boolean isOutputFacing(byte aSide) {
return (aSide == getBaseMetaTileEntity().getFrontFacing());
}
+ @Override
public int getFuelValue(ItemStack aStack) {
if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null))
return 0;
@@ -82,53 +85,63 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
return rValue;
}
+ @Override
public ITexture[] getFront(byte aColor) {
return new ITexture[] { super.getFront(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
+ @Override
public ITexture[] getBack(byte aColor) {
return new ITexture[] { super.getBack(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK) };
}
+ @Override
public ITexture[] getBottom(byte aColor) {
return new ITexture[] { super.getBottom(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM) };
}
+ @Override
public ITexture[] getTop(byte aColor) {
return new ITexture[] { super.getTop(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP) };
}
+ @Override
public ITexture[] getSides(byte aColor) {
return new ITexture[] { super.getSides(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE) };
}
+ @Override
public ITexture[] getFrontActive(byte aColor) {
return new ITexture[] { super.getFrontActive(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_FRONT_ACTIVE),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier] };
}
+ @Override
public ITexture[] getBackActive(byte aColor) {
return new ITexture[] { super.getBackActive(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE) };
}
+ @Override
public ITexture[] getBottomActive(byte aColor) {
return new ITexture[] { super.getBottomActive(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE) };
}
+ @Override
public ITexture[] getTopActive(byte aColor) {
return new ITexture[] { super.getTopActive(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE) };
}
+ @Override
public ITexture[] getSidesActive(byte aColor) {
return new ITexture[] { super.getSidesActive(aColor)[0],
new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE) };
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
index a268ade81e..2f1daa4bdf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
@@ -9,7 +9,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SolarGenerator;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_SolarGenerator;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaSolarGenerator;
@@ -70,7 +70,7 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
if ((aTick % 10L) == 0L) {
- Utils.LOG_WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU()));
+ Logger.WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU()));
if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) &&
(!aBaseMetaTileEntity.getWorld().isThundering()) &&
@@ -80,13 +80,13 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
}
if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && ((aTick % 32L) == 0L)) {
- Utils.LOG_WARNING("Adding Solar Charge. Currently "+this.mSolarCharge);
+ Logger.WARNING("Adding Solar Charge. Currently "+this.mSolarCharge);
this.mProcessingEnergy -= 1;
this.mSolarCharge += 1;
}
if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 64L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- Utils.LOG_WARNING("Adding Processing Energy. Currently "+this.mProcessingEnergy);
+ Logger.WARNING("Adding Processing Energy. Currently "+this.mProcessingEnergy);
final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
index cb97771901..fd17c1d663 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
@@ -7,9 +7,9 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -334,22 +334,22 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
this.mNewTier = mTier2;
//ReflectionUtils.setFinalStatic(mTier2, GT_Values.V[0]);
} catch (Exception e) {
- Utils.LOG_INFO("Failed setting mTier.");
+ Logger.INFO("Failed setting mTier.");
e.printStackTrace();
}
this.mTicksToBurnFor = getTotalEUGenerated(convertDaysToTicks(tFuel.mSpecialValue), voltage);
if (mTicksToBurnFor >= Integer.MAX_VALUE){
mTicksToBurnFor = Integer.MAX_VALUE;
- Utils.LOG_INFO("Fuel went over Int limit, setting to MAX_VALUE.");
+ Logger.INFO("Fuel went over Int limit, setting to MAX_VALUE.");
}
this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor/20/60/3);
- Utils.LOG_INFO("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L));
+ Logger.INFO("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L));
return (int) (mTicksToBurnFor * getEfficiency() / 100L);
//return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L);
//return tFuel.mEUt;
}
- Utils.LOG_INFO("Not sure");
+ Logger.INFO("Not sure");
return 0;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
index e0f94036a7..da3b8aa551 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
@@ -13,8 +13,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -213,8 +213,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash");
+ Logger.ERROR(e.getMessage());
}
}
@@ -236,8 +236,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash");
+ Logger.ERROR(e.getMessage());
}
}
@@ -316,8 +316,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
tBlock.updateTick(pWorld, pX, pY, pZ, pRnd);
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash");
+ Logger.ERROR(e.getMessage());
}
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
index 69892ea995..b99ce19031 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
@@ -12,10 +12,10 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.general.ItemAirFilter;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.basic.CONTAINER_PollutionCleaner;
import gtPlusPlus.xmod.gregtech.api.gui.basic.GUI_PollutionCleaner;
@@ -158,7 +158,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Use a Turbine
if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){
- Utils.LOG_WARNING("Found Turbine.");
+ Logger.WARNING("Found Turbine.");
mBaseEff = (int) ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolCombatDamage(stackRotor))) * 100);
mOptimalAirFlow = (int) Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolStats(stackRotor).getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(stackRotor).mToolSpeed * 50);
@@ -168,8 +168,8 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Utils.LOG_WARNING("Pollution Cleaner [5]");
//Log Debug information.
- Utils.LOG_WARNING("mBaseEff[1]:"+mBaseEff);
- Utils.LOG_WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow);
+ Logger.WARNING("mBaseEff[1]:"+mBaseEff);
+ Logger.WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow);
//Calculate The Voltage we are running
long tVoltage = maxEUInput();
@@ -182,7 +182,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//If no sides are free, how will you process the atmosphere?
if (mAirSides > 0){
mPollutionReduction += (((mTier*2)*100)*mAirSides); //Was originally *100
- Utils.LOG_WARNING("mPollutionReduction[1]:"+mPollutionReduction);
+ Logger.WARNING("mPollutionReduction[1]:"+mPollutionReduction);
//I stole this code
mPollutionReduction = (MathUtils.safeInt((long)mPollutionReduction*this.mBaseEff)/100000)*mAirSides;
@@ -193,7 +193,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Set a temp to remove variable to aleviate duplicate code.
int toRemove = 0;
- Utils.LOG_WARNING("mCurrentPollution[4]:"+mCurrentPollution);
+ Logger.WARNING("mCurrentPollution[4]:"+mCurrentPollution);
if (mPollutionReduction <= mCurrentPollution){
//Clean some Air.
toRemove = mPollutionReduction;
@@ -207,10 +207,10 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (toRemove > 0){
if (damageTurbineRotor() && damageAirFilter()){
removePollution(toRemove);
- Utils.LOG_WARNING("mNewPollution[4]:"+getCurrentChunkPollution());
+ Logger.WARNING("mNewPollution[4]:"+getCurrentChunkPollution());
}
else {
- Utils.LOG_WARNING("Could not damage turbine rotor or Air Filter.");
+ Logger.WARNING("Could not damage turbine rotor or Air Filter.");
aBaseMetaTileEntity.setActive(false);
}
} //End of pollution removal block.
@@ -271,16 +271,16 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
}
- Utils.LOG_WARNING("Trying to do "+damageValue+" damage to the rotor.");
+ Logger.WARNING("Trying to do "+damageValue+" damage to the rotor.");
//Damage Rotor
//int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage();
long rotorDamage = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
long rotorDurabilityMax = GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]);
long rotorDurability = (rotorDurabilityMax - rotorDamage);
- Utils.LOG_WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability);
+ Logger.WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability);
if (rotorDurability > damageValue){
- Utils.LOG_WARNING("Damaging Rotor.");
+ Logger.WARNING("Damaging Rotor.");
GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null);
long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
@@ -293,14 +293,14 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
if (rotorDurability <= 0) {
- Utils.LOG_WARNING("Destroying Rotor.");
+ Logger.WARNING("Destroying Rotor.");
this.mInventory[this.SLOT_ROTOR] = null;
return false;
}
}else {
- Utils.LOG_WARNING("Bad Rotor.");
+ Logger.WARNING("Bad Rotor.");
return false;
}
}
@@ -369,7 +369,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
else {
//Do Damage
ItemAirFilter.setFilterDamage(filter, currentUse+1);
- Utils.LOG_WARNING("Filter Damage: "+currentUse);
+ Logger.WARNING("Filter Damage: "+currentUse);
return true;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
index 77f139ccd8..d6286fb409 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
@@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.Utils;
@@ -394,7 +395,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
else {
returnValue = getCurrentChunkPollution();
}
- Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
+ Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
return returnValue;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
index 677f0342a1..53c66a0425 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
@@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.Utils;
@@ -404,7 +405,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
else {
returnValue = getCurrentChunkPollution();
}
- Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
+ Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
return returnValue;
}
@@ -434,6 +435,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
}
+ @Override
public boolean allowGeneralRedstoneOutput() {
if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){
this.markDirty();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
index dc28b6b761..f739e73c26 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
@@ -9,11 +9,9 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -147,16 +145,16 @@ GT_MetaTileEntity_DeluxeMachine {
long mFusionPoint = 20000000L;
@Override
public int checkRecipe() {
- Utils.LOG_WARNING("Recipe Tick 1.");
+ Logger.WARNING("Recipe Tick 1.");
if (!this.mCanProcessRecipe) {
- Utils.LOG_WARNING("Recipe Tick 1.1 - Cannot Process Recipe.");
+ Logger.WARNING("Recipe Tick 1.1 - Cannot Process Recipe.");
if (this.mChargeConsumed < mFusionPoint) {
- Utils.LOG_WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
+ Logger.WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(
(mFusionPoint / 100), false)) {
- Utils.LOG_WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint);
+ Logger.WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
} else {
@@ -166,13 +164,13 @@ GT_MetaTileEntity_DeluxeMachine {
}
} else {
- Utils.LOG_WARNING("Recipe Tick 1.1 - Try to Process Recipe.");
+ Logger.WARNING("Recipe Tick 1.1 - Try to Process Recipe.");
if (checkRecipeMulti()) {
- Utils.LOG_WARNING("Recipe Tick 1.2 - Process Recipe was Successful.");
+ Logger.WARNING("Recipe Tick 1.2 - Process Recipe was Successful.");
return 2;
}
}
- Utils.LOG_WARNING("Recipe Tick 2. - Process Recipe failed.");
+ Logger.WARNING("Recipe Tick 2. - Process Recipe failed.");
return 0;
}
@@ -188,11 +186,11 @@ GT_MetaTileEntity_DeluxeMachine {
int tFluidList_sS = tFluidList.size();
for (int i = 0; i < tFluidList_sS - 1; i++) {
for (int j = i + 1; j < tFluidList_sS; j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i),
- (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList
- .get(i)).amount >= ((FluidStack) tFluidList
- .get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i),
+ tFluidList.get(j))) {
+ if (tFluidList
+ .get(i).amount >= tFluidList
+ .get(j).amount) {
tFluidList.remove(j--);
tFluidList_sS = tFluidList.size();
} else {
@@ -435,22 +433,22 @@ GT_MetaTileEntity_DeluxeMachine {
long aTick) {
//super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
if (mEfficiency < 0)
mEfficiency = 0;
if (mRunningOnLoad) {
- Utils.LOG_WARNING("2");
+ Logger.WARNING("2");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
checkRecipeMulti();
}
if (--mUpdate == 0 || --mStartUpCheck == 0) {
- Utils.LOG_WARNING("3");
+ Logger.WARNING("3");
mMachine = true;
}
if (mStartUpCheck < 0) {
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
if (mMachine) {
- Utils.LOG_WARNING("5");
+ Logger.WARNING("5");
if (aBaseMetaTileEntity.getStoredEU()
+ (2048 * tierOverclock()) < maxEUStore()) {
@@ -458,12 +456,12 @@ GT_MetaTileEntity_DeluxeMachine {
2048 * tierOverclock(), true);
}
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
- Utils.LOG_WARNING("6");
+ Logger.WARNING("6");
stopMachine();
this.mLastRecipe = null;
}
if (mMaxProgresstime > 0) {
- Utils.LOG_WARNING("7");
+ Logger.WARNING("7");
this.getBaseMetaTileEntity()
.decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
@@ -485,21 +483,21 @@ GT_MetaTileEntity_DeluxeMachine {
checkRecipeMulti();
}
} else {
- Utils.LOG_WARNING("8");
+ Logger.WARNING("8");
if (aTick % 100 == 0
|| aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity
.hasInventoryBeenModified()) {
- Utils.LOG_WARNING("9");
+ Logger.WARNING("9");
// turnCasingActive(mMaxProgresstime > 0);
if (aBaseMetaTileEntity.isAllowedToWork()) {
- Utils.LOG_WARNING("10");
+ Logger.WARNING("10");
this.mEUStore = (int) aBaseMetaTileEntity
.getStoredEU();
if (checkRecipeMulti()) {
- Utils.LOG_WARNING("11");
+ Logger.WARNING("11");
if (this.mEUStore < this.mLastRecipe.mSpecialValue) {
- Utils.LOG_WARNING("12");
+ Logger.WARNING("12");
mMaxProgresstime = 0;
// turnCasingActive(false);
}
@@ -515,12 +513,12 @@ GT_MetaTileEntity_DeluxeMachine {
}
} else {
// turnCasingActive(false);
- Utils.LOG_WARNING("Bad");
+ Logger.WARNING("Bad");
this.mLastRecipe = null;
stopMachine();
}
}
- Utils.LOG_WARNING("Good");
+ Logger.WARNING("Good");
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -605,19 +603,16 @@ GT_MetaTileEntity_DeluxeMachine {
@Override
public int fill(FluidStack aFluid, boolean doFill) {
- // TODO Auto-generated method stub
return super.fill(aFluid, doFill);
}
@Override
public FluidStack drain(int maxDrain, boolean doDrain) {
- // TODO Auto-generated method stub
return super.drain(maxDrain, doDrain);
}
@Override
public int getTankPressure() {
- // TODO Auto-generated method stub
return 500;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java
index 3dee1df0f0..777310ef0f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java
@@ -13,10 +13,10 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.ArrayUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.nbt.NBTUtils;
@@ -178,12 +178,12 @@ extends GT_MetaTileEntity_MultiBlockBase
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(28))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_WARNING("Bad Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) .getLocalizedName());
- Utils.LOG_WARNING("Block Found at x:"+(aBaseMetaTileEntity.getXCoord()+xDir+i)+" | y:"+(aBaseMetaTileEntity.getYCoord()+h)+" | z:"+(aBaseMetaTileEntity.getZCoord()+zDir+j));
+ Logger.WARNING("Bad Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) .getLocalizedName());
+ Logger.WARNING("Block Found at x:"+(aBaseMetaTileEntity.getXCoord()+xDir+i)+" | y:"+(aBaseMetaTileEntity.getYCoord()+h)+" | z:"+(aBaseMetaTileEntity.getZCoord()+zDir+j));
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_WARNING("Bad Meta.");
+ Logger.WARNING("Bad Meta.");
return false;
}
++tAmount;
@@ -197,8 +197,8 @@ extends GT_MetaTileEntity_MultiBlockBase
(this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0) ||
(this.mMufflerHatches.size() != 1) || (this.mMaintenanceHatches.size() != 1) ||
(this.mEnergyHatches.size() == 0)){
- Utils.LOG_WARNING("Wrong Hatch count.");
- Utils.LOG_WARNING("|"+this.mInputHatches.size()+
+ Logger.WARNING("Wrong Hatch count.");
+ Logger.WARNING("|"+this.mInputHatches.size()+
"|"+this.mOutputHatches.size()+
"|"+this.mInputBusses.size()+
"|"+this.mOutputBusses.size()+
@@ -394,7 +394,7 @@ extends GT_MetaTileEntity_MultiBlockBase
}
//Return if no input hatch set.
if (craftingInput == null){
- Utils.LOG_WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV].");
+ Logger.WARNING("Cannot do Auto-Crafting without a 9-slot Input Bus [MV].");
return false;
}
@@ -458,7 +458,7 @@ extends GT_MetaTileEntity_MultiBlockBase
this.mEUt = 8 * (1 << this.mTier - 1) * (1 << this.mTier - 1);
this.mMaxProgresstime = MathUtils.roundToClosestInt((50-(5*MathUtils.randDouble(((this.mTier-2) <= 0 ? 1 : (this.mTier-2)), this.mTier))));
- Utils.LOG_WARNING("MPT: "+mMaxProgresstime+" | "+mEUt);
+ Logger.WARNING("MPT: "+mMaxProgresstime+" | "+mEUt);
this.getBaseMetaTileEntity().setActive(true);
//Setup some vars
@@ -494,7 +494,7 @@ extends GT_MetaTileEntity_MultiBlockBase
mCorrectInputs++;
}
else {
- Utils.LOG_WARNING("Input in Slot "+mCorrectInputs+" was not valid.");
+ Logger.WARNING("Input in Slot "+mCorrectInputs+" was not valid.");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java
index f7940e3d68..98f3d92980 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_ThermalBoiler.java
@@ -7,10 +7,10 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.general.ItemLavaFilter;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -55,7 +55,7 @@ extends GT_MetaTileEntity_MultiBlockBase
@Override
public int getDamageToComponent(ItemStack aStack){
- Utils.LOG_INFO("Trying to damage component.");
+ Logger.INFO("Trying to damage component.");
return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
index cc8f25869c..c95a91a724 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
@@ -13,12 +13,12 @@ import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ELEMENT;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
@@ -166,12 +166,12 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
//If not a hatch, continue, else add hatch and continue.
if ((!this.addMufflerToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(12))) && (!this.addDynamoToMachineList(tTileEntity, TAE.GTPP_INDEX(12)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing.");
+ Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing.");
return false;
}
}
@@ -183,7 +183,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
// Reactor Inner 5x5
//if ((i != -1 && i != 1) && (j != -1 && j != 1)) {
if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
- Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
+ Logger.INFO("Make sure the inner 3x3 of the Multiblock is Air.");
return false;
}
@@ -211,13 +211,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
//Deal with all 4 sides (Reactor walls)
if ((h == 1) || (h == 2)) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Reactor Shielding Missing from somewhere in the second layer.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Reactor Shielding Missing from somewhere in the second layer.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) {
- Utils.LOG_INFO("Reactor Shielding Missing from somewhere in the second layer.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Reactor Shielding Missing from somewhere in the second layer.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
}
@@ -228,13 +228,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) {
- Utils.LOG_INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h);
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Hastelloy-N Reactor Casing(s) Missing from one of the edges on the top layer. "+h);
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
if (h ==0){
if (tTileEntity instanceof GregtechMTE_NuclearReactor){
@@ -256,8 +256,8 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (this.mDynamoHatches != null) {
for (int i = 0; i < this.mDynamoHatches.size(); i++) {
if (this.mDynamoHatches.get(i).mTier < 5){
- Utils.LOG_INFO("You require at LEAST IV tier Dynamo Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO("You require at LEAST IV tier Dynamo Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
return false;
}
}
@@ -266,9 +266,9 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
for (int i = 0; i < this.mOutputHatches.size(); i++) {
if ((this.mOutputHatches.get(i).mTier < 5) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
- Utils.LOG_INFO("You require at LEAST IV tier Output Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.INFO("You require at LEAST IV tier Output Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
@@ -276,31 +276,31 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (this.mInputHatches != null) {
for (int i = 0; i < this.mInputHatches.size(); i++) {
if (this.mInputHatches.get(i).mTier < 5){
- Utils.LOG_INFO("You require at LEAST IV tier Input Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.INFO("You require at LEAST IV tier Input Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
}
if (this.mMufflerHatches.size() != 4){
- Utils.LOG_INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size());
+ Logger.INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size());
return false;
}
if (this.mInputHatches.size() < 4){
- Utils.LOG_INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size());
+ Logger.INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size());
return false;
}
if (this.mOutputHatches.size() < 10){
- Utils.LOG_INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size());
+ Logger.INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size());
return false;
}
if (this.mDynamoHatches.size() != 4){
- Utils.LOG_INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size());
+ Logger.INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size());
return false;
}
if (this.mMaintenanceHatches.size() != 2){
- Utils.LOG_INFO("You require EXACTLY 2 muffler hatches. TWO. You have "+this.mMaintenanceHatches.size());
+ Logger.INFO("You require EXACTLY 2 muffler hatches. TWO. You have "+this.mMaintenanceHatches.size());
return false;
}
this.mWrench = true;
@@ -310,7 +310,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
this.mSolderingTool = true;
this.mCrowbar = true;
this.turnCasingActive(false);
- Utils.LOG_INFO("Multiblock Formed.");
+ Logger.INFO("Multiblock Formed.");
return true;
}
@@ -385,15 +385,15 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
final ArrayList<FluidStack> tFluids = this.getStoredFluids();
final Collection<GT_Recipe> tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mRecipeList;
if((tFluids.size() > 0) && (tRecipeList != null)) { //Does input hatch have a LFTR fuel?
- Utils.LOG_WARNING("Found more than one input fluid and a list of valid recipes.");
+ Logger.WARNING("Found more than one input fluid and a list of valid recipes.");
for (final FluidStack hatchFluid1 : tFluids) { //Loops through hatches
- Utils.LOG_WARNING("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName());
+ Logger.WARNING("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName());
for(final GT_Recipe aFuel : tRecipeList) { //Loops through LFTR fuel recipes
- Utils.LOG_WARNING("Looping through Recipes. "+aFuel.mSpecialValue);
+ Logger.WARNING("Looping through Recipes. "+aFuel.mSpecialValue);
FluidStack tLiquid;
final FluidStack testStack = aFuel.mFluidInputs[1];
if ((tLiquid = testStack) != null) { //Create fluidstack from current recipe
- Utils.LOG_WARNING("Creating a fluidstack from the current recipe. "+testStack.getLocalizedName());
+ Logger.WARNING("Creating a fluidstack from the current recipe. "+testStack.getLocalizedName());
if (hatchFluid1.isFluidEqual(tLiquid)) { //Has a LFTR fluid
this.fuelConsumption = this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048); //Calc fuel consumption
@@ -409,37 +409,37 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(2))){
FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
+ Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
if(this.depleteInput(depletionStack)) { //Deplete that amount
- Utils.LOG_WARNING("Depleted some FLiBe fluid");
+ Logger.WARNING("Depleted some FLiBe fluid");
}
this.depleteInput(NUCLIDE.LiFBeF2ThF4UF4.getFluid(this.boostEu ? 2 : 1));
- Utils.LOG_WARNING("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid");
+ Logger.WARNING("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid");
}
//1/2 as Efficient
if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(4))){
FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
+ Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
if(this.depleteInput(depletionStack)) { //Deplete that amount
- Utils.LOG_WARNING("Depleted some FLiBe fluid");
+ Logger.WARNING("Depleted some FLiBe fluid");
}
this.depleteInput(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(this.boostEu ? 4 : 2));
- Utils.LOG_WARNING("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid");
+ Logger.WARNING("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid");
}
//10x less Efficient.
if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(20))) {
FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Utils.LOG_WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
+ Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
if(this.depleteInput(depletionStack)) { //Deplete that amount
- Utils.LOG_WARNING("Depleted some FLiBe fluid");
+ Logger.WARNING("Depleted some FLiBe fluid");
}
this.depleteInput(NUCLIDE.LiFBeF2ZrF4U235.getFluid(this.boostEu ? 20 : 10));
- Utils.LOG_WARNING("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid");
+ Logger.WARNING("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid");
}
}
} else {
@@ -452,7 +452,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (this.depleteInput(Materials.Helium.getGas(1000L))){
//Make an empty fluid stack for possible sparging output
FluidStack[] spargeOutput = new FluidStack[]{};
- Utils.LOG_WARNING("Doing a Sparge with Helium - "+this.heliumSparging);
+ Logger.WARNING("Doing a Sparge with Helium - "+this.heliumSparging);
this.heliumSparging = false;
spargeOutput = this.getByproductsOfSparge(Materials.Helium.getGas(1000L));
@@ -460,7 +460,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
try {
if (spargeOutput.length >= 1){
for (final FluidStack F : spargeOutput){
- Utils.LOG_WARNING("Adding Sparge Output - "+F.getLocalizedName());
+ Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName());
this.addOutput(F);
}
}
@@ -472,13 +472,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (this.depleteInput(Materials.Fluorine.getGas(100L))){
//Make an empty fluid stack for possible sparging output
FluidStack[] spargeOutput = new FluidStack[]{};
- Utils.LOG_WARNING("Doing a Sparge with Fluorine");
+ Logger.WARNING("Doing a Sparge with Fluorine");
spargeOutput = this.getByproductsOfSparge(Materials.Fluorine.getGas(100L));
this.heliumSparging = true;
//If Sparging occurred, try add the outputs to the output hatches.
if (spargeOutput.length > 0){
for (final FluidStack F : spargeOutput){
- Utils.LOG_WARNING("Adding Sparge Output - "+F.getLocalizedName());
+ Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName());
this.addOutput(F);
}
}
@@ -504,10 +504,10 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
else if (this.mEfficiency > 500){
this.mEfficiency = 500;
}
- Utils.LOG_WARNING("Efficiency == "+this.mEfficiency);
+ Logger.WARNING("Efficiency == "+this.mEfficiency);
this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196)); //Output 0 if startup is less than 20%
- Utils.LOG_WARNING("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency);
+ Logger.WARNING("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency);
this.mProgresstime = 1;
this.mMaxProgresstime = 1;
@@ -586,7 +586,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
MathUtils.roundToClosestInt(MathUtils.randInt(10, 100)/10)
};
final int heliumContent = (1000-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]-outputChances[4]);
- Utils.LOG_WARNING("Helium remaining: "+heliumContent);
+ Logger.WARNING("Helium remaining: "+heliumContent);
outputArrayOfGases = new FluidStack[]{
ELEMENT.getInstance().XENON.getFluid(outputChances[0]),
ELEMENT.getInstance().NEON.getFluid(outputChances[1]),
@@ -604,7 +604,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10)
};
final int fluorineContent = (100-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]);
- Utils.LOG_WARNING("Fluorine remaining: "+fluorineContent);
+ Logger.WARNING("Fluorine remaining: "+fluorineContent);
outputArrayOfGases = new FluidStack[]{
FLUORIDES.LITHIUM_FLUORIDE.getFluid(outputChances[0]),
FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid(outputChances[1]),
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
index d55912badc..da83b3c3d1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
@@ -13,8 +13,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachi
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.forestry.trees.TreefarmManager;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
@@ -111,7 +111,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Utils.LOG_INFO("Working");
+ Logger.INFO("Working");
/*if (!checkRecursiveBlocks()) {
this.mEfficiency = 0;
this.mEfficiencyIncrease = 0;
@@ -145,28 +145,28 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
//this.mCasings.clear();
- Utils.LOG_INFO("Step 1");
+ Logger.INFO("Step 1");
final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
- Utils.LOG_INFO("Step 2");
+ Logger.INFO("Step 2");
for (int j = -7; j <= 7; j++) {
- Utils.LOG_INFO("Step 3");
+ Logger.INFO("Step 3");
for (int h = 0; h <= 1; h++) {
- Utils.LOG_INFO("Step 4");
+ Logger.INFO("Step 4");
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
//Farm Floor inner 14x14
if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
- Utils.LOG_INFO("Step 5 - H:"+h);
+ Logger.INFO("Step 5 - H:"+h);
// Farm Dirt Floor and Inner Air/Log space.
if (h == 0) {
//Dirt Floor
if (!TreefarmManager.isDirtBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
- Utils.LOG_INFO("Dirt like block missing from inner 14x14.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Dirt like block missing from inner 14x14.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
aBaseMetaTileEntity.getWorld().setBlock(
(aBaseMetaTileEntity.getXCoord()+(xDir+i)),
(aBaseMetaTileEntity.getYCoord()+(h)),
@@ -189,12 +189,12 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
}
//Dealt with inner 5x5, now deal with the exterior.
else {
- Utils.LOG_INFO("Step 6 - H:"+h);
+ Logger.INFO("Step 6 - H:"+h);
//Deal with all 4 sides (Fenced area)
if (h == 1) {
if (!TreefarmManager.isFenceBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
- Utils.LOG_INFO("Fence/Gate missing from outside the second layer.");
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Fence/Gate missing from outside the second layer.");
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
}
@@ -209,31 +209,31 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (!(aBaseMetaTileEntity.getMetaTileID() != 752)) {
- Utils.LOG_INFO("Fark Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.INFO("Fark Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
+ Logger.INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
- Utils.LOG_INFO("Found a farm keeper.");
+ Logger.INFO("Found a farm keeper.");
}
}
}
- Utils.LOG_INFO("Step a");
+ Logger.INFO("Step a");
}
- Utils.LOG_INFO("Step b");
+ Logger.INFO("Step b");
}
- Utils.LOG_INFO("Step c");
+ Logger.INFO("Step c");
}
- Utils.LOG_INFO("Step d");
+ Logger.INFO("Step d");
}
- Utils.LOG_INFO("Step 7");
+ Logger.INFO("Step 7");
//Must have at least one energy hatch.
if (this.mEnergyHatches != null) {
for (int i = 0; i < this.mEnergyHatches.size(); i++) {
if (this.mEnergyHatches.get(i).mTier < 2){
- Utils.LOG_INFO("You require at LEAST MV tier Energy Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO("You require at LEAST MV tier Energy Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
return false;
}
}
@@ -243,9 +243,9 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
for (int i = 0; i < this.mOutputHatches.size(); i++) {
if ((this.mOutputHatches.get(i).mTier < 2) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
- Utils.LOG_INFO("You require at LEAST MV tier Output Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.INFO("You require at LEAST MV tier Output Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
@@ -254,16 +254,16 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
if (this.mInputHatches != null) {
for (int i = 0; i < this.mInputHatches.size(); i++) {
if (this.mInputHatches.get(i).mTier < 2){
- Utils.LOG_INFO("You require at LEAST MV tier Input Hatches.");
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.INFO("You require at LEAST MV tier Input Hatches.");
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
}
this.mSolderingTool = true;
//turnCasingActive(true);
- Utils.LOG_INFO("Multiblock Formed.");
+ Logger.INFO("Multiblock Formed.");
return true;
}
@@ -326,7 +326,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
//System.out.println("After: "+cv.mTextures.hashCode());
return cv;
} catch (final NoSuchFieldException e) {
- Utils.LOG_INFO("Could not find mTextures.");
+ Logger.INFO("Could not find mTextures.");
return casing;
}
} catch (SecurityException | IllegalArgumentException | IllegalAccessException e) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java
index a6b3944a06..12329c875f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityGeneratorArray.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.*;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -9,18 +11,13 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBlockBase {
@@ -34,10 +31,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
super(aName);
}
+ @Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityGeneratorArray(this.mName);
}
+ @Override
public String[] getDescription() {
return new String[]{
"Controller Block for the Generator Array",
@@ -51,6 +50,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
"Place up to 16 Single Block GT Generators into the Controller Inventory"};
}
+ @Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[48], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
@@ -58,10 +58,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[48]};
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png");
}
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
if (mInventory[1] == null) return null;
String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt\\.blockmachines\\.basicgenerator\\.", "");
@@ -93,6 +95,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
return null;
}
+ @Override
public boolean isCorrectMachinePart(ItemStack aStack) {
if (aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.")) {
return true;
@@ -100,11 +103,13 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
return false;
}
+ @Override
public boolean isFacingValid(byte aFacing) {
return aFacing > 1;
}
public String mMachine = "";
+ @Override
public boolean checkRecipe(ItemStack aStack) {
if (!isCorrectMachinePart(mInventory[1])) {
return false;
@@ -138,17 +143,17 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
if(!mMachine.equals(mInventory[1].getUnlocalizedName()))mLastRecipe=null;
mMachine = mInventory[1].getUnlocalizedName();
- Utils.LOG_WARNING("mMachine: "+mMachine);
+ Logger.WARNING("mMachine: "+mMachine);
ArrayList<FluidStack> tFluids = getStoredFluids();
Collection<GT_Recipe> tRecipeList = this.getRecipeMap().mRecipeList;
- Utils.LOG_WARNING("tRecipeList: "+tRecipeList);
+ Logger.WARNING("tRecipeList: "+tRecipeList);
if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel?
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches
- Utils.LOG_WARNING("2");
+ Logger.WARNING("2");
for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes
- Utils.LOG_WARNING("3");
+ Logger.WARNING("3");
/*if (aFuel != null){
for (FluidStack x : aFuel.mFluidInputs){
if (x != null){
@@ -158,12 +163,12 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
}*/
FluidStack tLiquid;
tLiquid = FluidUtils.getFluidStack(aFuel.mFluidInputs[0], aFuel.mFluidInputs[0].amount);
- Utils.LOG_WARNING("5");
+ Logger.WARNING("5");
fuelConsumption = aFuel.mFluidInputs[0].amount;
if(depleteInput(tLiquid)) { //Deplete that amount
- Utils.LOG_WARNING("6");
+ Logger.WARNING("6");
boostEu = true;
- Utils.LOG_WARNING("7");
+ Logger.WARNING("7");
fuelValue = aFuel.mEUt*aFuel.mDuration;
fuelRemaining = hatchFluid1.amount; //Record available fuel
@@ -171,7 +176,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
//this.mProgresstime = 1;
this.mMaxProgresstime = 20;
this.mEfficiencyIncrease = 9500;
- Utils.LOG_WARNING("9");
+ Logger.WARNING("9");
return true;
}
}
@@ -190,6 +195,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
return list.toArray(new ItemStack[list.size()]);
}
+ @Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
@@ -218,22 +224,27 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
return tAmount >= 16;
}
+ @Override
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
+ @Override
public int getPollutionPerTick(ItemStack aStack) {
return 0;
}
+ @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
+ @Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
+ @Override
public int getAmountOfOutputs() {
return 1;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
index eccc96c253..e349ae1f53 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
@@ -15,32 +15,26 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.metatileentity.MetaTileEntity;
-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_Maintenance;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.metatileentity.implementations.*;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
+import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.players.FakeFarmer;
import gtPlusPlus.core.slots.SlotBuzzSaw.SAWTOOL;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.particles.BlockBreakParticles;
import gtPlusPlus.xmod.forestry.trees.TreefarmManager;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_TreeFarmer;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_TreeFarmer;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper;
import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.entity.player.*;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -48,7 +42,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
-public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlockBase {
+public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase {
/* private */ private int treeCheckTicks = 0;
/* private */ private int plantSaplingTicks = 0;
@@ -102,10 +96,10 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public void saveNBTData(final NBTTagCompound aNBT) {
-
- Utils.LOG_INFO("Called NBT data save");
+
+ Logger.WARNING("Called NBT data save");
aNBT.setLong("mInternalPower", this.mInternalPower);
-
+
//Save [Buzz]Saw
final NBTTagList list = new NBTTagList();
for(int i = 0;i<2;i++){
@@ -114,19 +108,19 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
final NBTTagCompound data = new NBTTagCompound();
stack.writeToNBT(data);
data.setInteger("Slot", i);
- Utils.LOG_INFO("Saving "+stack.getDisplayName()+" in slot "+i);
+ Logger.WARNING("Saving "+stack.getDisplayName()+" in slot "+i);
list.appendTag(data);
}
}
aNBT.setTag("Items", list);
-
+
super.saveNBTData(aNBT);
}
@Override
public void loadNBTData(final NBTTagCompound aNBT) {
this.mInternalPower = aNBT.getLong("mInternalPower");
-
+
//Load [Buzz]Saw
final NBTTagList list = aNBT.getTagList("Items", 10);
for(int i = 0;i<list.tagCount();i++){
@@ -134,10 +128,10 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
final int slot = data.getInteger("Slot");
if((slot >= 0) && (slot < 2)){
this.mInventory[slot] = ItemStack.loadItemStackFromNBT(data);
- Utils.LOG_INFO("Loading "+this.mInventory[slot].getDisplayName()+" in slot "+i);
+ Logger.WARNING("Loading "+this.mInventory[slot].getDisplayName()+" in slot "+i);
}
}
-
+
super.loadNBTData(aNBT);
}
@@ -145,7 +139,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
public boolean drainEnergyInput(final long aEU) {
if (this.mInternalPower >= 32){
this.mInternalPower = (this.mInternalPower-32);
- Utils.LOG_MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower);
+ Logger.MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower);
return true;}
return false;
}
@@ -165,7 +159,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
else {
- Utils.LOG_MACHINE_INFO("Bad Power hatch to obtain energy from.");
+ Logger.MACHINE_INFO("Bad Power hatch to obtain energy from.");
}
}
}
@@ -229,18 +223,18 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "TreeFarmer.png");
+ return new GUI_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "TreeFarmer.png");
}
@Override
public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
- return new CONTAINER_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity);
+ return new CONTAINER_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity);
}
@Override
public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide() || aBaseMetaTileEntity.getWorld().isRemote) {
- Utils.LOG_INFO("Doing nothing Client Side.");
+ Logger.WARNING("Doing nothing Client Side.");
return false;
}
aBaseMetaTileEntity.openGUI(aPlayer);
@@ -251,22 +245,15 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
public boolean isCorrectMachinePart(final ItemStack aStack) {
boolean isValid = false;
final SAWTOOL currentInputItem = TreeFarmHelper.isCorrectMachinePart(aStack);
- if (currentInputItem != SAWTOOL.NONE){
- if (currentInputItem == SAWTOOL.SAW){
- }
- else {
- }
+ if (currentInputItem != SAWTOOL.NONE){
isValid = true;
}
- else {
- //Utils.LOG_MACHINE_INFO("Found "+aStack.getDisplayName());
- }
return isValid;
}
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Utils.LOG_MACHINE_INFO("Working");
+ Logger.MACHINE_INFO("Working");
this.mEfficiency = 0;
this.mEfficiencyIncrease = 0;
this.mMaxProgresstime = 0;
@@ -275,54 +262,55 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- Utils.LOG_WARNING("Step 1");
+ Logger.WARNING("Step 1");
final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
- Utils.LOG_WARNING("Step 2");
+ Logger.WARNING("Step 2");
for (int j = -7; j <= 7; j++) {
- Utils.LOG_WARNING("Step 3");
+ Logger.WARNING("Step 3");
for (int h = 0; h <= 1; h++) {
- Utils.LOG_WARNING("Step 4");
+ Logger.WARNING("Step 4");
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
//Farm Floor inner 14x14
if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
- Utils.LOG_WARNING("Step 5 - H:"+h);
+ Logger.WARNING("Step 5 - H:"+h);
// Farm Dirt Floor and Inner Air/Log space.
if (h == 0) {
//Dirt Floor
if (!TreefarmManager.isDirtBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
- Utils.LOG_MACHINE_INFO("Dirt like block missing from inner 14x14.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Dirt like block missing from inner 14x14.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
}
}
//Dealt with inner 5x5, now deal with the exterior.
else {
- Utils.LOG_WARNING("Step 6 - H:"+h);
+ Logger.WARNING("Step 6 - H:"+h);
//Deal with all 4 sides (Fenced area)
if (h == 1) {
if (!TreefarmManager.isFenceBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
- Utils.LOG_MACHINE_INFO("Fence/Gate missing from outside the second layer.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Fence/Gate missing from outside the second layer.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
}
//Deal with Bottom edges (Add Hatches/Busses first, othercheck make sure it's dirt) //TODO change the casings to not dirt~?
else if (h == 0) {
- if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX)))) {
- if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
-
- if (tTileEntity.getMetaTileID() != 752) {
- Utils.LOG_MACHINE_INFO("Farm Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" "+tTileEntity.getMetaTileID());
- return false;
+ if (tTileEntity != null)
+ if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(TEX_INDEX)))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
+
+ if (tTileEntity.getMetaTileID() != 752) {
+ Logger.MACHINE_INFO("Farm Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" "+tTileEntity.getMetaTileID());
+ return false;
+ }
+ Logger.WARNING("Found a farm keeper.");
}
- Utils.LOG_WARNING("Found a farm keeper.");
}
- }
}
}
}
@@ -333,8 +321,8 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (this.mEnergyHatches != null) {
for (int i = 0; i < this.mEnergyHatches.size(); i++) {
if (this.mEnergyHatches.get(i).mTier < 2){
- Utils.LOG_MACHINE_INFO("You require at LEAST MV tier Energy Hatches.");
- Utils.LOG_MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.MACHINE_INFO("You require at LEAST MV tier Energy Hatches.");
+ Logger.MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
return false;
}
}
@@ -344,9 +332,9 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
for (int i = 0; i < this.mOutputHatches.size(); i++) {
if ((this.mOutputHatches.get(i).mTier < 2) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
- Utils.LOG_MACHINE_INFO("You require at LEAST MV tier Output Hatches.");
- Utils.LOG_MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.MACHINE_INFO("You require at LEAST MV tier Output Hatches.");
+ Logger.MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
@@ -355,16 +343,15 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (this.mInputHatches != null) {
for (int i = 0; i < this.mInputHatches.size(); i++) {
if (this.mInputHatches.get(i).mTier < 2){
- Utils.LOG_MACHINE_INFO("You require at LEAST MV tier Input Hatches.");
- Utils.LOG_MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
- Utils.LOG_MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
+ Logger.MACHINE_INFO("You require at LEAST MV tier Input Hatches.");
+ Logger.MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
+ Logger.MACHINE_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
return false;
}
}
}
this.mSolderingTool = true;
- //turnCasingActive(true);
- //Utils.LOG_MACHINE_INFO("Multiblock Formed.");
+ Logger.MACHINE_INFO("Multiblock Formed.");
return true;
}
@@ -383,6 +370,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
return 0;//moved to cut log instead
}
+ @Override
public int getAmountOfOutputs() {
return 1;
}
@@ -421,7 +409,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
private boolean findLogs(final IGregTechTileEntity aBaseMetaTileEntity){
- Utils.LOG_MACHINE_INFO("called findLogs()");
+ Logger.MACHINE_INFO("called findLogs()");
int logsCut = 0;
boolean stopCheck = false;
final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
@@ -456,8 +444,8 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
if (stopCheck){
- Utils.LOG_MACHINE_INFO("Either found too many logs, so taking a break mid cut for lag conservation, or found no trees to cut, so stopping");
- Utils.LOG_MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+ takingBreak);
+ Logger.MACHINE_INFO("Either found too many logs, so taking a break mid cut for lag conservation, or found no trees to cut, so stopping");
+ Logger.MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+ takingBreak);
stopCheck = false;
break OUTER;
}
@@ -469,20 +457,20 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (TreefarmManager.isWoodLog(loopBlock) || TreefarmManager.isLeaves(loopBlock)){
final long tempStoredEU = this.mInternalPower;
if (tempStoredEU >= powerDrain){
- Utils.LOG_MACHINE_INFO("Cutting a "+loopBlock.getLocalizedName()+", currently stored:"+tempStoredEU+" | max:"+this.maxEUStore());
+ Logger.MACHINE_INFO("Cutting a "+loopBlock.getLocalizedName()+", currently stored:"+tempStoredEU+" | max:"+this.maxEUStore());
this.drainEnergyInput(powerDrain);
final long tempStoredEU2 = this.mInternalPower;
if (tempStoredEU != tempStoredEU2){
if (tempStoredEU == (tempStoredEU2+powerDrain)){
- Utils.LOG_MACHINE_INFO(powerDrain+"EU was drained.");
+ Logger.MACHINE_INFO(powerDrain+"EU was drained.");
}
else {
- Utils.LOG_MACHINE_INFO(""+(tempStoredEU-tempStoredEU2)+"EU was drained.");
+ Logger.MACHINE_INFO(""+(tempStoredEU-tempStoredEU2)+"EU was drained.");
}
}
else {
- Utils.LOG_MACHINE_INFO("Stored EU did not change.");
+ Logger.MACHINE_INFO("Stored EU did not change.");
}
posX = aBaseMetaTileEntity.getXCoord()+xDir+i;
@@ -494,7 +482,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
else {
- Utils.LOG_MACHINE_INFO("Not enough power to cut.");
+ Logger.MACHINE_INFO("Not enough power to cut.");
}
}
}
@@ -503,7 +491,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
else {
- Utils.LOG_MACHINE_INFO("Not enough Power | can hold:"+this.maxEUStore()+" | holding:"+aBaseMetaTileEntity.getStoredEU());
+ Logger.MACHINE_INFO("Not enough Power | can hold:"+this.maxEUStore()+" | holding:"+aBaseMetaTileEntity.getStoredEU());
}
this.canChop = false;
@@ -515,7 +503,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
private boolean growSaplingsWithBonemeal(final IGregTechTileEntity aBaseMetaTileEntity){
- Utils.LOG_MACHINE_INFO("called growSaplingsWithBonemeal()");
+ Logger.MACHINE_INFO("called growSaplingsWithBonemeal()");
int saplings = 0;
final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
@@ -538,25 +526,25 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
TreeFarmHelper.applyBonemeal(this.getFakePlayer(), aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, fertTier);
}
else {
- Utils.LOG_MACHINE_INFO("x3");
+ Logger.MACHINE_INFO("x3");
break;
}
}
else {
- Utils.LOG_MACHINE_INFO("x2");
+ Logger.MACHINE_INFO("x2");
break;
}
}
}
}
}
- Utils.LOG_MACHINE_INFO("Tried to grow saplings: | "+saplings );
+ Logger.MACHINE_INFO("Tried to grow saplings: | "+saplings );
return true;
}
@SuppressWarnings("deprecation")
private boolean plantSaplings(final IGregTechTileEntity aBaseMetaTileEntity){
- Utils.LOG_MACHINE_INFO("called plantSaplings()");
+ Logger.MACHINE_INFO("called plantSaplings()");
final World world = aBaseMetaTileEntity.getWorld();
ArrayList<ItemStack> r = this.getStoredInputs();
final int saplings = 0;
@@ -564,12 +552,12 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
int counter = 0;
if (r.size() > 0){
- Utils.LOG_MACHINE_INFO("| r was not null. "+r.size()+" |");
+ Logger.MACHINE_INFO("| r was not null. "+r.size()+" |");
if (this.getStoredInternalPower() >= 32) {
OUTER : for (final ItemStack n : r){
- Utils.LOG_MACHINE_INFO("found "+n.getDisplayName());
+ Logger.MACHINE_INFO("found "+n.getDisplayName());
if (OrePrefixes.sapling.contains(n) || n.getDisplayName().toLowerCase().contains("sapling")){
- Utils.LOG_MACHINE_INFO(""+n.getDisplayName());
+ Logger.MACHINE_INFO(""+n.getDisplayName());
counter = n.stackSize;
final Block saplingToPlace = Block.getBlockFromItem(n.getItem());
@@ -611,18 +599,18 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Test If Inputs Changed
final ArrayList<ItemStack> temp = this.getStoredInputs();
if (r != temp){
- Utils.LOG_MACHINE_INFO("Inputs changed, updating.");
+ Logger.MACHINE_INFO("Inputs changed, updating.");
for (final ItemStack xr : r){
- Utils.LOG_MACHINE_INFO("xr:"+xr.getDisplayName()+"x"+xr.stackSize);
+ Logger.MACHINE_INFO("xr:"+xr.getDisplayName()+"x"+xr.stackSize);
}
for (final ItemStack xc : temp){
- Utils.LOG_MACHINE_INFO("xc:"+xc.getDisplayName()+"x"+xc.stackSize);
+ Logger.MACHINE_INFO("xc:"+xc.getDisplayName()+"x"+xc.stackSize);
}
r = temp;
}
}
else {
- Utils.LOG_MACHINE_INFO(n.getDisplayName()+" did not have a valid block.");
+ Logger.MACHINE_INFO(n.getDisplayName()+" did not have a valid block.");
}
}
else {
@@ -640,7 +628,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
else {
- Utils.LOG_MACHINE_INFO("item was not a sapling");
+ Logger.MACHINE_INFO("item was not a sapling");
continue OUTER;
}
}
@@ -652,13 +640,13 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}*/
}
}
- Utils.LOG_MACHINE_INFO("Tried to plant saplings: | "+saplings );
+ Logger.MACHINE_INFO("Tried to plant saplings: | "+saplings );
return true;
}
@Optional.Method(modid = "Forestry")
public boolean plantSaplingAt(final ItemStack germling, final World world, final int x, final int y, final int z) {
- Utils.LOG_MACHINE_INFO("Planting Sapling with Forestry method, since it's installed.");
+ Logger.MACHINE_INFO("Planting Sapling with Forestry method, since it's installed.");
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
final IIndividual tree = GeneticsUtil.getGeneticEquivalent(germling);
if (!(tree instanceof ITree)) {
@@ -673,19 +661,20 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Utils.LOG_MACHINE_INFO("Cutting Log");
try {
//Actually damage item...
- if(!GT_ModHandler.damageOrDechargeItem(this.mInventory[1], 1, 10, this.farmerAI)){
+ if (!isToolCreative(this.mInventory[1])){
+ if(!GT_ModHandler.damageOrDechargeItem(this.mInventory[1], 1, 10, this.farmerAI)){
+ if (mInventory[1].stackSize == 0) mInventory[1] = null;
+ return false;
+ }
if (mInventory[1].stackSize == 0) mInventory[1] = null;
- return false;
}
- if (mInventory[1].stackSize == 0) mInventory[1] = null;
-
final Block block = world.getBlock(x, y, z);
int chanceForLeaves = 1000;
//is it leaves or a log? if leaves, heavily reduce chance to obtain rubber/output
if (block.getUnlocalizedName().toLowerCase().contains("leaves") || block.getUnlocalizedName().toLowerCase().contains("leaf") || TreefarmManager.isLeaves(block)){
chanceForLeaves = MathUtils.randInt(1, 10);
if (chanceForLeaves > 8) {
- Utils.LOG_MACHINE_INFO("Found some leaves that will drop, chance to drop item "+chanceForLeaves+", needed 800-1000.");
+ Logger.MACHINE_INFO("Found some leaves that will drop, chance to drop item "+chanceForLeaves+", needed 800-1000.");
}
}
@@ -696,7 +685,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
final int multiplier = MathUtils.randInt(1, 3);
if ((chanceForRubber > 7) && (chanceForLeaves > 8)){
rubberResin.stackSize = multiplier;
- Utils.LOG_MACHINE_INFO("Adding "+rubberResin.getDisplayName()+" x"+rubberResin.stackSize);
+ Logger.MACHINE_INFO("Adding "+rubberResin.getDisplayName()+" x"+rubberResin.stackSize);
this.addOutput(rubberResin);
this.updateSlots();
}
@@ -710,7 +699,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (drops != null){
for (final ItemStack outputs : drops){
if (chanceForLeaves > 8){
- Utils.LOG_MACHINE_INFO("Adding 1x "+outputs.getDisplayName());
+ Logger.MACHINE_INFO("Adding 1x "+outputs.getDisplayName());
this.addOutput(outputs);
//Update bus contents.
this.updateSlots();
@@ -755,7 +744,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
else {
- Utils.LOG_MACHINE_INFO("No fertiliser found.");
+ Logger.MACHINE_INFO("No fertiliser found.");
return false;
}
return false;
@@ -807,7 +796,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
}
}
- Utils.LOG_MACHINE_INFO("No fertiliser found.");
+ Logger.MACHINE_INFO("No fertiliser found.");
return false;
}
@@ -844,7 +833,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
return false;
}
- Utils.LOG_MACHINE_INFO("Taking one sapling away from in input bus.");
+ Logger.MACHINE_INFO("Taking one sapling away from in input bus.");
for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
tHatch.mRecipeMap = this.getRecipeMap();
@@ -950,24 +939,27 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (this.canChop){
//Set Machine State
if (this.treeCheckTicks == 200){
- Utils.LOG_MACHINE_INFO("Looking For Trees - Serverside | "+this.treeCheckTicks);
+ Logger.MACHINE_INFO("Looking For Trees - Serverside | "+this.treeCheckTicks);
//Find wood to Cut
if (validCuttingTool){
this.findLogs(aBaseMetaTileEntity);
}
else {
- Utils.LOG_MACHINE_INFO("Did not find a valid saw or Buzzsaw blade.");
+ Logger.MACHINE_INFO("Did not find a valid saw or Buzzsaw blade.");
}
}
}
else {
if (this.plantSaplingTicks == 100){
- Utils.LOG_MACHINE_INFO("Looking For space to plant saplings - Serverside | "+this.plantSaplingTicks);
+ Logger.MACHINE_INFO("Looking For space to plant saplings - Serverside | "+this.plantSaplingTicks);
//Plant Some Saplings
- this.plantSaplings(aBaseMetaTileEntity);
+
+ if (aBaseMetaTileEntity != null){
+ this.plantSaplings(aBaseMetaTileEntity);
+ }
}
else if (this.plantSaplingTicks == 200){
- Utils.LOG_MACHINE_INFO("Looking For Saplings to grow - Serverside | "+this.plantSaplingTicks);
+ Logger.MACHINE_INFO("Looking For Saplings to grow - Serverside | "+this.plantSaplingTicks);
//Try Grow some Saplings
if (this.doesInputHatchContainAnyFertiliser()){
@@ -977,19 +969,23 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Set can work state
this.mInputBusses = new ArrayList<>();
this.mEnergyHatches = new ArrayList<>();
- this.canChop = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
+ if (aBaseMetaTileEntity != null && this.mInventory[1] != null){
+ this.canChop = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
+ }
}
}
}
else {
if ((this.treeCheckTicks == 200) || (this.plantSaplingTicks == 100) || (this.plantSaplingTicks == 200)){
- Utils.LOG_MACHINE_INFO("Machine is not fully repaired, not ticking. Repair status code:"+this.getRepairStatus());
+ Logger.MACHINE_INFO("Machine is not fully repaired, not ticking. Repair status code:"+this.getRepairStatus());
}
}
//Call Cleanup Task last, before ticking.
if (this.cleanupTicks == 600){
- this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
+ if (aBaseMetaTileEntity != null && this.mInventory[1] != null){
+ this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
+ }
/*Utils.LOG_MACHINE_INFO("Looking For rubbish to cleanup - Serverside | "+this.cleanupTicks);
TreeFarmHelper.cleanUp(aBaseMetaTileEntity);*/
}
@@ -1002,7 +998,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
- //@Deprecated
+ //@Deprecated
//public static boolean damageOrDechargeItem(ItemStack aStack, int aDamage, int aDecharge, EntityLivingBase aPlayer) {
// if ((GT_Utility.isStackInvalid(aStack)) || ((aStack.getMaxStackSize() <= 1) && (aStack.stackSize > 1)))
// return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
index bdb514ba84..ebee8b2f17 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -14,9 +14,9 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -137,7 +137,7 @@ extends GregtechMeta_MultiBlockBase {
final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- Utils.LOG_WARNING("Found some Valid Inputs.");
+ Logger.WARNING("Found some Valid Inputs.");
this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
if (tRecipe.mEUt <= 16) {
@@ -160,7 +160,7 @@ extends GregtechMeta_MultiBlockBase {
return true;
}
}
- Utils.LOG_WARNING("Failed to find some Valid Inputs.");
+ Logger.WARNING("Failed to find some Valid Inputs.");
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_CatalyticReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_CatalyticReactor.java
index e13360b7c5..9c031f81d2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_CatalyticReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_CatalyticReactor.java
@@ -12,8 +12,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -178,115 +178,115 @@ public class GregtechMetaTileEntity_CatalyticReactor extends GT_MetaTileEntity_M
if ((!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(17))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(17)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.");
+ Logger.INFO("Wrong Block.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("Wrong Meta 1.");
+ Logger.INFO("Wrong Meta 1.");
return false;
}
}
else {
- Utils.LOG_INFO("Added Hatch. "+tTileEntity.getInventoryName());
+ Logger.INFO("Added Hatch. "+tTileEntity.getInventoryName());
}
}
Y = 1;
- Utils.LOG_INFO("Checking at Y+1 as well.");
+ Logger.INFO("Checking at Y+1 as well.");
final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, Y, zDir + j);
if ((!this.addToMachineList(tTileEntity2, TAE.GTPP_INDEX(17))) && (!this.addEnergyInputToMachineList(tTileEntity2, TAE.GTPP_INDEX(17)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.");
+ Logger.INFO("Wrong Block.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("Wrong Meta 1.");
+ Logger.INFO("Wrong Meta 1.");
return false;
}
}
else {
- Utils.LOG_INFO("Added Hatch. "+tTileEntity2.getInventoryName());
+ Logger.INFO("Added Hatch. "+tTileEntity2.getInventoryName());
}
}
}
for (int y = 2; y < 6; y++) {
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != ModBlocks.blockCasings2Misc) { //Must Define meta for center blocks
- Utils.LOG_INFO("Wrong Block.");
+ Logger.INFO("Wrong Block.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir) != 3) {
- Utils.LOG_INFO("Wrong Meta. 2");
+ Logger.INFO("Wrong Meta. 2");
return false;
}
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.1");
+ Logger.INFO("Wrong Block.1");
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing.");
+ Logger.INFO("Found Zeron-Casing.");
}
}
else {
- Utils.LOG_INFO("debug.1");
+ Logger.INFO("debug.1");
return false;
}
}
if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.2");
+ Logger.INFO("Wrong Block.2");
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing.");
+ Logger.INFO("Found Zeron-Casing.");
}
}
else {
- Utils.LOG_INFO("debug.2");
+ Logger.INFO("debug.2");
return false;
}
}
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.3");
+ Logger.INFO("Wrong Block.3");
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing.");
+ Logger.INFO("Found Zeron-Casing.");
}
}
else {
- Utils.LOG_INFO("debug.3");
+ Logger.INFO("debug.3");
return false;
}
}
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.4");
+ Logger.INFO("Wrong Block.4");
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing.");
+ Logger.INFO("Found Zeron-Casing.");
}
}
else {
- Utils.LOG_INFO("debug.4");
+ Logger.INFO("debug.4");
return false;
}
}
if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.5");
+ Logger.INFO("Wrong Block.5");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, y + 3, zDir) != 3) {
- Utils.LOG_INFO("Wrong Meta. 3");
+ Logger.INFO("Wrong Meta. 3");
return false;
}
}
@@ -294,15 +294,15 @@ public class GregtechMetaTileEntity_CatalyticReactor extends GT_MetaTileEntity_M
if ((this.mInputHatches.size() != 4) || (this.mOutputHatches.size() != 2) ||
(this.mOutputBusses.size() != 1) || (this.mMufflerHatches.size() != 1) ||
(this.mMaintenanceHatches.size() != 2) || (this.mEnergyHatches.size() < 1)){
- Utils.LOG_INFO("Wrong Hatch count.");
+ Logger.INFO("Wrong Hatch count.");
return false;
}
if (this.mMufflerHatches.size() == 1){
if (this.mMufflerHatches.get(0).mTier < 7){
- Utils.LOG_INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
+ Logger.INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
}
}
- Utils.LOG_INFO("Multiblock Formed.");
+ Logger.INFO("Multiblock Formed.");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
index a6fc495bab..6bda53def5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
@@ -9,22 +9,14 @@ import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
-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_Maintenance;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.metatileentity.implementations.*;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.*;
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
@@ -280,6 +272,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
}
+ @Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
}
@@ -288,9 +281,9 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
public boolean checkRecipe(ItemStack aStack) {
//Utils.LOG_INFO("Recipe Check.");
ArrayList<ItemStack> tItemList = getStoredInputs();
- ItemStack[] tItemInputs = (ItemStack[]) tItemList.toArray(new ItemStack[tItemList.size()]);
+ ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]);
ArrayList<FluidStack> tInputList = getStoredFluids();
- FluidStack[] tFluidInputs = (FluidStack[]) tInputList.toArray(new FluidStack[tInputList.size()]);
+ FluidStack[] tFluidInputs = tInputList.toArray(new FluidStack[tInputList.size()]);
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
@@ -318,11 +311,11 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
final ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length];
for (int i = 0; i < tRecipe.mOutputs.length; i++){
if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)){
- Utils.LOG_WARNING("Adding a bonus output");
+ Logger.WARNING("Adding a bonus output");
outputs[i] = tRecipe.getOutput(i);
}
else {
- Utils.LOG_WARNING("Adding null output");
+ Logger.WARNING("Adding null output");
outputs[i] = null;
}
}
@@ -441,6 +434,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
return 50;
}
+ @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
@@ -472,10 +466,12 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
return true;
}
+ @Override
public int getAmountOfOutputs() {
return 1;
}
+ @SuppressWarnings("deprecation")
public boolean turnCasingActive(final boolean status) {
if (this.mEnergyHatches != null) {
for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
index 2d621e7388..498e8ae17c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
@@ -16,9 +16,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maint
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -103,17 +103,17 @@ extends GregtechMeta_MultiBlockBase {
return false;
}*/
- Utils.LOG_WARNING("Centrifuge Debug - 1");
+ Logger.WARNING("Centrifuge Debug - 1");
final GT_Recipe.GT_Recipe_Map map = this.getRecipeMap();
if (map == null) {
- Utils.LOG_WARNING("Centrifuge Debug - False - No recipe map");
+ Logger.WARNING("Centrifuge Debug - False - No recipe map");
return false;
}
- Utils.LOG_WARNING("Centrifuge Debug - 2");
+ Logger.WARNING("Centrifuge Debug - 2");
final ArrayList<ItemStack> tInputList = this.getStoredInputs();
final long tVoltage = this.getMaxInputVoltage();
final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- Utils.LOG_WARNING("Centrifuge Debug - Tier variable: "+tTier);
+ Logger.WARNING("Centrifuge Debug - Tier variable: "+tTier);
final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]);
final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
final FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
@@ -121,41 +121,41 @@ extends GregtechMeta_MultiBlockBase {
GT_Recipe tRecipe = map.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
tRecipe = this.reduceRecipeTimeByPercentage(tRecipe, 40F);
if (tRecipe != null) {
- Utils.LOG_WARNING("Recipe was not invalid");
+ Logger.WARNING("Recipe was not invalid");
this.mLastRecipe = tRecipe;
this.mEUt = 0;
this.mOutputItems = null;
this.mOutputFluids = null;
if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
- Utils.LOG_WARNING("False: 1");
+ Logger.WARNING("False: 1");
return false;
}
this.mMaxProgresstime = tRecipe.mDuration;
this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
- Utils.LOG_WARNING("Centrifuge Debug - 2 - Max Progress Time: "+this.mMaxProgresstime);
+ Logger.WARNING("Centrifuge Debug - 2 - Max Progress Time: "+this.mMaxProgresstime);
if (tRecipe.mEUt <= 16) {
- Utils.LOG_WARNING("Centrifuge Debug - Using < 16eu/t");
+ Logger.WARNING("Centrifuge Debug - Using < 16eu/t");
this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
- Utils.LOG_WARNING("Centrifuge Debug - 3.1 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
+ Logger.WARNING("Centrifuge Debug - 3.1 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
} else {
- Utils.LOG_WARNING("Centrifuge Debug - using > 16eu/t");
+ Logger.WARNING("Centrifuge Debug - using > 16eu/t");
this.mEUt = tRecipe.mEUt;
this.mMaxProgresstime = tRecipe.mDuration;
- Utils.LOG_WARNING("Centrifuge Debug - 3.2 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
+ Logger.WARNING("Centrifuge Debug - 3.2 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
this.mEUt *= 4;
this.mMaxProgresstime /= 2;
- Utils.LOG_WARNING("Centrifuge Debug - 4 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
+ Logger.WARNING("Centrifuge Debug - 4 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
}
}
this.mEUt *= 1;
if (this.mEUt > 0) {
this.mEUt = (-this.mEUt);
- Utils.LOG_WARNING("Centrifuge Debug - 5 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
+ Logger.WARNING("Centrifuge Debug - 5 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
}
ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
for (int h = 0; h < tRecipe.mOutputs.length; h++) {
@@ -184,7 +184,7 @@ extends GregtechMeta_MultiBlockBase {
if (this.mMaxProgresstime <= 0){
this.mMaxProgresstime++;
}
- Utils.LOG_WARNING("Centrifuge Debug - 6 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
+ Logger.WARNING("Centrifuge Debug - 6 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
final List<ItemStack> overStacks = new ArrayList<>();
for (int f = 0; f < tOut.length; f++) {
if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
@@ -211,11 +211,11 @@ extends GregtechMeta_MultiBlockBase {
this.mOutputItems = tOut;
this.mOutputFluids = new FluidStack[]{tFOut};
this.updateSlots();
- Utils.LOG_WARNING("Centrifuge: True");
+ Logger.WARNING("Centrifuge: True");
return true;
}
}
- Utils.LOG_WARNING("Centrifuge: Recipe was invalid.");
+ Logger.WARNING("Centrifuge: Recipe was invalid.");
return false;
}
@@ -264,7 +264,7 @@ extends GregtechMeta_MultiBlockBase {
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getXCoord() == aBaseMetaTileEntity.getXCoord()) && (tTileEntity.getYCoord() == aBaseMetaTileEntity.getYCoord()) && (tTileEntity.getZCoord() == (aBaseMetaTileEntity.getZCoord()+2))) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
- Utils.LOG_WARNING("MAINT HATCH IN CORRECT PLACE");
+ Logger.WARNING("MAINT HATCH IN CORRECT PLACE");
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
@@ -272,7 +272,7 @@ extends GregtechMeta_MultiBlockBase {
}
}
else {
- Utils.LOG_WARNING("MAINT HATCH IN WRONG PLACE");
+ Logger.WARNING("MAINT HATCH IN WRONG PLACE");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
index acf05cfd0b..b763d424c9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
@@ -10,12 +10,10 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.entity.player.InventoryPlayer;
@@ -77,14 +75,16 @@ extends GregtechMeta_MultiBlockBase {
}
+ @Override
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(207)), 10, 1.0F, aX, aY, aZ);
}
}
- public void startProcess() {
+ @Override
+ public void startProcess() {
sendLoopStart((byte) 1);
}
@@ -131,7 +131,7 @@ extends GregtechMeta_MultiBlockBase {
final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[(byte) Math.max(1, GT_Utility.getTier(this.getMaxInputVoltage()))], tFluids, tInputs), tInputs);
- Utils.LOG_WARNING("Valid Output Hatches: "+tValidOutputSlots);
+ Logger.WARNING("Valid Output Hatches: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCuttingMachine.java
index ad1b9cc635..3b86b348ad 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCuttingMachine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCuttingMachine.java
@@ -12,9 +12,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maint
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.block.Block;
@@ -142,7 +142,7 @@ extends GregtechMeta_MultiBlockBase {
}
}
if (tAirCount != 10) {
- Utils.LOG_INFO("False 1");
+ Logger.INFO("False 1");
return false;
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
@@ -165,14 +165,14 @@ extends GregtechMeta_MultiBlockBase {
if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
- Utils.LOG_INFO("False 2");
+ Logger.INFO("False 2");
return false;
}
}
else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else {
- Utils.LOG_INFO("False 3");
+ Logger.INFO("False 3");
return false;
}
}
@@ -180,11 +180,11 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() < 0)) {
- Utils.LOG_INFO("Use Busses, Not Hatches for Input/Output.");
+ Logger.INFO("Use Busses, Not Hatches for Input/Output.");
return false;
}
if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
- Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
+ Logger.INFO("Incorrect amount of Input & Output busses.");
return false;
}
this.mMaintenanceHatches.clear();
@@ -194,19 +194,19 @@ extends GregtechMeta_MultiBlockBase {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
- Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
+ Logger.INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
}
if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
- Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
+ Logger.INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
} else {
- Utils.LOG_INFO("False 5");
+ Logger.INFO("False 5");
return false;
}
- Utils.LOG_INFO("True");
+ Logger.INFO("True");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
index c07d331dbb..2334af7cd4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
@@ -15,9 +15,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.block.Block;
@@ -117,7 +117,7 @@ extends GregtechMeta_MultiBlockBase {
final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[(byte) Math.max(1, GT_Utility.getTier(this.getMaxInputVoltage()))], tFluids, tInputs), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
+ Logger.WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
index 48d5ee7452..5154c36833 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
@@ -15,9 +15,9 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -147,7 +147,7 @@ extends GregtechMeta_MultiBlockBase {
tRecipe = this.reduceRecipeTimeByPercentage(tRecipe, 60F);
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), tRecipe, tInputs);
- Utils.LOG_WARNING("Maceration Stack - Valid Output Hatches: "+tValidOutputSlots);
+ Logger.WARNING("Maceration Stack - Valid Output Hatches: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
@@ -191,11 +191,11 @@ extends GregtechMeta_MultiBlockBase {
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(7))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(7))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(7))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(7))) && (!this.ignoreController(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Returned False 1");
+ Logger.INFO("Returned False 1");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 7) {
- Utils.LOG_INFO("Returned False 2");
+ Logger.INFO("Returned False 2");
return false;
}
tAmount++;
@@ -205,12 +205,12 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((this.mOutputHatches.size() != 0) || (this.mInputBusses.size() != 1) || (this.mOutputBusses.size() != 5)) {
- Utils.LOG_INFO("Returned False 3");
+ Logger.INFO("Returned False 3");
return false;
}
final int height = this.getBaseMetaTileEntity().getYCoord();
if (this.mInputBusses.get(0).getBaseMetaTileEntity().getYCoord() != height) {
- Utils.LOG_INFO("height: "+height+" | Returned False 4");
+ Logger.INFO("height: "+height+" | Returned False 4");
return false;
}
final GT_MetaTileEntity_Hatch_OutputBus[] tmpHatches = new GT_MetaTileEntity_Hatch_OutputBus[5];
@@ -219,7 +219,7 @@ extends GregtechMeta_MultiBlockBase {
if (tmpHatches[hatchNumber] == null) {
tmpHatches[hatchNumber] = this.mOutputBusses.get(i);
} else {
- Utils.LOG_INFO("Returned False 5");
+ Logger.INFO("Returned False 5");
return false;
}
}
@@ -270,16 +270,16 @@ extends GregtechMeta_MultiBlockBase {
for (int i = 0; (i < 256) && (j < this.mOutputItems.length); ++i) {
if (i==0) {
- Utils.LOG_WARNING("Adding the default output");
+ Logger.WARNING("Adding the default output");
this.mOutputItems[0] = tRecipe.getOutput(0);
- Utils.LOG_INFO("Ading output. "+i+" | "+tRecipe.mOutputs.length + " | "+this.mOutputItems[0].stackSize+" | "+tRecipe.getOutput(0).stackSize);
+ Logger.INFO("Ading output. "+i+" | "+tRecipe.mOutputs.length + " | "+this.mOutputItems[0].stackSize+" | "+tRecipe.getOutput(0).stackSize);
}
else if (this.getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)){
- Utils.LOG_WARNING("Adding a bonus output");
+ Logger.WARNING("Adding a bonus output");
this.mOutputItems[i] = tRecipe.getOutput(i);
}
else {
- Utils.LOG_WARNING("Adding null output");
+ Logger.WARNING("Adding null output");
this.mOutputItems[i] = null;
}
++j;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
index 05454a37c7..33c73e0a82 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
@@ -12,9 +12,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.block.Block;
@@ -110,7 +110,7 @@ extends GregtechMeta_MultiBlockBase {
final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), GT_Recipe.GT_Recipe_Map.sBenderRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[(byte) Math.max(1, GT_Utility.getTier(this.getMaxInputVoltage()))], tFluids, tInputs), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
+ Logger.WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
final long tVoltage = this.getMaxInputVoltage();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java
index d4272430de..ea6bb3eeba 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSifter.java
@@ -14,9 +14,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -117,7 +117,7 @@ extends GregtechMeta_MultiBlockBase {
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
//Get inputs.
final ArrayList<ItemStack> tInputList = this.getStoredInputs();
@@ -134,7 +134,7 @@ extends GregtechMeta_MultiBlockBase {
}
}
- Utils.LOG_WARNING("2");
+ Logger.WARNING("2");
//Temp var
final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
@@ -145,7 +145,7 @@ extends GregtechMeta_MultiBlockBase {
}
- Utils.LOG_WARNING("3");
+ Logger.WARNING("3");
//Make a recipe instance for the rest of the method.
final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
@@ -156,53 +156,53 @@ extends GregtechMeta_MultiBlockBase {
if ((this.cloneRecipe != tRecipe) || (this.cloneRecipe == null)){
this.cloneRecipe = tRecipe.copy();
- Utils.LOG_WARNING("Setting Recipe");
+ Logger.WARNING("Setting Recipe");
}
if ((this.mInputStacks != tRecipe.mInputs) || (this.mInputStacks == null)){
this.mInputStacks = tRecipe.mInputs;
- Utils.LOG_WARNING("Setting Recipe Inputs");
+ Logger.WARNING("Setting Recipe Inputs");
}
if ((this.cloneChances != tRecipe.mChances) || (this.cloneChances == null)){
this.cloneChances = tRecipe.mChances.clone();
- Utils.LOG_WARNING("Setting Chances");
+ Logger.WARNING("Setting Chances");
}
for (int r=0;r<this.cloneChances.length;r++){
- Utils.LOG_WARNING("Original map Output["+r+"] chance = "+this.cloneChances[r]);
+ Logger.WARNING("Original map Output["+r+"] chance = "+this.cloneChances[r]);
}
- Utils.LOG_WARNING("3.1");
+ Logger.WARNING("3.1");
//Change bonus chances
int[] outputChances;
- Utils.LOG_WARNING("3.2");
+ Logger.WARNING("3.2");
if (this.cloneRecipe.mChances != null){
outputChances = this.cloneRecipe.mChances.clone();
- Utils.LOG_WARNING("3.3");
+ Logger.WARNING("3.3");
for (int r=0;r<outputChances.length;r++){
- Utils.LOG_WARNING("Output["+r+"] chance = "+outputChances[r]);
+ Logger.WARNING("Output["+r+"] chance = "+outputChances[r]);
if (outputChances[r]<10000){
final int temp = outputChances[r];
if ((outputChances[r] < 8000) && (outputChances[r] >= 1)){
outputChances[r] = temp+1200;
- Utils.LOG_WARNING("Output["+r+"] chance now = "+outputChances[r]);
+ Logger.WARNING("Output["+r+"] chance now = "+outputChances[r]);
}
else if ((outputChances[r] < 9000) && (outputChances[r] >= 8000)){
outputChances[r] = temp+400;
- Utils.LOG_WARNING("Output["+r+"] chance now = "+outputChances[r]);
+ Logger.WARNING("Output["+r+"] chance now = "+outputChances[r]);
}
else if ((outputChances[r] <= 9900) && (outputChances[r] >= 9000)){
outputChances[r] = temp+100;
- Utils.LOG_WARNING("Output["+r+"] chance now = "+outputChances[r]);
+ Logger.WARNING("Output["+r+"] chance now = "+outputChances[r]);
}
}
}
- Utils.LOG_WARNING("3.4");
+ Logger.WARNING("3.4");
//Rebuff Drop Rates for % output
this.cloneRecipe.mChances = outputChances;
@@ -210,16 +210,16 @@ extends GregtechMeta_MultiBlockBase {
}
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), this.cloneRecipe, tInputs);
- Utils.LOG_WARNING("Sifter - Valid Output Hatches: "+tValidOutputSlots);
+ Logger.WARNING("Sifter - Valid Output Hatches: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
if ((this.cloneRecipe != null) && (this.cloneRecipe.isRecipeInputEqual(true, null, tInputs))) {
- Utils.LOG_WARNING("Valid Recipe found - size "+this.cloneRecipe.mOutputs.length);
+ Logger.WARNING("Valid Recipe found - size "+this.cloneRecipe.mOutputs.length);
this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
@@ -229,11 +229,11 @@ extends GregtechMeta_MultiBlockBase {
final ItemStack[] outputs = new ItemStack[this.cloneRecipe.mOutputs.length];
for (int i = 0; i < this.cloneRecipe.mOutputs.length; i++){
if (this.getBaseMetaTileEntity().getRandomNumber(7500) < this.cloneRecipe.getOutputChance(i)){
- Utils.LOG_WARNING("Adding a bonus output");
+ Logger.WARNING("Adding a bonus output");
outputs[i] = this.cloneRecipe.getOutput(i);
}
else {
- Utils.LOG_WARNING("Adding null output");
+ Logger.WARNING("Adding null output");
outputs[i] = null;
}
}
@@ -250,7 +250,7 @@ extends GregtechMeta_MultiBlockBase {
@Override
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- Utils.LOG_MACHINE_INFO("Checking structure for Industrial Sifter.");
+ Logger.MACHINE_INFO("Checking structure for Industrial Sifter.");
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
@@ -278,12 +278,12 @@ extends GregtechMeta_MultiBlockBase {
if (h != 0){
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(21))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 6) {
- Utils.LOG_MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
+ Logger.MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
return false;
}
}
@@ -291,12 +291,12 @@ extends GregtechMeta_MultiBlockBase {
else {
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(21))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 5) {
- Utils.LOG_MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
+ Logger.MACHINE_INFO("Sifter Casing(s) Missing from one of the "+sHeight+" layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
return false;
}
tAmount++;
@@ -319,13 +319,13 @@ extends GregtechMeta_MultiBlockBase {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
if ((tTileEntity instanceof GregtechMetaTileEntity_IndustrialSifter) || (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == GregTech_API.sBlockMachines)){
if (h != 0){
- Utils.LOG_MACHINE_INFO("Found a secondary controller at the wrong Y level.");
+ Logger.MACHINE_INFO("Found a secondary controller at the wrong Y level.");
return false;
}
}
else {
- Utils.LOG_MACHINE_INFO("Sifter Casings Missing from somewhere in the "+sHeight+" layer edge.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Sifter Casings Missing from somewhere in the "+sHeight+" layer edge.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
}
@@ -335,9 +335,9 @@ extends GregtechMeta_MultiBlockBase {
}
else {
- Utils.LOG_MACHINE_INFO("Sifter Casings Missing from somewhere in the "+sHeight+" layer edge.");
- Utils.LOG_MACHINE_INFO("Incorrect Meta value for block, expected 5.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j)+".");
+ Logger.MACHINE_INFO("Sifter Casings Missing from somewhere in the "+sHeight+" layer edge.");
+ Logger.MACHINE_INFO("Incorrect Meta value for block, expected 5.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j)+".");
return false;
}
}
@@ -353,11 +353,11 @@ extends GregtechMeta_MultiBlockBase {
}
if ((this.mInputBusses.size() != 1) || (this.mOutputBusses.size() != 4)
|| (this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() < 1)) {
- Utils.LOG_INFO("Returned False 3");
- Utils.LOG_INFO("Input Buses: "+this.mInputBusses.size()+" | expected: 1");
- Utils.LOG_INFO("Output Buses: "+this.mOutputBusses.size()+" | expected: 4");
- Utils.LOG_INFO("Energy Hatches: "+this.mEnergyHatches.size()+" | expected: 1");
- Utils.LOG_INFO("Maint. hatches: "+this.mMaintenanceHatches.size()+" | expected: 1");
+ Logger.INFO("Returned False 3");
+ Logger.INFO("Input Buses: "+this.mInputBusses.size()+" | expected: 1");
+ Logger.INFO("Output Buses: "+this.mOutputBusses.size()+" | expected: 4");
+ Logger.INFO("Energy Hatches: "+this.mEnergyHatches.size()+" | expected: 1");
+ Logger.INFO("Maint. hatches: "+this.mMaintenanceHatches.size()+" | expected: 1");
return false;
}
final int height = this.getBaseMetaTileEntity().getYCoord();
@@ -368,7 +368,7 @@ extends GregtechMeta_MultiBlockBase {
if (tmpHatches[i] == null) {
tmpHatches[i] = this.mOutputBusses.get(i);
} else {
- Utils.LOG_MACHINE_INFO("Returned False 5 - "+this.mOutputBusses.size());
+ Logger.MACHINE_INFO("Returned False 5 - "+this.mOutputBusses.size());
return false;
}
}
@@ -377,7 +377,7 @@ extends GregtechMeta_MultiBlockBase {
this.mOutputBusses.add(tmpHatches[i]);
}
- Utils.LOG_INFO("Industrial Sifter - Structure Built? "+(tAmount>=35));
+ Logger.INFO("Industrial Sifter - Structure Built? "+(tAmount>=35));
return tAmount >= 35;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
index 3d37db5b48..ecabdbe343 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
@@ -13,9 +13,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
@@ -132,7 +132,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
- Utils.LOG_INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
+ Logger.INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
//if (aBaseMetaTileEntity.getWorld().isRemote){
//asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
//UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN);
@@ -143,7 +143,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
}
if (tAirCount != 10) {
- Utils.LOG_INFO("False. Air != 10. Air == "+tAirCount);
+ Logger.INFO("False. Air != 10. Air == "+tAirCount);
//return false;
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
@@ -169,14 +169,14 @@ extends GT_MetaTileEntity_MultiBlockBase {
if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
- Utils.LOG_INFO("False 2");
+ Logger.INFO("False 2");
return false;
}
}
else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else {
- Utils.LOG_INFO("False 3");
+ Logger.INFO("False 3");
return false;
}
}
@@ -184,11 +184,11 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
}
if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) {
- Utils.LOG_INFO("Use Busses, Not Hatches for Input/Output.");
+ Logger.INFO("Use Busses, Not Hatches for Input/Output.");
return false;
}
if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
- Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
+ Logger.INFO("Incorrect amount of Input & Output busses.");
return false;
}
this.mMaintenanceHatches.clear();
@@ -198,19 +198,19 @@ extends GT_MetaTileEntity_MultiBlockBase {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
- Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
+ Logger.INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
}
if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
- Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
+ Logger.INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
} else {
- Utils.LOG_INFO("False 5");
+ Logger.INFO("False 5");
return false;
}
- Utils.LOG_INFO("True");
+ Logger.INFO("True");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
index 7826e9fcfe..64a36900fe 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
@@ -11,9 +11,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.block.Block;
@@ -41,14 +41,14 @@ extends GregtechMeta_MultiBlockBase {
return new String[]{
"Controller Block for the Industrial Thermal Centrifuge",
"60% faster than using single block machines of the same voltage",
- "Size: 3x2x3 [WxHxL]", "Controller (front centered)",
- "1x Input Bus (Any casing)",
- "1x Output Bus (Any casing)",
- "1x Maintenance Hatch (Any casing)",
- "1x Muffler Hatch (Any casing)",
- "1x Energy Hatch (Any casing)",
+ "Size: 3x2x3 [WxHxL]", "Controller (front centered, top layer)",
+ "1x Input Bus (Any bottom layer casing)",
+ "1x Output Bus (Any bottom layer casing)",
+ "1x Maintenance Hatch (Any bottom layer casing)",
+ "1x Muffler Hatch (Casing under controller)",
+ "1x Energy Hatch (Any bottom layer casing)",
"Thermal processing Casings for the rest (8 at least!)",
- "Causes " + (20 * getPollutionPerTick(null)) + " Pollution per second",
+ "Noise Hazard Sign Blocks also count as valid casings",
CORE.GT_Tooltip
};
@@ -89,7 +89,7 @@ extends GregtechMeta_MultiBlockBase {
if (tRecipe != null) {
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), tRecipe, new ItemStack[]{tInput});
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
+ Logger.WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
@@ -141,24 +141,29 @@ extends GregtechMeta_MultiBlockBase {
for (int i = -1; i < 2; ++i) {
for (int j = -1; j < 2; ++j) {
for (int h = -1; h < 0; ++h) {
- //if ((h != 0) || ((((xDir + i != 0) || (zDir + j != 0))) && (((i != 0) || (j != 0))))) {
+ if ((h != 0) || ((((xDir + i != 0) || (zDir + j != 0))) && (((i != 0) || (j != 0))))) {
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h,
zDir + j);
+
+ Logger.INFO("------------------");
+ Logger.INFO("xDir: "+xDir+" | zDir: "+zDir);
+ Logger.INFO("i: "+i+" | j: "+j+" | h: "+h);
if (!addToMachineList(tTileEntity)) {
Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
if ((((tBlock != ModBlocks.blockCasings2Misc) || (tMeta != 0)))
&& (((tBlock != GregTech_API.sBlockCasings3) || (tMeta != 9)))) {
- Utils.LOG_WARNING("Wrong Block?");
+ Logger.INFO("Wrong Block?");
return false;
}
- ++tAmount;
+ tAmount++;
}
- //}
+ }
}
}
}
- Utils.LOG_WARNING("Trying to assemble structure. Completed? "+(tAmount >= 8));
+ Logger.INFO("------------------");
+ Logger.WARNING("Trying to assemble structure. Completed? "+(tAmount >= 8));
return (tAmount >= 8);
}
@@ -167,6 +172,7 @@ extends GregtechMeta_MultiBlockBase {
return 10000;
}
+ @Override
public int getPollutionPerTick(final ItemStack aStack) {
return 45;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
index c6d82cf512..fce26484d0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
@@ -9,9 +9,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
@@ -131,7 +131,7 @@ extends GregtechMeta_MultiBlockBase {
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, mFluidInputList, new ItemStack[]{tInput})) {
- Utils.LOG_WARNING("Recipe Complete.");
+ Logger.WARNING("Recipe Complete.");
this.mLastRecipe = tRecipe;
this.mEUt = MathUtils.findPercentageOfInt(this.mLastRecipe.mEUt, 80);
this.mMaxProgresstime = MathUtils.findPercentageOfInt(this.mLastRecipe.mDuration, 20);
@@ -166,7 +166,7 @@ extends GregtechMeta_MultiBlockBase {
int mOffsetZ_Upper = 0;
- Utils.LOG_WARNING("mDirectionX "+(mDirectionX));
+ Logger.WARNING("mDirectionX "+(mDirectionX));
if (mDirectionX == 0){
mCurrentDirectionX = 2;
mCurrentDirectionZ = 3;
@@ -174,7 +174,7 @@ extends GregtechMeta_MultiBlockBase {
mOffsetX_Upper = 2;
mOffsetZ_Lower = -3;
mOffsetZ_Upper = 3;
- Utils.LOG_WARNING("Controler is facing Z direction.");
+ Logger.WARNING("Controler is facing Z direction.");
}
else {
mCurrentDirectionX = 3;
@@ -183,7 +183,7 @@ extends GregtechMeta_MultiBlockBase {
mOffsetX_Upper = 3;
mOffsetZ_Lower = -2;
mOffsetZ_Upper = 2;
- Utils.LOG_WARNING("Controler is facing X direction.");
+ Logger.WARNING("Controler is facing X direction.");
}
//if (aBaseMetaTileEntity.fac)
@@ -191,8 +191,8 @@ extends GregtechMeta_MultiBlockBase {
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
- Utils.LOG_WARNING("xDir"+(xDir));
- Utils.LOG_WARNING("zDir"+(zDir));
+ Logger.WARNING("xDir"+(xDir));
+ Logger.WARNING("zDir"+(zDir));
/*if (!(aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir))) {
return false;
}*/
@@ -204,22 +204,22 @@ extends GregtechMeta_MultiBlockBase {
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h,
zDir + j);
if (!addToMachineList(tTileEntity)) {
- Utils.LOG_WARNING("X: "+i+" | Z: "+j);
+ Logger.WARNING("X: "+i+" | Z: "+j);
Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
if ((tBlock != getCasingBlock()) && (tMeta != getCasingMeta())) {
if ((i != mOffsetX_Lower && j != mOffsetZ_Lower
&& i != mOffsetX_Upper && j != mOffsetZ_Upper) && (h == 0 || h == 1)){
if (tBlock == Blocks.air){
- Utils.LOG_WARNING("Found Air");
+ Logger.WARNING("Found Air");
}
else if (tBlock == Blocks.water){
- Utils.LOG_WARNING("Found Water");
+ Logger.WARNING("Found Water");
}
}
else {
- Utils.LOG_WARNING("[x] Did not form - Found: "+tBlock.getLocalizedName() + " | "+tBlock.getDamageValue(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord()+ i, aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord() + j));
- Utils.LOG_WARNING("[x] Did not form - Found: "+(aBaseMetaTileEntity.getXCoord()+xDir + i) +" | "+ aBaseMetaTileEntity.getYCoord()+" | "+ (aBaseMetaTileEntity.getZCoord()+zDir + j));
+ Logger.WARNING("[x] Did not form - Found: "+tBlock.getLocalizedName() + " | "+tBlock.getDamageValue(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord()+ i, aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord() + j));
+ Logger.WARNING("[x] Did not form - Found: "+(aBaseMetaTileEntity.getXCoord()+xDir + i) +" | "+ aBaseMetaTileEntity.getYCoord()+" | "+ (aBaseMetaTileEntity.getZCoord()+zDir + j));
return false;
}
@@ -231,10 +231,10 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((tAmount >= 8)){
- Utils.LOG_WARNING("Made structure.");
+ Logger.WARNING("Made structure.");
}
else {
- Utils.LOG_WARNING("Did not make structure.");
+ Logger.WARNING("Did not make structure.");
}
return (tAmount >= 8);
}
@@ -375,10 +375,10 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((tAmount == 45)){
- Utils.LOG_WARNING("Filled structure.");
+ Logger.WARNING("Filled structure.");
}
else {
- Utils.LOG_WARNING("Did not fill structure.");
+ Logger.WARNING("Did not fill structure.");
}
return (tAmount == 45);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
index 50dbed4fb9..ece7740394 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -12,9 +12,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maint
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -87,7 +87,7 @@ extends GregtechMeta_MultiBlockBase {
if (tRecipe != null) {
final int tValidOutputSlots = this.getValidOutputSlots(this.getBaseMetaTileEntity(), tRecipe, new ItemStack[]{tInput});
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
+ Logger.WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
@@ -134,7 +134,7 @@ extends GregtechMeta_MultiBlockBase {
}
}
if (tAirCount != 10) {
- Utils.LOG_INFO("False 1");
+ Logger.INFO("False 1");
return false;
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
@@ -157,14 +157,14 @@ extends GregtechMeta_MultiBlockBase {
if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
- Utils.LOG_INFO("False 2");
+ Logger.INFO("False 2");
return false;
}
}
else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
}
else {
- Utils.LOG_INFO("False 3");
+ Logger.INFO("False 3");
return false;
}
}
@@ -172,11 +172,11 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) {
- Utils.LOG_INFO("Use Busses, Not Hatches for Input/Output.");
+ Logger.INFO("Use Busses, Not Hatches for Input/Output.");
return false;
}
if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
- Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
+ Logger.INFO("Incorrect amount of Input & Output busses.");
return false;
}
this.mMaintenanceHatches.clear();
@@ -186,19 +186,19 @@ extends GregtechMeta_MultiBlockBase {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
- Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
+ Logger.INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
}
if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
- Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
+ Logger.INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
} else {
- Utils.LOG_INFO("False 5");
+ Logger.INFO("False 5");
return false;
}
- Utils.LOG_INFO("True");
+ Logger.INFO("True");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
index 5fc5b9c3fb..98ca91d7f6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
@@ -17,9 +17,9 @@ import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MatterFab;
@@ -106,12 +106,12 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Utils.LOG_WARNING("Fabricating Matter.");
+ Logger.WARNING("Fabricating Matter.");
if (this.mInputHatches.size() != 1){
- Utils.LOG_INFO("Too many input hatches. Found: "+this.mInputHatches.size()+" | Expected: 1");
+ Logger.INFO("Too many input hatches. Found: "+this.mInputHatches.size()+" | Expected: 1");
return false;
}
- Utils.LOG_WARNING("Step 1");
+ Logger.WARNING("Step 1");
final ArrayList<ItemStack> tInputList = this.getStoredInputs();
for (int i = 0; i < (tInputList.size() - 1); i++) {
@@ -126,7 +126,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
}
- Utils.LOG_WARNING("Step 2");
+ Logger.WARNING("Step 2");
final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
@@ -145,7 +145,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
}
- Utils.LOG_WARNING("Step 3");
+ Logger.WARNING("Step 3");
final long tVoltage = this.getMaxInputVoltage();
final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
@@ -183,12 +183,12 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
Utils.LOG_INFO("Did not find an itemstack containing 9 IC2 Scrap or more.");
}
}*/
- Utils.LOG_WARNING("Step 4");
+ Logger.WARNING("Step 4");
tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
if (tFluids.length > 0) {
- Utils.LOG_WARNING("Input fluid found");
+ Logger.WARNING("Input fluid found");
for(int i = 0;i<tFluids.length;i++){
final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
if (tRecipe != null) {
@@ -221,13 +221,13 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
else {
- Utils.LOG_INFO("Invalid Recipe");
+ Logger.INFO("Invalid Recipe");
return false;
}
}
}
else if (tFluids.length == 0) {
- Utils.LOG_WARNING("Input fluid not found");
+ Logger.WARNING("Input fluid not found");
this.fakeRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{this.tempFake}, new ItemStack[]{});
this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
@@ -256,9 +256,9 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
else {
- Utils.LOG_INFO("Invalid no input Recipe");
+ Logger.INFO("Invalid no input Recipe");
}
- Utils.LOG_INFO("Fabricating Matter.bad");
+ Logger.INFO("Fabricating Matter.bad");
return false;
}
@@ -284,27 +284,27 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
if (((i != -2) && (i != 2)) && ((j != -2) && (j != 2))) {// innerer 3x3 ohne h�he
if (h == 0) {// innen boden (kantal coils)
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
+ Logger.INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
+ Logger.INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
return false;
}
} else if (h == 3) {// innen decke (ulv casings + input + muffler)
if ((!this.addMufflerToMachineList(tTileEntity, TAE.GTPP_INDEX(9)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
}
}
} else {// innen air
if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
- Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
+ Logger.INFO("Make sure the inner 3x3 of the Multiblock is Air.");
return false;
}
}
@@ -313,11 +313,11 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(9))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(9))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(9))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(9)))) {
if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
return false;
}
}
@@ -327,18 +327,18 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
if (((i == -2) || (i == 2)) && ((j == -2) || (j == 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
return false;
}
}
else if (((i != -2) || (i != 2)) && ((j != -2) || (j != 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
- Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
+ Logger.INFO("Glass Casings Missing from somewhere in the second layer.");
return false;
}
}
@@ -346,29 +346,29 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
if (h == 2) {
if (((i == -2) || (i == 2)) && ((j == -2) || (j == 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
return false;
}
}
else if (((i != -2) || (i != 2)) && ((j != -2) || (j != 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
- Utils.LOG_INFO("Glass Casings Missing from somewhere in the third layer.");
+ Logger.INFO("Glass Casings Missing from somewhere in the third layer.");
return false;
}
}
}
if (h == 3) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 9) {
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
+ Logger.INFO("Matter Fabricator Casings Missing from one of the edges on the top layer.");
return false;
}
}
@@ -377,7 +377,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
}
- Utils.LOG_INFO("Multiblock Formed.");
+ Logger.INFO("Multiblock Formed.");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
index b908e5439c..7f2036fcc3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
@@ -3,9 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
import java.util.ArrayList;
import java.util.Arrays;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.TAE;
-import gregtech.api.enums.Textures;
+import gregtech.api.enums.*;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -15,9 +13,9 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -137,11 +135,11 @@ extends GregtechMeta_MultiBlockBase {
if (temp != null){
if (this.internalStorageTank == null){
this.internalStorageTank = temp;
- Utils.LOG_WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L");
+ Logger.WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L");
}
else{
- Utils.LOG_WARNING("Retained Fluid.");
- Utils.LOG_WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L");
+ Logger.WARNING("Retained Fluid.");
+ Logger.WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L");
}
this.markDirty();
return true;
@@ -172,7 +170,7 @@ extends GregtechMeta_MultiBlockBase {
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (this.internalStorageTank.amount >= this.maximumFluidStorage){
+ if ((this.internalStorageTank != null) && this.internalStorageTank.amount >= this.maximumFluidStorage){
if (this.internalStorageTank.amount > this.maximumFluidStorage){
this.internalStorageTank.amount = this.maximumFluidStorage;
}
@@ -272,7 +270,7 @@ extends GregtechMeta_MultiBlockBase {
final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
if (tFluids.length >= 2){
- Utils.LOG_WARNING("Bad");
+ Logger.WARNING("Bad");
return false;
}
@@ -289,37 +287,37 @@ extends GregtechMeta_MultiBlockBase {
}
}
if ((tFluids.length <= 0) || (slotInputCount > 1)){
- Utils.LOG_WARNING("Bad");
+ Logger.WARNING("Bad");
return false;
}
- Utils.LOG_WARNING("Okay - 2");
+ Logger.WARNING("Okay - 2");
if (this.internalStorageTank == null){
- Utils.LOG_WARNING("Okay - 3");
+ Logger.WARNING("Okay - 3");
if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount > 0)){
- Utils.LOG_WARNING("Okay - 4");
- Utils.LOG_WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount /*+" internalStorageTank:"+internalStorageTank.amount*/);
+ Logger.WARNING("Okay - 4");
+ Logger.WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount /*+" internalStorageTank:"+internalStorageTank.amount*/);
final FluidStack tempFluidStack = rList.get(0).getKey().mFluid;
final Fluid tempFluid = tempFluidStack.getFluid();
this.internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount);
rList.get(0).getKey().mFluid.amount = 0;
- Utils.LOG_WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount);
+ Logger.WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount);
return true;
}
- Utils.LOG_WARNING("No Fluid in hatch.");
+ Logger.WARNING("No Fluid in hatch.");
return false;
}
else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){
- Utils.LOG_WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L");
- Utils.LOG_WARNING("Contains "+this.internalStorageTank.amount+"L");
+ Logger.WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L");
+ Logger.WARNING("Contains "+this.internalStorageTank.amount+"L");
int tempAdd = 0;
tempAdd = rList.get(0).getKey().getFluidAmount();
rList.get(0).getKey().mFluid = null;
- Utils.LOG_WARNING("adding "+tempAdd);
+ Logger.WARNING("adding "+tempAdd);
this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd;
- Utils.LOG_WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
+ Logger.WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
//Utils.LOG_WARNING("Tank");
@@ -327,19 +325,19 @@ extends GregtechMeta_MultiBlockBase {
}
else {
final FluidStack superTempFluidStack = rList.get(0).getKey().mFluid;
- Utils.LOG_WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack)));
+ Logger.WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack)));
if (superTempFluidStack != null) {
- Utils.LOG_WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+".");
+ Logger.WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+".");
}
- Utils.LOG_WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
+ Logger.WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
if (this.internalStorageTank.amount <= 0){
- Utils.LOG_WARNING("Internal Tank is empty, sitting idle.");
+ Logger.WARNING("Internal Tank is empty, sitting idle.");
return false;
}
if ((this.mOutputHatches.get(0).mFluid == null) || this.mOutputHatches.isEmpty() || (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank) && (this.mOutputHatches.get(0).mFluid.amount < this.mOutputHatches.get(0).getCapacity()))){
- Utils.LOG_WARNING("Okay - 3");
+ Logger.WARNING("Okay - 3");
final int tempCurrentStored = this.internalStorageTank.amount;
int tempResult = 0;
final int tempHatchSize = this.mOutputHatches.get(0).getCapacity();
@@ -349,10 +347,10 @@ extends GregtechMeta_MultiBlockBase {
if (tempHatchRemainingSpace <= 0){
return false;
}
- Utils.LOG_WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
+ Logger.WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
if (tempHatchSize >= tempHatchRemainingSpace){
- Utils.LOG_WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
+ Logger.WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
int adder;
if ((tempCurrentStored > 0) && (tempCurrentStored <= tempHatchSize)){
@@ -370,20 +368,20 @@ extends GregtechMeta_MultiBlockBase {
tempResult = adder;
tempOutputFluid.amount = tempResult;
- Utils.LOG_WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName());
+ Logger.WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName());
this.mOutputHatches.get(0).fill(tempOutputFluid, true);
//mOutputHatches.get(0).mFluid.amount = tempResult;
this.internalStorageTank.amount = (tempCurrentStored-adder);
- Utils.LOG_WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName());
+ Logger.WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName());
/*if (internalStorageTank.amount <= 0)
internalStorageTank = null;*/
}
- Utils.LOG_WARNING("Tank ok.");
+ Logger.WARNING("Tank ok.");
return true;
}
}
//this.getBaseMetaTileEntity().(tFluids[0].amount, true);
- Utils.LOG_WARNING("Tank");
+ Logger.WARNING("Tank");
return false;
}
@@ -392,7 +390,7 @@ extends GregtechMeta_MultiBlockBase {
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- Utils.LOG_WARNING("Must be hollow.");
+ Logger.WARNING("Must be hollow.");
return false;
}
int tAmount = 0;
@@ -404,7 +402,7 @@ extends GregtechMeta_MultiBlockBase {
if ((!this.addMaintenanceToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(11))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(11)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
if (h < 3){
- Utils.LOG_WARNING("Casing Expected.");
+ Logger.WARNING("Casing Expected.");
return false;
}
else if (h >= 3){
@@ -413,7 +411,7 @@ extends GregtechMeta_MultiBlockBase {
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 11) {
if (h < 3){
- Utils.LOG_WARNING("Wrong Meta.");
+ Logger.WARNING("Wrong Meta.");
return false;
}
else if (h >= 3){
@@ -425,10 +423,10 @@ extends GregtechMeta_MultiBlockBase {
}
else if (h >= 3){
if ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
- Utils.LOG_WARNING("Found air");
+ Logger.WARNING("Found air");
}
else {
- Utils.LOG_WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank.");
+ Logger.WARNING("Layer "+(h+2)+" is complete. Adding "+(64000*9)+"L storage to the tank.");
tAmount++;
}
}
@@ -439,8 +437,8 @@ extends GregtechMeta_MultiBlockBase {
}
this.multiblockCasingCount = (short) tAmount;
this.maximumFluidStorage = getMaximumTankStorage(tAmount);
- Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
- Utils.LOG_INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L");
+ Logger.INFO("Your Multitank can be 20 blocks tall.");
+ Logger.INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L");
this.tryForceNBTUpdate();
return tAmount >= 16;
}
@@ -522,6 +520,7 @@ extends GregtechMeta_MultiBlockBase {
return 10000;
}
+ @Override
public int getPollutionPerTick(final ItemStack aStack) {
return 5;
}
@@ -589,4 +588,4 @@ extends GregtechMeta_MultiBlockBase {
this.getBaseMetaTileEntity().markDirty();*/
return true;
}
-}
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
index 54365f63d7..e9638d29ed 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
@@ -9,15 +9,13 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.*;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery;
@@ -102,7 +100,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
@Override
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- Utils.LOG_MACHINE_INFO("Checking structure for Industrial Power Sub-Station.");
+ Logger.MACHINE_INFO("Checking structure for Industrial Power Sub-Station.");
final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
@@ -128,12 +126,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (h == 2 || h == 1){
//If not a hatch, continue, else add hatch and continue.
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 7) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
return false;
}
}
@@ -141,12 +139,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (h==0){
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(24))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the bottom layers inner 3x3.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the bottom layers inner 3x3.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the bottom layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the bottom layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
return false;
}
tAmount++;
@@ -155,12 +153,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (h==3){
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(24))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing. Found:"+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()+" with meta:"+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j));
return false;
}
tAmount++;
@@ -178,13 +176,13 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (h == 3){
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(24))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 3");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 3");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 3");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 3");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
tAmount++;
@@ -193,13 +191,13 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
else if (h == 2){
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(24))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 2");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 2");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 2");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the top layer edge. 2");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
tAmount++;
@@ -208,13 +206,13 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
else {
if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(24))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the second layer. 1");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the second layer. 1");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casings Missing from somewhere in the second layer. 1");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casings Missing from somewhere in the second layer. 1");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
tAmount++;
@@ -228,13 +226,13 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the edges on the top layer.");
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the edges on the top layer.");
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 8) {
- Utils.LOG_MACHINE_INFO("Station Casing(s) Missing from one of the edges on the top layer. "+h);
- Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Logger.MACHINE_INFO("Station Casing(s) Missing from one of the edges on the top layer. "+h);
+ Logger.MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
if (h ==0){
if (tTileEntity instanceof GregtechMetaTileEntity_PowerSubStationController){
@@ -271,12 +269,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if ((this.mChargeHatches.size() < 1) || (this.mDischargeHatches.size() < 1)
|| (this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() < 1)
|| (this.mAllDynamoHatches.size() < 1)) {
- Utils.LOG_MACHINE_INFO("Returned False 3");
- Utils.LOG_MACHINE_INFO("Charge Buses: "+this.mChargeHatches.size()+" | expected: 1 | "+(this.mChargeHatches.size() != 1));
- Utils.LOG_MACHINE_INFO("Discharge Buses: "+this.mDischargeHatches.size()+" | expected: 1 | "+(this.mDischargeHatches.size() != 1));
- Utils.LOG_MACHINE_INFO("Energy Hatches: "+this.mEnergyHatches.size()+" | expected: >= 1 | "+(this.mEnergyHatches.size() < 1));
- Utils.LOG_MACHINE_INFO("Dynamo Hatches: "+this.mAllDynamoHatches.size()+" | expected: >= 1 | "+(this.mAllDynamoHatches.size() < 1));
- Utils.LOG_MACHINE_INFO("Maint. Hatches: "+this.mMaintenanceHatches.size()+" | expected: 1 | "+(this.mMaintenanceHatches.size() != 1));
+ Logger.MACHINE_INFO("Returned False 3");
+ Logger.MACHINE_INFO("Charge Buses: "+this.mChargeHatches.size()+" | expected: 1 | "+(this.mChargeHatches.size() != 1));
+ Logger.MACHINE_INFO("Discharge Buses: "+this.mDischargeHatches.size()+" | expected: 1 | "+(this.mDischargeHatches.size() != 1));
+ Logger.MACHINE_INFO("Energy Hatches: "+this.mEnergyHatches.size()+" | expected: >= 1 | "+(this.mEnergyHatches.size() < 1));
+ Logger.MACHINE_INFO("Dynamo Hatches: "+this.mAllDynamoHatches.size()+" | expected: >= 1 | "+(this.mAllDynamoHatches.size() < 1));
+ Logger.MACHINE_INFO("Maint. Hatches: "+this.mMaintenanceHatches.size()+" | expected: 1 | "+(this.mMaintenanceHatches.size() != 1));
return false;
}
@@ -295,7 +293,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
this.mAverageEuUsage = (tempAvg/hatchCount);
}
- Utils.LOG_INFO("Structure Built? "+""+tAmount+" | "+(tAmount>=35));
+ Logger.INFO("Structure Built? "+""+tAmount+" | "+(tAmount>=35));
return tAmount >= 35;
}
@@ -327,6 +325,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
return 0;
}
+ @Override
public int getAmountOfOutputs() {
return 1;
}
@@ -479,7 +478,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
if (this.mActualStoredEU<this.maxEUStore()){
}
- Utils.LOG_INFO("Draining Discharge Hatch #2");
+ Logger.INFO("Draining Discharge Hatch #2");
}
}
for (GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) {
@@ -491,7 +490,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
}
long nNewStoredPower = this.getEUVar();
if (nNewStoredPower < nStoredPower){
- Utils.LOG_ERROR("Used "+(nStoredPower-nNewStoredPower)+"eu.");
+ Logger.ERROR("Used "+(nStoredPower-nNewStoredPower)+"eu.");
return true;
}
@@ -527,7 +526,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
}
long nNewStoredPower = this.getEUVar();
if (nNewStoredPower < nStoredPower){
- Utils.LOG_ERROR("Used "+(nStoredPower-nNewStoredPower)+"eu.");
+ Logger.ERROR("Used "+(nStoredPower-nNewStoredPower)+"eu.");
return true;
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
index 1c5930537e..6661812aac 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
@@ -10,9 +10,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
@@ -68,8 +68,8 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
int tFluidList_sS=tFluidList.size();
for (int i = 0; i < tFluidList_sS - 1; i++) {
for (int j = i + 1; j < tFluidList_sS; j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--); tFluidList_sS=tFluidList.size();
} else {
tFluidList.remove(i--); tFluidList_sS=tFluidList.size();
@@ -109,11 +109,11 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if ((!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(18))) && (!this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(18)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("1 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j).getLocalizedName());
+ Logger.INFO("1 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("1 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j).getLocalizedName()+" | Expected Meta 2 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j));
+ Logger.INFO("1 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j).getLocalizedName()+" | Expected Meta 2 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j));
return false;
}
}
@@ -127,11 +127,11 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if ((!this.addToMachineList(tTileEntity2, TAE.GTPP_INDEX(18))) && (!this.addEnergyInputToMachineList(tTileEntity2, TAE.GTPP_INDEX(18)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("2 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, Y, zDir).getLocalizedName());
+ Logger.INFO("2 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, Y, zDir).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("2 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, Y, zDir).getLocalizedName()+" | Expected Meta 2 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, Y, zDir));
+ Logger.INFO("2 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, Y, zDir).getLocalizedName()+" | Expected Meta 2 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, Y, zDir));
return false;
}
}
@@ -144,21 +144,21 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
for (int y = 2; y < 7; y++) {
if (y<=6){
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != ModBlocks.blockCasings2Misc) { //Must Define meta for center blocks
- Utils.LOG_INFO("3 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName());
+ Logger.INFO("3 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName());
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir) != 3) {
- Utils.LOG_INFO("3 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 3 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
+ Logger.INFO("3 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 3 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
return false;
}
}
if (y==6){
if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 1, zDir) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("8 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y+1, zDir).getLocalizedName()+" | "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y+1, zDir));
+ Logger.INFO("8 Wrong Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y+1, zDir).getLocalizedName()+" | "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y+1, zDir));
return false;
}
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, y + 1, zDir) != 1) {
- Utils.LOG_INFO("8 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y+1, zDir).getLocalizedName()+" | Expected Meta 1 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y + 1, zDir));
+ Logger.INFO("8 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y+1, zDir).getLocalizedName()+" | Expected Meta 1 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y + 1, zDir));
return false;
}
}
@@ -167,14 +167,14 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
- Utils.LOG_INFO("4 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
+ Logger.INFO("4 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
+ Logger.INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
}
}
else {
- Utils.LOG_INFO("debug.1");
+ Logger.INFO("debug.1");
return false;
}
}
@@ -184,14 +184,14 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
- Utils.LOG_INFO("5 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
+ Logger.INFO("5 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
+ Logger.INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
}
}
else {
- Utils.LOG_INFO("debug.2");
+ Logger.INFO("debug.2");
return false;
}
}
@@ -201,14 +201,14 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
- Utils.LOG_INFO("6 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
+ Logger.INFO("6 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
+ Logger.INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
}
}
else {
- Utils.LOG_INFO("debug.3");
+ Logger.INFO("debug.3");
return false;
}
}
@@ -217,14 +217,14 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if (y==3){
if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) == ModBlocks.blockCasingsMisc) {
if (aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, y, zDir) != 13) {
- Utils.LOG_INFO("7 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
+ Logger.INFO("7 Wrong Meta. Found "+aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir).getLocalizedName()+" | Expected Meta 13 | Got Meta "+aBaseMetaTileEntity.getMetaIDOffset(xDir, y, zDir));
return false;
}
- Utils.LOG_INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
+ Logger.INFO("Found Zeron-Casing at "+(aBaseMetaTileEntity.getYCoord()+y));
}
}
else {
- Utils.LOG_INFO("debug.4");
+ Logger.INFO("debug.4");
return false;
}
}
@@ -233,15 +233,15 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if ((this.mInputHatches.size() != 4) || (this.mOutputHatches.size() != 2) ||
(this.mOutputBusses.size() != 1) || (this.mMufflerHatches.size() != 1) ||
(this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)){
- Utils.LOG_INFO("Wrong Hatch count.");
+ Logger.INFO("Wrong Hatch count.");
return false;
}
if (this.mMufflerHatches.size() == 1){
if (this.mMufflerHatches.get(0).mTier < 7){
- Utils.LOG_INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
+ Logger.INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
}
}
- Utils.LOG_INFO("Fission Fuel Production Plant Formed.");
+ Logger.INFO("Fission Fuel Production Plant Formed.");
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
index 2fa05f7709..8d795cf50c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
@@ -12,8 +12,8 @@ import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -222,14 +222,14 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
@Override
public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- Utils.LOG_WARNING("Right Click on MTE by Player");
+ Logger.WARNING("Right Click on MTE by Player");
if (aBaseMetaTileEntity.isClientSide())
{
return true;
//aBaseMetaTileEntity.openGUI(aPlayer);
}
- Utils.LOG_WARNING("MTE is Client-side");
+ Logger.WARNING("MTE is Client-side");
this.showEnergy(aPlayer.getEntityWorld(), aPlayer);
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
index 490f3d7163..46bd28d318 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
@@ -102,6 +102,7 @@ extends GT_Tool {
return true;
}
+ @Override
public boolean isWrench(){
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java
new file mode 100644
index 0000000000..c57ad71fc7
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/GT_Material_Loader.java
@@ -0,0 +1,292 @@
+package gtPlusPlus.xmod.gregtech.loaders;
+
+import java.lang.reflect.*;
+import java.util.HashMap;
+import java.util.Map;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.array.AutoMap;
+import gtPlusPlus.core.util.materials.MaterialUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+
+public class GT_Material_Loader {
+
+ private volatile static GT_Material_Loader instance = new GT_Material_Loader();
+ private volatile Object mProxyObject;
+ private static AutoMap<Materials> mMaterials = new AutoMap<Materials>();
+ private static volatile boolean mHasRun = false;
+
+ public synchronized GT_Material_Loader getInstance(){
+ return GT_Material_Loader.instance;
+ }
+
+ public synchronized boolean getRunAbility(){
+ return (mHasRun ? false : true);
+ }
+ public synchronized void setRunAbility(boolean b){
+ mHasRun = Utils.invertBoolean(b);
+ }
+
+ public GT_Material_Loader() {
+ if (getRunAbility()){
+ //Set Singleton Instance
+ instance = this;
+
+ //Try Reflectively add ourselves to the GT loader.
+ try {
+ Class mInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler");
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && mInterface != null){
+
+ //Make this class Dynamically implement IMaterialHandler
+ if (mProxyObject == null){
+ mProxyObject = Proxy.newProxyInstance(
+ mInterface.getClassLoader(), new Class[] { mInterface },
+ new MaterialHandler(getInstance()));
+ }
+
+ if (ReflectionUtils.invoke(Materials.class, "add", new Class[]{Class.forName("gregtech.api.interfaces.IMaterialHandler")}, new Object[]{mProxyObject})){
+ Logger.REFLECTION("Successfully invoked add, on the proxied object implementing IMaterialHandler.");
+
+
+ Logger.REFLECTION("Examining Proxy to ensure it implements the correct Interface.");
+ Class[] i = mProxyObject.getClass().getInterfaces();
+ for (int r=0;r<i.length;r++){
+ Logger.REFLECTION("Contains "+i[r].getCanonicalName()+".");
+ if (i[r] == mInterface){
+ Logger.REFLECTION("Found gregtech.api.interfaces.IMaterialHandler. This Proxy is valid.");
+ }
+ }
+ }
+ else {
+ Logger.REFLECTION("Failed to invoke add, on the proxied object implementing IMaterialHandler.");
+ }
+ }
+ }
+ catch (ClassNotFoundException e) {}
+ //Materials.add(this);
+
+ //Stupid shit running twice, I don't think so.
+ setRunAbility(false);
+ }
+ }
+
+ public void onMaterialsInit() {
+ Logger.DEBUG_MATERIALS("onMaterialsInit()");
+ }
+
+ public void onComponentInit() {
+ Logger.DEBUG_MATERIALS("onComponentInit()");
+ if (!mMaterials.isEmpty()){
+ Logger.DEBUG_MATERIALS("Found "+mMaterials.size()+" materials to re-enable.");
+ for (Materials M : mMaterials.values()){
+ String name = MaterialUtils.getMaterialName(M);
+ Logger.DEBUG_MATERIALS("Trying to enable "+name+".");
+ boolean success = tryEnableAllComponentsForMaterial(M);
+ if (success){
+ Logger.DEBUG_MATERIALS("Success! Enabled "+name+".");
+ }
+ else {
+ Logger.DEBUG_MATERIALS("Failure... Did not enable "+name+".");
+ }
+ }
+ }
+ }
+
+ public void onComponentIteration(Materials aMaterial) {
+ Logger.DEBUG_MATERIALS("onComponentIteration()");
+ }
+
+ public synchronized boolean enableMaterial(Materials m){
+ if (mMaterials.setValue(m)){
+ Logger.DEBUG_MATERIALS("Added "+MaterialUtils.getMaterialName(m)+" to internal Map.");
+ return true;
+ }
+ Logger.DEBUG_MATERIALS("Failed to add "+MaterialUtils.getMaterialName(m)+" to internal Map.");
+ return false;
+ }
+
+
+
+
+
+
+ /*
+ * Static internal handler methods
+ */
+
+ private static synchronized boolean tryEnableMaterial(Materials mMaterial){
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ return false;
+ }
+
+ boolean value = ReflectionUtils.setField(mMaterial, "mHasParentMod", true);
+ if (value){
+ Logger.DEBUG_MATERIALS("Set mHasParentMod true for "+mMaterial.mDefaultLocalName);
+ }
+ else {
+ Logger.DEBUG_MATERIALS("Failed to set mHasParentMod true for "+mMaterial.mDefaultLocalName);
+ }
+ return value;
+ }
+
+ private static synchronized boolean tryEnableMaterialPart(OrePrefixes prefix, Materials mMaterial){
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ return false;
+ }
+ try {
+ Method enableComponent = Class.forName("gregtech.api.enums.OrePrefixes").getDeclaredMethod("enableComponent", Materials.class);
+ enableComponent.invoke(prefix, mMaterial);
+ Logger.DEBUG_MATERIALS("Enabled "+prefix.name()+" for "+mMaterial.mDefaultLocalName+".");
+ return true;
+ }
+ catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException | ClassNotFoundException error) {
+ Logger.DEBUG_MATERIALS("Failed to enabled "+prefix.name()+" for "+mMaterial.mDefaultLocalName+". Caught "+error.getCause().toString()+".");
+ error.printStackTrace();
+ }
+ Logger.DEBUG_MATERIALS("Did not enable "+prefix.name()+" for "+mMaterial.mDefaultLocalName+". Report this error to Alkalus on Github.");
+ return false;
+ }
+
+ private static synchronized boolean tryEnableAllComponentsForMaterial(Materials material){
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ return false;
+ }
+ try {
+ tryEnableMaterial(material);
+ int mValid = 0;
+ for(OrePrefixes ore:OrePrefixes.values()){
+ if (tryEnableMaterialPart(ore, material)){
+ mValid++;
+ }
+ }
+ if (mValid > 0){
+ Logger.DEBUG_MATERIALS("Success - Re-enabled all components for "+MaterialUtils.getMaterialName(material));
+ }
+ else {
+ Logger.DEBUG_MATERIALS("Failure - Did not enable any components for "+MaterialUtils.getMaterialName(material));
+ }
+ return mValid > 0;
+ }
+ catch (SecurityException | IllegalArgumentException e) {
+ Logger.DEBUG_MATERIALS("Total Failure - Unable to re-enable "+MaterialUtils.getMaterialName(material)+". Most likely an IllegalArgumentException, but small chance it's a SecurityException.");
+ return false;
+ }
+ }
+
+
+
+
+
+
+
+
+
+ /**
+ * Special Dynamic Interface Class
+ */
+
+ public class MaterialHandler implements InvocationHandler {
+
+ private final Map<String, Method> methods = new HashMap<String, Method>();
+ private Object target;
+
+ public MaterialHandler(Object target) {
+ Logger.REFLECTION("Created a Proxy Interface which implements IMaterialHandler.");
+ this.target = target;
+ for(Method method: target.getClass().getDeclaredMethods()) {
+ Logger.REFLECTION("Adding "+method.getName()+" to internal method map.");
+ this.methods.put(method.getName(), method);
+ }
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ long start = System.nanoTime();
+ Object result = methods.get(method.getName()).invoke(target, args);
+ long elapsed = System.nanoTime() - start;
+ Logger.INFO("[Debug] Executed "+method.getName()+" in "+elapsed+" ns");
+ return result;
+ }
+ }
+
+
+ /*
+ public static class ProxyListener implements java.lang.reflect.InvocationHandler {
+
+ public static Object IMaterialHandlerProxy;
+
+ ProxyListener(){
+
+ Logger.REFLECTION("Failed setting IMaterialHandler Proxy instance.");
+ }
+
+ //Loading the class at runtime
+ public static void main(String[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException {
+ Class<?> someInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler");
+ Object instance = Proxy.newProxyInstance(someInterface.getClassLoader(), new Class<?>[]{someInterface}, new InvocationHandler() {
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ //Handle the invocations
+ if(method.getName().equals("onMaterialsInit")){
+ Logger.REFLECTION("Invoked onMaterialsInit() via IMaterialHandler proxy");
+ return 1;
+ }
+ else if(method.getName().equals("onComponentInit")){
+ Logger.REFLECTION("Invoked onComponentInit() via IMaterialHandler proxy");
+ return 2;
+ }
+ else if(method.getName().equals("onComponentIteration")){
+ Logger.REFLECTION("Invoked onComponentIteration() via IMaterialHandler proxy");
+ return 3;
+ }
+ else {
+ return -1;
+ }
+ }
+ });
+ System.out.println(instance.getClass().getDeclaredMethod("someMethod", (Class<?>[])null).invoke(instance, new Object[]{}));
+ }
+
+ private static class MaterialHandler implements InvocationHandler {
+ private final Object original;
+
+ public MaterialHandler(Object original) {
+ this.original = original;
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws IllegalAccessException, IllegalArgumentException,
+ InvocationTargetException {
+ System.out.println("BEFORE");
+ method.invoke(original, args);
+ System.out.println("AFTER");
+ return null;
+ }
+ }
+
+ public static void init(){
+
+ Class<?> someInterface = Class.forName("gregtech.api.interfaces.IMaterialHandler");
+ GT_Material_Loader original = GT_Material_Loader.instance;
+ MaterialHandler handler = new MaterialHandler(original);
+
+ Object f = Proxy.newProxyInstance(someInterface.getClassLoader(),
+ new Class[] { someInterface },
+ handler);
+
+ f.originalMethod("Hallo");
+ }
+
+
+
+ }
+
+ */
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
index aff10c9b37..90faa9b83a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2;
@@ -11,10 +11,10 @@ public class Gregtech_Blocks {
public static void run(){
- Utils.LOG_INFO("Expanding Gregtech Texture Array from 128 -> 1024.");
+ Logger.INFO("Expanding Gregtech Texture Array from 128 -> 1024.");
boolean didExpand = TAE.hookGtTextures();
- Utils.LOG_INFO("Did Texture Array expand correctly? "+didExpand);
- Utils.LOG_INFO("|======| Texture Array New Length: "+Textures.BlockIcons.CASING_BLOCKS.length+" |======|");
+ Logger.INFO("Did Texture Array expand correctly? "+didExpand);
+ Logger.INFO("|======| Texture Array New Length: "+Textures.BlockIcons.CASING_BLOCKS.length+" |======|");
//Casing Blocks
ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java
index 190cf416f3..332fa18281 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/ProcessingToolHeadChoocher.java
@@ -3,7 +3,7 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
@@ -38,14 +38,14 @@ public class ProcessingToolHeadChoocher implements Interface_OreRecipeRegistrato
public void materialsLoops(){
final Materials[] i = Materials.values();
final int size = i.length;
- Utils.LOG_WARNING("Materials to attempt tool gen. with: "+size);
+ Logger.WARNING("Materials to attempt tool gen. with: "+size);
int used = 0;
Materials aMaterial = null;
for (int r=0;r<size;r++){
aMaterial = i[r];
if ((aMaterial != Materials.Stone) && (aMaterial != Materials.Flint) && (aMaterial != Materials.Rubber) && (aMaterial != Materials._NULL)) {
if ((!aMaterial.contains(SubTag.WOOD)) && (!aMaterial.contains(SubTag.BOUNCY)) && (!aMaterial.contains(SubTag.NO_SMASHING))&& (!aMaterial.contains(SubTag.TRANSPARENT))&& (!aMaterial.contains(SubTag.FLAMMABLE))&& (!aMaterial.contains(SubTag.MAGICAL))&& (!aMaterial.contains(SubTag.NO_SMELTING))) {
- Utils.LOG_WARNING("Found "+aMaterial.name()+" as a valid Skookum Choocher Material.");
+ Logger.WARNING("Found "+aMaterial.name()+" as a valid Skookum Choocher Material.");
//Input 1
final ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L);
final ItemStack ingot = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
@@ -62,27 +62,27 @@ public class ProcessingToolHeadChoocher implements Interface_OreRecipeRegistrato
used++;
}
else {
- Utils.LOG_WARNING(""+aMaterial.name()+" could not be used for all input compoenents. [3x"+aMaterial.name()+" plates, 2x"+aMaterial.name()+" ingots, 1x"+aMaterial.name()+" Hard Hammer Head.");
+ Logger.WARNING(""+aMaterial.name()+" could not be used for all input compoenents. [3x"+aMaterial.name()+" plates, 2x"+aMaterial.name()+" ingots, 1x"+aMaterial.name()+" Hard Hammer Head.");
}
//GT_ModHandler.addCraftingRecipe(, GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"P H", "PIP", " I ", Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), OrePrefixes.toolHeadHammer.get(aMaterial)});
}
else {
- Utils.LOG_WARNING(""+aMaterial.name()+" was not a valid Skookum Choocher Material.");
+ Logger.WARNING(""+aMaterial.name()+" was not a valid Skookum Choocher Material.");
}
}
else {
- Utils.LOG_WARNING(""+aMaterial.name()+" was not a valid Skookum Choocher Material.");
+ Logger.WARNING(""+aMaterial.name()+" was not a valid Skookum Choocher Material.");
}
}
- Utils.LOG_INFO("Materials used for tool gen: "+used);
+ Logger.INFO("Materials used for tool gen: "+used);
}
@Override
public void run() {
- Utils.LOG_INFO("Generating Skookum Choochers of all GT Materials.");
+ Logger.INFO("Generating Skookum Choochers of all GT Materials.");
this.materialsLoops();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index 6d1da0881e..ed8b4b9a82 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ALLOY;
@@ -12,7 +13,6 @@ import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.material.state.MaterialState;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -97,7 +97,7 @@ public class RecipeGen_BlastSmelter implements Runnable{
duration = 14*second*mMaterialListSize;
}
- Utils.LOG_WARNING("[BAS] Size: "+mMaterialListSize);
+ Logger.WARNING("[BAS] Size: "+mMaterialListSize);
//Make a simple one Material Materialstack[] and log it for validity.
@@ -105,10 +105,10 @@ public class RecipeGen_BlastSmelter implements Runnable{
final ItemStack[] tItemStackTest = new ItemStack[]{circuitGT, tStack};
inputStackCount = 1;
fluidAmount = 144*inputStackCount;
- Utils.LOG_WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+". Gives "+fluidAmount+"L of molten metal.");
+ Logger.WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+". Gives "+fluidAmount+"L of molten metal.");
for (int das=0;das<tItemStackTest.length;das++){
if (tItemStackTest[das] != null) {
- Utils.LOG_WARNING("[BAS] tMaterial["+das+"]: "+tItemStackTest[das].getDisplayName()+" Meta: "+tItemStackTest[das].getItemDamage()+", Amount: "+tItemStackTest[das].stackSize);
+ Logger.WARNING("[BAS] tMaterial["+das+"]: "+tItemStackTest[das].getDisplayName()+" Meta: "+tItemStackTest[das].getItemDamage()+", Amount: "+tItemStackTest[das].stackSize);
}
}
@@ -118,50 +118,50 @@ public class RecipeGen_BlastSmelter implements Runnable{
if (hasMoreInputThanACircuit){
if (M.requiresBlastFurnace()) {
if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluid(fluidAmount), 100, duration, 240)){
- Utils.LOG_WARNING("[BAS] Success.");
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
+ Logger.WARNING("[BAS] Success.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration, 120)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+M.getUnlocalizedName(), 1), null, M.getFluid(16), 100, duration/9, 120)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/9, 120)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
}
}
else {
- Utils.LOG_WARNING("[BAS] Failed.");
+ Logger.WARNING("[BAS] Failed.");
}
}
else {
if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluid(fluidAmount), 100, duration/2, 120)){
- Utils.LOG_WARNING("[BAS] Success.");
+ Logger.WARNING("[BAS] Success.");
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluid(144), M.getIngot(1), duration/2, 60)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration/2, 60)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
final ItemStack tempitem = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+M.getUnlocalizedName(), 1);
if (tempitem != null){
if (GT_Values.RA.addFluidExtractionRecipe(tempitem, null, M.getFluid(16), 100, duration/2/9, 60)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/2/9, 60)){
- Utils.LOG_WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
}
}
else {
- Utils.LOG_WARNING("[BAS] Failed.");
+ Logger.WARNING("[BAS] Failed.");
}
}
@@ -184,8 +184,8 @@ public class RecipeGen_BlastSmelter implements Runnable{
for (final gtPlusPlus.core.material.MaterialStack xMaterial : M.getComposites()){
if (xMaterial != null){
if (xMaterial.getStackMaterial() != null){
- Utils.LOG_WARNING("[BAS] FOUND: "+xMaterial.getStackMaterial().getLocalizedName());
- Utils.LOG_WARNING("[BAS] ADDING: "+xMaterial.getStackMaterial().getLocalizedName());
+ Logger.WARNING("[BAS] FOUND: "+xMaterial.getStackMaterial().getLocalizedName());
+ Logger.WARNING("[BAS] ADDING: "+xMaterial.getStackMaterial().getLocalizedName());
}
tempStack[ooo] = xMaterial;
}
@@ -227,45 +227,45 @@ public class RecipeGen_BlastSmelter implements Runnable{
components[fr] = components_NoCircuit[fr-1];
}
}
- Utils.LOG_WARNING("[BAS] Should have added a circuit. mMaterialListSize: "+mMaterialListSize+" | circuit: "+components[0].getDisplayName());
+ Logger.WARNING("[BAS] Should have added a circuit. mMaterialListSize: "+mMaterialListSize+" | circuit: "+components[0].getDisplayName());
}
else {
- Utils.LOG_WARNING("[BAS] Did not add a circuit. mMaterialListSize: "+mMaterialListSize);
+ Logger.WARNING("[BAS] Did not add a circuit. mMaterialListSize: "+mMaterialListSize);
}
//Set Fluid output
fluidAmount = 144*inputStackCount;
- Utils.LOG_WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+" using it's compound dusts. This material has "+ inputStackCount+" parts. Gives "+fluidAmount+"L of molten metal.");
- Utils.LOG_WARNING("[BAS] tMaterial.length: "+components.length+".");
+ Logger.WARNING("[BAS] Adding an Alloy Blast Smelter Recipe for "+M.getLocalizedName()+" using it's compound dusts. This material has "+ inputStackCount+" parts. Gives "+fluidAmount+"L of molten metal.");
+ Logger.WARNING("[BAS] tMaterial.length: "+components.length+".");
for (int das=0;das<components.length;das++){
if (components[das] != null) {
- Utils.LOG_WARNING("[BAS] tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
+ Logger.WARNING("[BAS] tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
}
}
//Adds Recipe
if (M.requiresBlastFurnace()) {
if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluid(fluidAmount), 100, duration, 500)){
- Utils.LOG_WARNING("[BAS] Success.");
+ Logger.WARNING("[BAS] Success.");
}
else {
- Utils.LOG_WARNING("[BAS] Failed.");
+ Logger.WARNING("[BAS] Failed.");
}
}
else {
if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluid(fluidAmount), 100, duration, 240)){
- Utils.LOG_WARNING("[BAS] Success.");
+ Logger.WARNING("[BAS] Success.");
}
else {
- Utils.LOG_WARNING("[BAS] Failed.");
+ Logger.WARNING("[BAS] Failed.");
}
}
}
}
}
else {
- Utils.LOG_WARNING("[BAS] doTest: "+doTest+" | tMaterial != null: "+(tMaterial != null));
+ Logger.WARNING("[BAS] doTest: "+doTest+" | tMaterial != null: "+(tMaterial != null));
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
index 873987544a..ee5ac63f38 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
@@ -2,9 +2,7 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.*;
import gregtech.api.interfaces.IOreRecipeRegistrator;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
+import gregtech.api.util.*;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
@@ -30,6 +28,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
for (OrePrefixes tPrefix : this.mSmeltingPrefixes) tPrefix.add(this);
}
+ @Override
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
boolean keepHighTempRecipes = !CORE.GTNH;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index 46bf36c445..426b73f0d8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -2,10 +2,10 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.state.MaterialState;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.item.ItemStack;
@@ -31,7 +31,7 @@ public class RecipeGen_DustGeneration implements Runnable{
public static void generateRecipes(final Material material, final boolean disableOptional){
final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15;
- Utils.LOG_WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO
+ Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO
//Ring Recipe
if (RecipeUtils.addShapedGregtechRecipe(
@@ -39,10 +39,10 @@ public class RecipeGen_DustGeneration implements Runnable{
null, material.getRod(1), null,
null, null, null,
material.getRing(1))){
- Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -58,10 +58,10 @@ public class RecipeGen_DustGeneration implements Runnable{
tinyDust, tinyDust, tinyDust,
tinyDust, tinyDust, tinyDust,
normalDust)){
- Utils.LOG_WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
if (RecipeUtils.recipeBuilder(
@@ -69,10 +69,10 @@ public class RecipeGen_DustGeneration implements Runnable{
null, null, null,
null, null, null,
material.getTinyDust(9))){
- Utils.LOG_WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -81,10 +81,10 @@ public class RecipeGen_DustGeneration implements Runnable{
smallDust, smallDust, null,
null, null, null,
normalDust)){
- Utils.LOG_WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -93,10 +93,10 @@ public class RecipeGen_DustGeneration implements Runnable{
null, null, null,
null, null, null,
material.getSmallDust(4))){
- Utils.LOG_WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
//Macerate blocks back to dusts.
@@ -114,12 +114,12 @@ public class RecipeGen_DustGeneration implements Runnable{
//Is this a composite?
if ((inputStacks != null) && !disableOptional){
//Is this a composite?
- Utils.LOG_INFO("mixer length: "+inputStacks.length);
+ Logger.WARNING("mixer length: "+inputStacks.length);
if ((inputStacks.length != 0) && (inputStacks.length <= 4)){
//Log Input items
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
+ Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks));
final long[] inputStackSize = material.vSmallestRatio;
- Utils.LOG_INFO("mixer is stacksizeVar null? "+(inputStackSize != null));
+ Logger.WARNING("mixer is stacksizeVar null? "+(inputStackSize != null));
//Is smallest ratio invalid?
if (inputStackSize != null){
//set stack sizes on an input ItemStack[]
@@ -129,7 +129,7 @@ public class RecipeGen_DustGeneration implements Runnable{
}
}
//Relog input values, with stack sizes
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
+ Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks));
//Get us four ItemStacks to input into the mixer
ItemStack input1, input2, input3, input4;
@@ -168,19 +168,19 @@ public class RecipeGen_DustGeneration implements Runnable{
(int) Math.max(material.getMass() * 2L * 1, 1),
2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example.
{
- Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
}
//Add Shapeless recipe for low tier alloys.
if (tVoltageMultiplier <= 30){
if (RecipeUtils.addShapedGregtechRecipe(inputStacks, outputStacks)){
- Utils.LOG_INFO("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_INFO("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Dust Shapeless Recipe: "+material.getLocalizedName()+" - Failed");
}
}
}
@@ -200,12 +200,12 @@ public class RecipeGen_DustGeneration implements Runnable{
//Is this a composite?
if ((inputStacks != null)){
//Is this a composite?
- Utils.LOG_INFO("mixer length: "+inputStacks.length);
+ Logger.WARNING("mixer length: "+inputStacks.length);
if ((inputStacks.length >= 1) && (inputStacks.length <= 4)){
//Log Input items
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
+ Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks));
final long[] inputStackSize = material.vSmallestRatio;
- Utils.LOG_INFO("mixer is stacksizeVar not null? "+(inputStackSize != null));
+ Logger.WARNING("mixer is stacksizeVar not null? "+(inputStackSize != null));
//Is smallest ratio invalid?
if (inputStackSize != null){
//set stack sizes on an input ItemStack[]
@@ -215,7 +215,7 @@ public class RecipeGen_DustGeneration implements Runnable{
}
}
//Relog input values, with stack sizes
- Utils.LOG_INFO(ItemUtils.getArrayStackNames(inputStacks));
+ Logger.WARNING(ItemUtils.getArrayStackNames(inputStacks));
//Get us four ItemStacks to input into the mixer
ItemStack input1, input2, input3, input4;
@@ -254,24 +254,24 @@ public class RecipeGen_DustGeneration implements Runnable{
(int) Math.max(material.getMass() * 2L * 1, 1),
2 * material.vVoltageMultiplier)) //Was 6, but let's try 2. This makes Potin LV, for example.
{
- Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
return true;
}
else {
- Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
return false;
}
}
else {
- Utils.LOG_INFO("inputStackSize == NUll - "+material.getLocalizedName());
+ Logger.WARNING("inputStackSize == NUll - "+material.getLocalizedName());
}
}
else {
- Utils.LOG_INFO("InputStacks is out range 1-4 - "+material.getLocalizedName());
+ Logger.WARNING("InputStacks is out range 1-4 - "+material.getLocalizedName());
}
}
else {
- Utils.LOG_INFO("InputStacks == NUll - "+material.getLocalizedName());
+ Logger.WARNING("InputStacks == NUll - "+material.getLocalizedName());
}
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
index 5cf36796bb..198c22fb8e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
@@ -3,8 +3,8 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.item.ItemStack;
public class RecipeGen_Extruder implements Runnable{
@@ -35,7 +35,7 @@ public class RecipeGen_Extruder implements Runnable{
final ItemStack shape_Block = ItemList.Shape_Extruder_Block.get(0);
final ItemStack shape_Ingot = ItemList.Shape_Extruder_Ingot.get(0);
- Utils.LOG_WARNING("Generating Extruder recipes for "+material.getLocalizedName());
+ Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName());
//Ingot Recipe
if (addExtruderRecipe(
@@ -44,10 +44,10 @@ public class RecipeGen_Extruder implements Runnable{
material.getIngot(9),
(int) Math.max(material.getMass() * 2L * 1, 1),
4 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed");
}
//Block Recipe
@@ -57,10 +57,10 @@ public class RecipeGen_Extruder implements Runnable{
material.getBlock(1),
(int) Math.max(material.getMass() * 2L * 1, 1),
8 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed");
}
//Plate Recipe
@@ -69,10 +69,10 @@ public class RecipeGen_Extruder implements Runnable{
shape_Plate,
plate_Single,
10, 4 * tVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed");
}
//Ring Recipe
@@ -83,10 +83,10 @@ public class RecipeGen_Extruder implements Runnable{
material.getRing(4),
(int) Math.max(material.getMass() * 2L * 1, 1),
6 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -99,10 +99,10 @@ public class RecipeGen_Extruder implements Runnable{
itemGear,
(int) Math.max(material.getMass() * 5L, 1),
8 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -114,10 +114,10 @@ public class RecipeGen_Extruder implements Runnable{
material.getRod(2),
(int) Math.max(material.getMass() * 2L * 1, 1),
6 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -129,10 +129,10 @@ public class RecipeGen_Extruder implements Runnable{
material.getBolt(8),
(int) Math.max(material.getMass() * 2L * 1, 1),
6 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
index 1b9247ee3e..5388f68146 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
public class RecipeGen_Fluids implements Runnable{
@@ -48,10 +48,10 @@ public class RecipeGen_Fluids implements Runnable{
1*20, //Duration
16 //Eu Tick
)){
- Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
}
//Plate
@@ -62,10 +62,10 @@ public class RecipeGen_Fluids implements Runnable{
1*20, //Duration
16 //Eu Tick
)){
- Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
}
//Double Plate
@@ -76,10 +76,10 @@ public class RecipeGen_Fluids implements Runnable{
1*20, //Duration
16 //Eu Tick
)){
- Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed");
}
//Nugget
@@ -90,10 +90,10 @@ public class RecipeGen_Fluids implements Runnable{
16, //Duration
8 //Eu Tick
)){
- Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
}
//Block
@@ -104,10 +104,10 @@ public class RecipeGen_Fluids implements Runnable{
288, //Duration
16 //Eu Tick
)){
- Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -126,10 +126,10 @@ public class RecipeGen_Fluids implements Runnable{
32, //Duration
8 //Eu Tick
)){
- Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
}
//Plate
@@ -140,10 +140,10 @@ public class RecipeGen_Fluids implements Runnable{
32, //Duration
8 //Eu Tick
)){
- Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
}
//Nugget
@@ -154,10 +154,10 @@ public class RecipeGen_Fluids implements Runnable{
16, //Duration
4 //Eu Tick
)){
- Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
}
//Gears
@@ -168,10 +168,10 @@ public class RecipeGen_Fluids implements Runnable{
128, //Duration
8 //Eu Tick
)){
- Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Failed");
}
//Blocks
@@ -182,10 +182,10 @@ public class RecipeGen_Fluids implements Runnable{
288, //Duration
16 //Eu Tick
)){
- Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
index fe9d322fde..6c54fb816b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
@@ -4,8 +4,8 @@ import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import net.minecraft.item.ItemStack;
public class RecipeGen_Plates implements Runnable{
@@ -31,7 +31,7 @@ public class RecipeGen_Plates implements Runnable{
final ItemStack plate_SingleTwo = material.getPlate(2);
final ItemStack plate_Double = material.getPlateDouble(1);
- Utils.LOG_WARNING("Generating Plate recipes for "+material.getLocalizedName());
+ Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName());
//Forge Hammer
if (addForgeHammerRecipe(
@@ -39,10 +39,10 @@ public class RecipeGen_Plates implements Runnable{
plate_Single,
(int) Math.max(material.getMass(), 1L),
16)){
- Utils.LOG_WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Failed");
}
//Bender
if (addBenderRecipe(
@@ -50,10 +50,10 @@ public class RecipeGen_Plates implements Runnable{
plate_Single,
(int) Math.max(material.getMass() * 1L, 1L),
24)){
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
}
//Alloy Smelter
if (GT_Values.RA.addAlloySmelterRecipe(
@@ -62,10 +62,10 @@ public class RecipeGen_Plates implements Runnable{
plate_Single,
(int) Math.max(material.getMass() * 2L, 1L),
2 * tVoltageMultiplier)){
- Utils.LOG_WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -75,20 +75,20 @@ public class RecipeGen_Plates implements Runnable{
plate_Double,
(int) Math.max(material.getMass() * 2L, 1L),
96)){
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
}
if (addBenderRecipe(
plate_SingleTwo,
plate_Double,
(int) Math.max(material.getMass() * 2L, 1L),
96)){
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
index d0651f783c..98fb6050d4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
@@ -9,10 +9,8 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.item.ModItems;
+import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.util.Utils;
@@ -20,7 +18,6 @@ import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
public class RecipeGen_Recycling implements Runnable {
@@ -45,39 +42,77 @@ public class RecipeGen_Recycling implements Runnable {
public static void generateRecipes(final Material material) {
- Utils.LOG_INFO("Generating Recycling recipes for " + material.getLocalizedName());
+ Logger.WARNING("Generating Recycling recipes for " + material.getLocalizedName());
final OrePrefixes[] mValidPrefixesAsString = { OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.nugget,
OrePrefixes.plate, OrePrefixes.plateDense, OrePrefixes.plateDouble, OrePrefixes.plateTriple,
OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.stick, OrePrefixes.stickLong,
OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.rotor, OrePrefixes.gearGt,
- OrePrefixes.gearGtSmall };
+ OrePrefixes.gearGtSmall, OrePrefixes.gear, OrePrefixes.block, OrePrefixes.cableGt01, OrePrefixes.cableGt02,
+ OrePrefixes.cableGt04, OrePrefixes.cableGt08, OrePrefixes.cableGt12, OrePrefixes.wireFine, OrePrefixes.wireGt01,
+ OrePrefixes.wireGt02, OrePrefixes.wireGt04, OrePrefixes.wireGt08, OrePrefixes.wireGt12, OrePrefixes.wireGt16,
+ OrePrefixes.foil, OrePrefixes.frameGt, OrePrefixes.pipeHuge, OrePrefixes.pipeLarge, OrePrefixes.pipeMedium, OrePrefixes.pipeSmall, OrePrefixes.pipeTiny,
+ };
- Utils.LOG_INFO("Found " + mValidPrefixesAsString.length + " valid OreDict prefixes.");
+ int mSlotIndex = 0;
+ Pair<OrePrefixes, ItemStack>[] mValidPairs = new Pair[mValidPrefixesAsString.length];
+
+ for (int r=0;r<mValidPairs.length;r++){
+ ItemStack temp = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(mValidPrefixesAsString[r].name()+Utils.sanitizeString(material.getLocalizedName()), 1);
+ if (temp != null){
+ mValidPairs[mSlotIndex++] = new Pair<OrePrefixes, ItemStack>(mValidPrefixesAsString[r], temp.copy());
+ }
+ else {
+ Logger.WARNING("Invalid Item: "+mValidPrefixesAsString[r].name()+Utils.sanitizeString(material.getLocalizedName()));
+ }
+ }
+
+ if (mValidPairs.length > 0){
+ int validCounter = 0;
+ Pair<OrePrefixes, ItemStack>[] temp = mValidPairs;
+ for (Pair<OrePrefixes, ItemStack> temp2 : mValidPairs){
+ if (temp2 != null){
+ Logger.WARNING("Valid: "+temp2.getValue().getDisplayName());
+ validCounter++;
+ }
+ }
+ Pair<OrePrefixes, ItemStack> temp3[] = new Pair[validCounter];
+ int temp4 = 0;
+ for (Pair<OrePrefixes, ItemStack> r : mValidPairs){
+ if (r != null){
+ temp3[temp4++] = r;
+ }
+ }
+ if (temp3.length > 0){
+ mValidPairs = temp3.clone();
+ }
+ }
+
+ Logger.WARNING("Found " + mValidPairs.length + " valid OreDict prefixes.");
if (mValidPrefixesAsString.length >= 1) {
- for (final OrePrefixes validPrefix : mValidPrefixesAsString) {
+ for (final Pair<OrePrefixes, ItemStack> validPrefix : mValidPairs) {
try {
if (material.getState() != MaterialState.SOLID){
continue;
}
- final ItemStack tempStack = get(validPrefix, material, 1);
- final ItemStack mDust = getDust(material, validPrefix);
- final Pair<OrePrefixes, ItemStack> mData = getDustData(material, validPrefix);
- int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(mData.getKey().mMaterialAmount, true);
+ final ItemStack tempStack = validPrefix.getValue();
+ final ItemStack mDust = getDust(material, validPrefix.getKey());
+ final Pair<OrePrefixes, ItemStack> mData = getDustData(material, validPrefix.getKey());
+ int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(validPrefix.getKey().mMaterialAmount, true);
//Maceration
if (tempStack != null) {
// mValidItems[mSlotIndex++] = tempStack;
if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) {
- Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
+ Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
+ tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName());
}
else {
- Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Failed");
+ Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Failed");
if (mDust == null) {
- Utils.LOG_INFO("Invalid Dust output.");
+ Logger.WARNING("Invalid Dust output.");
}
}
}
@@ -91,13 +126,13 @@ public class RecipeGen_Recycling implements Runnable {
if (tempStack != null) {
// mValidItems[mSlotIndex++] = tempStack;
if ((mDust != null) && GT_Values.RA.addFluidExtractionRecipe(tempStack, null, material.getFluid(mFluidAmount), 0, 30, 8)) {
- Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
- + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName());
+ Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
+ + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluid(1).getLocalizedName()+".");
}
else {
- Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Failed");
+ Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed");
if (mDust == null) {
- Utils.LOG_INFO("Invalid Dust output.");
+ Logger.WARNING("Invalid Dust output.");
}
}
}
@@ -105,10 +140,10 @@ public class RecipeGen_Recycling implements Runnable {
}
catch (final Throwable t) {
t.printStackTrace();
- // Utils.LOG_INFO("Returning Null. Throwable Info:
+ // Utils.LOG_WARNING("Returning Null. Throwable Info:
// "+t.getMessage());
- // Utils.LOG_INFO("Throwable Info: "+t.toString());
- // Utils.LOG_INFO("Throwable Info:
+ // Utils.LOG_WARNING("Throwable Info: "+t.toString());
+ // Utils.LOG_WARNING("Throwable Info:
// "+t.getCause().toString());
}
@@ -141,14 +176,14 @@ public class RecipeGen_Recycling implements Runnable {
}
if (mPrefix != null && mDust != null){
- Utils.LOG_INFO("Built valid dust pair.");
+ Logger.WARNING("Built valid dust pair.");
return new Pair<OrePrefixes, ItemStack>(mPrefix, mDust);
}
else {
- Utils.LOG_INFO("mPrefix: "+(mPrefix!=null));
- Utils.LOG_INFO("mDust: "+(mDust!=null));
+ Logger.WARNING("mPrefix: "+(mPrefix!=null));
+ Logger.WARNING("mDust: "+(mDust!=null));
}
- Utils.LOG_INFO("Failed to build valid dust pair.");
+ Logger.WARNING("Failed to build valid dust pair.");
return null;
}
@@ -162,23 +197,23 @@ public class RecipeGen_Recycling implements Runnable {
}
ItemStack rStack = null;
if ((((aMaterialAmount % M) == 0) || (aMaterialAmount >= (M * 16)))) {
- Utils.LOG_INFO("Trying to get a Dust");
+ Logger.WARNING("Trying to get a Dust");
rStack = get(OrePrefixes.dust, aMaterial, aMaterialAmount / M);
}
if ((rStack == null) && ((((aMaterialAmount * 4) % M) == 0) || (aMaterialAmount >= (M * 8)))) {
- Utils.LOG_INFO("Trying to get a Small Dust");
+ Logger.WARNING("Trying to get a Small Dust");
rStack = get(OrePrefixes.dustSmall, aMaterial, (aMaterialAmount * 4) / M);
}
if ((rStack == null) && (((aMaterialAmount * 9) >= M))) {
- Utils.LOG_INFO("Trying to get a Tiny Dust");
+ Logger.WARNING("Trying to get a Tiny Dust");
rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M);
}
if (rStack == null) {
- Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4));
+ Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4));
}
return rStack;
@@ -204,15 +239,15 @@ public class RecipeGen_Recycling implements Runnable {
public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount,
final boolean aMentionPossibleTypos, final boolean aNoInvalidAmounts) {
if (aNoInvalidAmounts && (aAmount < 1L)) {
- Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4));
+ Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4));
return null;
}
if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) {
- Utils.LOG_INFO("Unknown Key for Unification, Typo? " + aName);
+ Logger.WARNING("Unknown Key for Unification, Typo? " + aName);
}
return GT_Utility.copyAmount(aAmount,
new Object[] { mNameMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement });
@@ -220,16 +255,16 @@ public class RecipeGen_Recycling implements Runnable {
public static ItemStack getFirstOre(final Object aName, final long aAmount) {
if (GT_Utility.isStringInvalid(aName)) {
- Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(3));
- Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(4));
+ Logger.WARNING("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(1));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(2));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(3));
+ Logger.WARNING("Called from method: " + ReflectionUtils.getMethodName(4));
return null;
}
- final ItemStack tStack = (ItemStack) mNameMap.get(aName.toString());
+ final ItemStack tStack = mNameMap.get(aName.toString());
if (GT_Utility.isStackValid(tStack)) {
- Utils.LOG_INFO("Found valid stack.");
+ Logger.WARNING("Found valid stack.");
return GT_Utility.copyAmount(aAmount, new Object[] { tStack });
}
return GT_Utility.copyAmount(aAmount, getOres(aName).toArray());
@@ -239,32 +274,33 @@ public class RecipeGen_Recycling implements Runnable {
final String aName = (aOreName == null) ? "" : aOreName.toString();
final ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
if (GT_Utility.isStringValid(aName)) {
- Utils.LOG_INFO("Making a list of all OreDict entries for "+aOreName+".");
+ Logger.WARNING("Making a list of all OreDict entries for "+aOreName+".");
if (rList.addAll(OreDictionary.getOres(aName))){
- Utils.LOG_INFO("Added "+rList.size()+" elements to list.");
+ Logger.WARNING("Added "+rList.size()+" elements to list.");
}
else {
- Utils.LOG_INFO("Failed to Add Collection from oreDictionary, forcing an entry.");
+ Logger.WARNING("Failed to Add Collection from oreDictionary, forcing an entry.");
rList.add(ItemUtils.getItemStackOfAmountFromOreDict((String) aOreName, 1));
}
}
return rList;
}
+ @SuppressWarnings("unchecked")
public Map<String, ItemStack> getNameMap() {
Map<String, ItemStack> tempMap;
try {
tempMap = (Map<String, ItemStack>) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap",
true);
if (tempMap != null) {
- Utils.LOG_INFO("Found 'sName2StackMap' in GT_OreDictUnificator.class.");
+ Logger.WARNING("Found 'sName2StackMap' in GT_OreDictUnificator.class.");
return tempMap;
}
}
catch (final IllegalAccessException e) {
e.printStackTrace();
}
- Utils.LOG_INFO("Invalid map stored in GT_OreDictUnificator.class, unable to find sName2StackMap field.");
+ Logger.WARNING("Invalid map stored in GT_OreDictUnificator.class, unable to find sName2StackMap field.");
return null;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
index 79ff583607..a04206ec62 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
@@ -1,9 +1,9 @@
package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.item.ItemStack;
@@ -21,7 +21,7 @@ public class RecipeGen_ShapedCrafting implements Runnable{
}
public static void generateRecipes(final Material material){
- Utils.LOG_WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO
+ Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO
//Nuggets
@@ -81,10 +81,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
"craftingToolFile", material.getRod(1), null,
null, null, null,
material.getRing(1))){
- Utils.LOG_WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("GT:NH Ring Recipe: "+material.getLocalizedName()+" - Failed");
}
}
else {
@@ -93,10 +93,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
null, material.getRod(1), null,
null, null, null,
material.getRing(1))){
- Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Ring Recipe: "+material.getLocalizedName()+" - Failed");
}
}
}
@@ -110,10 +110,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
stackStick, "craftingToolWrench", stackStick,
stackStick, stackStick, stackStick,
material.getFrameBox(2))){
- Utils.LOG_WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Framebox Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -154,10 +154,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
null, material.getRod(1), null,
null, null, null,
material.getBolt(2))){
- Utils.LOG_WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -168,10 +168,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
null, material.getIngot(1), null,
null, null, null,
material.getRod(1))){
- Utils.LOG_WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -181,10 +181,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
material.getLongRod(1), null, null,
null, null, null,
material.getRod(2))){
- Utils.LOG_WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed");
}
//Two small to long rod
@@ -193,10 +193,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
null, null, null,
null, null, null,
material.getLongRod(1))){
- Utils.LOG_WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Failed");
}
//Rotor Recipe
@@ -206,10 +206,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
material.getScrew(1), material.getRing(1), "craftingToolFile",
material.getPlate(1), "craftingToolScrewdriver", material.getPlate(1),
material.getRotor(1))){
- Utils.LOG_WARNING("Rotor Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Rotor Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Rotor Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Rotor Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -220,10 +220,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
material.getPlate(1), "craftingToolWrench", material.getPlate(1),
material.getRod(1), material.getPlate(1), material.getRod(1),
material.getGear(1))){
- Utils.LOG_WARNING("Gear Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Gear Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Gear Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Gear Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@@ -234,10 +234,10 @@ public class RecipeGen_ShapedCrafting implements Runnable{
material.getBolt(1), null, null,
null, null, null,
material.getScrew(1))){
- Utils.LOG_WARNING("Screw Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Screw Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Utils.LOG_WARNING("Screw Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Screw Recipe: "+material.getLocalizedName()+" - Failed");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 3c43e73faf..0dd566eb2d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -3,10 +3,8 @@ package gtPlusPlus.xmod.gregtech.recipes;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.util.CustomRecipeMap;
-import gregtech.api.util.GT_Recipe;
import gregtech.api.util.Recipe_GT;
-import gregtech.common.GT_RecipeAdder;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_CokeOven;
@@ -25,7 +23,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
//RECIPEHANDLER_CokeOven.debug1();
if (((aInput1 == null) /*&& (aFluidInput == null)*/) || ((aOutput == null) || (aFluidOutput == null))) {
//Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
+ Logger.WARNING("Something was null, returning false");
return false;
}
@@ -34,7 +32,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
//RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) {
//Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
+ Logger.WARNING("Something was null, returning false");
return false;
}
@@ -43,7 +41,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
//RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
//Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
+ Logger.WARNING("Something was null, returning false");
return false;
}
@@ -64,12 +62,12 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return true;
} catch (final NullPointerException e){
- Utils.LOG_WARNING("Something was null, returning false");
+ Logger.WARNING("Something was null, returning false");
return false;
}
} catch (final Throwable e){
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Failed.");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Failed.");
e.getStackTrace();
return false;
}
@@ -82,7 +80,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
//RECIPEHANDLER_MatterFabricator.debug1();
if (aFluidOutput == null) {
//Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
+ Logger.WARNING("Something was null, returning false");
return false;
}
@@ -107,7 +105,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
} catch (final Throwable e){
//Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Failed.");
+ Logger.WARNING("Failed.");
e.getStackTrace();
return false;
}
@@ -134,7 +132,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) {
if (aInput1 == null) {
- Utils.LOG_WARNING("Fuel Input is Invalid.");
+ Logger.WARNING("Fuel Input is Invalid.");
return false;
}
//new GregtechRecipe(aInput1, aOutput1, GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
@@ -190,7 +188,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addDehydratorRecipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput, int aDuration, final int aEUt) {
- Utils.LOG_WARNING("Trying to add a Dehydrator recipe.");
+ Logger.WARNING("Trying to add a Dehydrator recipe.");
try{
if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
return false;
@@ -201,7 +199,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutput, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
//RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null, aOutput, aDuration, aEUt);
return true;
- }catch (final NullPointerException e){Utils.LOG_WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");return false;}
+ }catch (final NullPointerException e){Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");return false;}
}
@@ -209,18 +207,18 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration, final int aEUt) throws IndexOutOfBoundsException{
- Utils.LOG_WARNING("Trying to add a Dehydrator recipe.");
+ Logger.WARNING("Trying to add a Dehydrator recipe.");
try{
if (aInput[0] != null){
- Utils.LOG_WARNING("Recipe requires input: "+aInput[0].getDisplayName()+" x"+aInput[0].stackSize);
+ Logger.WARNING("Recipe requires input: "+aInput[0].getDisplayName()+" x"+aInput[0].stackSize);
}
if (aInput.length > 1){
if (aInput[1] != null){
- Utils.LOG_WARNING("Recipe requires input: "+aInput[1].getDisplayName()+" x"+aInput[1].stackSize);
+ Logger.WARNING("Recipe requires input: "+aInput[1].getDisplayName()+" x"+aInput[1].stackSize);
}
}
if (aFluidInput != null){
- Utils.LOG_WARNING("Recipe requires input: "+aFluidInput.getFluid().getName()+" "+aFluidInput.amount+"mbst");
+ Logger.WARNING("Recipe requires input: "+aFluidInput.getFluid().getName()+" "+aFluidInput.amount+"mbst");
}
if (((aInput[0] == null) && (aFluidInput == null)) || ((aOutputItems == null) && (aFluidOutput == null))) {
return false;
@@ -229,36 +227,36 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
if (aOutputItems != null){
- Utils.LOG_WARNING("Recipe will output: "+ItemUtils.getArrayStackNames(aOutputItems));
+ Logger.WARNING("Recipe will output: "+ItemUtils.getArrayStackNames(aOutputItems));
}
if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
return false;
}
if (aFluidOutput != null){
- Utils.LOG_WARNING("Recipe will output: "+aFluidOutput.getFluid().getName());
+ Logger.WARNING("Recipe will output: "+aFluidOutput.getFluid().getName());
}
if (aInput.length == 1){
- Utils.LOG_WARNING("Dehydrator recipe only has a single input item.");
+ Logger.WARNING("Dehydrator recipe only has a single input item.");
Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
else {
- Utils.LOG_WARNING("Dehydrator recipe has two input items.");
+ Logger.WARNING("Dehydrator recipe has two input items.");
Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
return true;
- }catch (final NullPointerException e){Utils.LOG_WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");return false;}
+ }catch (final NullPointerException e){Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");return false;}
}
@Override
public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, final int aEUt) {
if ((aInput == null) || (aOutput == null)) {
- Utils.LOG_WARNING("Fail - Input or Output was null.");
+ Logger.WARNING("Fail - Input or Output was null.");
return false;
}
@@ -270,24 +268,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
}
if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
- Utils.LOG_WARNING("Recipe did not register.");
+ Logger.WARNING("Recipe did not register.");
return false;
}
for (int das=0;das<aInput.length;das++){
if (aInput[das] != null) {
- Utils.LOG_WARNING("tMaterial["+das+"]: "+aInput[das].getDisplayName()+", Amount: "+aInput[das].stackSize);
+ Logger.WARNING("tMaterial["+das+"]: "+aInput[das].getDisplayName()+", Amount: "+aInput[das].stackSize);
}
}
Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, new ItemStack[]{null}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
return true;
}
-
+
@Override
public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, final int aChance, int aDuration, final int aEUt) {
if ((aInput == null) || (aOutput == null)) {
- Utils.LOG_WARNING("Fail - Input or Output was null.");
+ Logger.WARNING("Fail - Input or Output was null.");
return false;
}
@@ -299,13 +297,13 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
}
if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
- Utils.LOG_WARNING("Recipe did not register.");
+ Logger.WARNING("Recipe did not register.");
return false;
}
for (int das=0;das<aInput.length;das++){
if (aInput[das] != null) {
- Utils.LOG_WARNING("tMaterial["+das+"]: "+aInput[das].getDisplayName()+", Amount: "+aInput[das].stackSize);
+ Logger.WARNING("tMaterial["+das+"]: "+aInput[das].getDisplayName()+", Amount: "+aInput[das].stackSize);
}
}
@@ -353,7 +351,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
CustomRecipeMap.sFissionFuelProcessing.addRecipe(null, inputs, outputs, aDuration, aEUt, 0);
return true;
}
-
+
+ @Override
public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
if (aOutputs == null) {
@@ -372,7 +371,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
return false;
}
-
+
+ @Override
public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
@@ -390,55 +390,56 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
return true;
}
-
+
//Machine Component Assembler
- public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
- if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) {
- return false;
- }
- if (aOutput1 == null) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sComponentAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0);
- return true;
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
- private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) {
- boolean itemsNull = true;
- if (items != null) {
- for (final ItemStack itemStack : items) {
- if (itemStack != null) {
- itemsNull = false;
- break;
- }
+ @Override
+ public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
+ if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) {
+ return false;
+ }
+ if (aOutput1 == null) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) {
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sComponentAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) {
+ boolean itemsNull = true;
+ if (items != null) {
+ for (final ItemStack itemStack : items) {
+ if (itemStack != null) {
+ itemsNull = false;
+ break;
}
}
- boolean fluidsNull = true;
- if (fluids != null) {
- for (final FluidStack fluidStack : fluids) {
- if (fluidStack != null) {
- fluidsNull = false;
- break;
- }
+ }
+ boolean fluidsNull = true;
+ if (fluids != null) {
+ for (final FluidStack fluidStack : fluids) {
+ if (fluidStack != null) {
+ fluidsNull = false;
+ break;
}
}
- return itemsNull && fluidsNull;
}
-
+ return itemsNull && fluidsNull;
+ }
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java
index 392f732ab2..14caf330b8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java
@@ -1,46 +1,46 @@
package gtPlusPlus.xmod.gregtech.recipes.machines;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class RECIPEHANDLER_CokeOven {
public static void debug1(){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Walking Through CokeOven Recipe Creation.");
- Utils.LOG_WARNING("My name is Ralph and I will be your humble host.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Walking Through CokeOven Recipe Creation.");
+ Logger.WARNING("My name is Ralph and I will be your humble host.");
}
public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
}
public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+" & "+aInput2.getDisplayName()+" & liquid "+aFluidInput.getFluid().getName()+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
+ Logger.INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+" & "+aInput2.getDisplayName()+" & liquid "+aFluidInput.getFluid().getName()+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java
index 94e74458b3..7d02b83253 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java
@@ -1,6 +1,6 @@
package gtPlusPlus.xmod.gregtech.recipes.machines;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -8,33 +8,33 @@ import net.minecraftforge.fluids.FluidStack;
public class RECIPEHANDLER_Dehydrator {
public static void debug1(){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Walking Through Chemical Dehydrator Recipe Creation.");
- Utils.LOG_WARNING("My name is Willus and I will be your humble host.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Walking Through Chemical Dehydrator Recipe Creation.");
+ Logger.WARNING("My name is Willus and I will be your humble host.");
}
public static void debug2(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug3(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug4(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
+ Logger.WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
}
public static void debug5(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack[] aOutput, final int aDuration, final int aEUt){
@@ -72,10 +72,10 @@ public class RECIPEHANDLER_Dehydrator {
outputFluidName = "null";
}
- Utils.LOG_INFO("Successfully added a Chemical Dehydrator recipe for: "+ItemUtils.getArrayStackNames(aOutput)+" & "+outputFluidName+", Using "+inputAname+" & "+inputBname+" & liquid "+inputFluidname+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
+ Logger.INFO("Successfully added a Chemical Dehydrator recipe for: "+ItemUtils.getArrayStackNames(aOutput)+" & "+outputFluidName+", Using "+inputAname+" & "+inputBname+" & liquid "+inputFluidname+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java
index a40848d9df..df51f1ad77 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java
@@ -1,38 +1,38 @@
package gtPlusPlus.xmod.gregtech.recipes.machines;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import net.minecraftforge.fluids.FluidStack;
public class RECIPEHANDLER_MatterFabricator {
public static void debug1(){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Walking Through Matter Fabrication Recipe Creation.");
- Utils.LOG_WARNING("My name is Ralph and I will be your humble host.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Walking Through Matter Fabrication Recipe Creation.");
+ Logger.WARNING("My name is Ralph and I will be your humble host.");
}
public static void debug2(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
- Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
+ Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug3(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
- Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
+ Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
}
public static void debug4(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
- Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("Taking a step forward.");
+ Logger.WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
+ Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Passed.");
+ Logger.WARNING("aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
}
public static void debug5(final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt){
@@ -46,10 +46,10 @@ public class RECIPEHANDLER_MatterFabricator {
b = aFluidOutput.getFluid().getName();
}
- Utils.LOG_INFO("Successfully added a Matter Fabrication recipe for: "+b+", Using "+" liquid "+a+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
+ Logger.INFO("Successfully added a Matter Fabrication recipe for: "+b+", Using "+" liquid "+a+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
+ Logger.WARNING("==================================================================================");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
index 61b579b189..19e6379766 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/Gregtech4Content.java
@@ -1,9 +1,9 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -39,7 +39,7 @@ public class Gregtech4Content {
private static void tesseracts() {
// Gregtech 4 Tesseracts
- Utils.LOG_INFO("Gregtech 4 Content | Registering Tesseracts.");
+ Logger.INFO("Gregtech 4 Content | Registering Tesseracts.");
GregtechItemList.GT4_Tesseract_Generator
.set(new GT_MetaTileEntity_TesseractGenerator(833, "tesseract.generator", "Tesseract Generator", 4)
.getStackForm(1L));
@@ -50,7 +50,7 @@ public class Gregtech4Content {
private static void shelves() {
// Gregtech 4 Shelves
- Utils.LOG_INFO("Gregtech 4 Content | Registering Shelves.");
+ Logger.INFO("Gregtech 4 Content | Registering Shelves.");
GregtechItemList.GT4_Shelf
.set(new GT4Entity_Shelf(870, "gtplusplus.shelf.wooden", "Wood encased Shelf", "Stores Books & Things")
.getStackForm(1L));
@@ -69,7 +69,7 @@ public class Gregtech4Content {
private static void thermalBoiler() {
// Gregtech 4 Thermal Boiler
if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){
- Utils.LOG_INFO("Gregtech 4 Content | Registering Thermal Boiler.");
+ Logger.INFO("Gregtech 4 Content | Registering Thermal Boiler.");
GregtechItemList.GT4_Thermal_Boiler
.set(new GT4Entity_ThermalBoiler(875, "gtplusplus.thermal.boiler", "Thermal Boiler").getStackForm(1L));
}
@@ -78,7 +78,7 @@ public class Gregtech4Content {
private static void multiCrafter() {
// Gregtech 4 Multiblock Auto-Crafter
- Utils.LOG_INFO("Gregtech 4 Content | Registering Multiblock Crafter.");
+ Logger.INFO("Gregtech 4 Content | Registering Multiblock Crafter.");
GregtechItemList.GT4_Multi_Crafter.set(
new GT4Entity_AutoCrafter(876, "gtplusplus.autocrafter.multi", "Large Scale Auto-Asesembler v1.01").getStackForm(1L));
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java
index 0ac4379e7e..b99aed36ec 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java
@@ -2,10 +2,10 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.RECIPES_MachineComponents;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.*;
@@ -15,7 +15,7 @@ public class GregtechAdvancedBoilers {
public static void run() {
if (LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Advanced Boilers.");
+ Logger.INFO("Gregtech5u Content | Registering Advanced Boilers.");
run1();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
index a8c0e45f0b..27e6072f99 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
@@ -7,8 +7,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachin
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
public class GregtechAdvancedMixer {
@@ -25,7 +25,7 @@ public class GregtechAdvancedMixer {
GT_Recipe_Map oldMap = GT_Recipe.GT_Recipe_Map.sMixerRecipes;
GT_Recipe_Map map = Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes;
final Collection<GT_Recipe> x = oldMap.mRecipeList;
- Utils.LOG_INFO("Generating " + map.mUnlocalizedName + " Recipes.");
+ Logger.INFO("Generating " + map.mUnlocalizedName + " Recipes.");
for (final GT_Recipe g : x) {
Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes.add(g);
}
@@ -34,7 +34,7 @@ public class GregtechAdvancedMixer {
return true;
}
else {
- Utils.LOG_INFO("Failed to generate "+ map.mUnlocalizedName +" recipes.");
+ Logger.INFO("Failed to generate "+ map.mUnlocalizedName +" recipes.");
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java
index 33e17c8c0e..3f0a826feb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechComponentAssembler.java
@@ -8,9 +8,9 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraft.init.Items;
@@ -22,7 +22,7 @@ public class GregtechComponentAssembler {
public static void run() {
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Utils.LOG_INFO("Component Assemblers cannot be created in 5.08.33 during the pre-release. Please wait for 1.7.0 release.");
+ Logger.INFO("Component Assemblers cannot be created in 5.08.33 during the pre-release. Please wait for 1.7.0 release.");
return;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
index 1d62540a41..a584323cf3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
@@ -10,6 +10,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
@@ -51,7 +52,7 @@ public class GregtechConduits {
public static void run()
{
if (Gregtech){
- Utils.LOG_INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes.");
+ Logger.INFO("Gregtech5u Content | Registering Custom Cables/Wires/Pipes.");
if (CORE.ConfigSwitches.enableCustom_Cables) {
run1();
}
@@ -111,8 +112,8 @@ public class GregtechConduits {
final Materials T = Materials.valueOf(Material);
int V = Utils.calculateVoltageTier(Voltage);
if (V == -1){
- Utils.LOG_ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set.");
- Utils.LOG_ERROR(Material+" has defaulted to 8v.");
+ Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set.");
+ Logger.ERROR(Material+" has defaulted to 8v.");
V=0;
}
makeWires(T, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false, rgb);
@@ -121,7 +122,7 @@ public class GregtechConduits {
@SuppressWarnings("deprecation")
private static void makeWires(final Materials aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated, final short[] aRGB)
{
- Utils.LOG_WARNING("Gregtech5u Content | Registered "+aMaterial.name() +" as a new material for Wire & Cable.");
+ Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.name() +" as a new material for Wire & Cable.");
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L));
@@ -144,8 +145,8 @@ public class GregtechConduits {
private static void customWireFactory(final Material Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){
int V = Utils.calculateVoltageTier(Voltage);
if (V == -1){
- Utils.LOG_ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set.");
- Utils.LOG_ERROR(Material+" has defaulted to 8v.");
+ Logger.ERROR("Failed to set voltage on "+Material+". Invalid voltage of "+Voltage+"V set.");
+ Logger.ERROR(Material+" has defaulted to 8v.");
V=0;
}
makeCustomWires(Material, ID, insulatedLoss, uninsulatedLoss, Amps, GT_Values.V[V], true, false);
@@ -153,7 +154,7 @@ public class GregtechConduits {
private static void makeCustomWires(final Material aMaterial, final int aStartID, final long aLossInsulated, final long aLoss, final long aAmperage, final long aVoltage, final boolean aInsulatable, final boolean aAutoInsulated)
{
- Utils.LOG_WARNING("Gregtech5u Content | Registered "+aMaterial.getLocalizedName() +" as a new material for Wire & Cable.");
+ Logger.WARNING("Gregtech5u Content | Registered "+aMaterial.getLocalizedName() +" as a new material for Wire & Cable.");
registerOre(OrePrefixes.wireGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Wire", 0.125F, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L));
registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Wire", 0.25F, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L));
registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Wire", 0.375F, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L));
@@ -210,8 +211,8 @@ public class GregtechConduits {
V = 9;
}
else {
- Utils.LOG_ERROR("Failed to set voltage on "+Material.name()+". Invalid voltage of "+Voltage+"V set.");
- Utils.LOG_ERROR(Material.name()+" has defaulted to 8v.");
+ Logger.ERROR("Failed to set voltage on "+Material.name()+". Invalid voltage of "+Voltage+"V set.");
+ Logger.ERROR(Material.name()+" has defaulted to 8v.");
V = 0;
}
//makeWires(T, ID, 2L, 4L, 2L, GT_Values.V[V], true, false);
@@ -268,7 +269,7 @@ public class GregtechConduits {
output = "Void";
}
- Utils.LOG_INFO("Generating "+output+" pipes & respective recipes.");
+ Logger.INFO("Generating "+output+" pipes & respective recipes.");
ItemStack pipeIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingot"+output, 1);
ItemStack pipePlate = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plate"+output, 1);
@@ -280,11 +281,11 @@ public class GregtechConduits {
}
//Check all pipes are not null
- Utils.LOG_WARNING("Generated pipeTiny from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Tiny"+output, 1) != null) ? true : false));
- Utils.LOG_WARNING("Generated pipeSmall from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1) != null) ? true : false));
- Utils.LOG_WARNING("Generated pipeNormal from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1) != null) ? true : false));
- Utils.LOG_WARNING("Generated pipeLarge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1) != null) ? true : false));
- Utils.LOG_WARNING("Generated pipeHuge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1) != null) ? true : false));
+ Logger.WARNING("Generated pipeTiny from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Tiny"+output, 1) != null) ? true : false));
+ Logger.WARNING("Generated pipeSmall from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Small"+output, 1) != null) ? true : false));
+ Logger.WARNING("Generated pipeNormal from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Medium"+output, 1) != null) ? true : false));
+ Logger.WARNING("Generated pipeLarge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Large"+output, 1) != null) ? true : false));
+ Logger.WARNING("Generated pipeHuge from "+ materialName +"? "+ ((ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1) != null) ? true : false));
int eut = 120;
int time;
@@ -351,7 +352,7 @@ public class GregtechConduits {
pipePlateDouble, "craftingToolWrench", pipePlateDouble,
ItemUtils.getItemStackOfAmountFromOreDict("pipe"+"Huge"+output, 1));
} else {
- Utils.LOG_INFO("Failed to add a recipe for "+materialName+" Huge pipes. Double plates probably do not exist.");
+ Logger.INFO("Failed to add a recipe for "+materialName+" Huge pipes. Double plates probably do not exist.");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java
index 9b11baa2a0..7c419f5d36 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCyclotron.java
@@ -1,6 +1,6 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_Cyclotron;
@@ -8,7 +8,7 @@ public class GregtechCyclotron {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering COMET Cyclotron.");
+ Logger.INFO("Gregtech5u Content | Registering COMET Cyclotron.");
run1();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
index af856df84e..0c1cdf9855 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
@@ -4,11 +4,11 @@ import gregtech.api.enums.*;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -17,7 +17,7 @@ import net.minecraft.item.ItemStack;
public class GregtechDehydrator {
public static void run() {
if (LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Chemical Dehydrators.");
+ Logger.INFO("Gregtech5u Content | Registering Chemical Dehydrators.");
if (CORE.ConfigSwitches.enableMachine_Dehydrators) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java
index db389e5919..1232106d65 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechEnergyBuffer.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOreDictNames;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative.GregtechMetaCreativeEnergyBuffer;
@@ -18,7 +18,7 @@ public class GregtechEnergyBuffer
public static void run()
{
if (gtPlusPlus.core.lib.LoadedMods.Gregtech){
- Utils.LOG_INFO("Gregtech5u Content | Registering Energy Buffer Blocks.");
+ Logger.INFO("Gregtech5u Content | Registering Energy Buffer Blocks.");
if (CORE.ConfigSwitches.enableMachine_RocketEngines) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java
index 0fbf59a675..bae9396bb0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechGeothermalThermalGenerator.java
@@ -2,11 +2,11 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityGeothermalGenerator;
import net.minecraft.item.ItemStack;
@@ -15,7 +15,7 @@ public class GregtechGeothermalThermalGenerator {
public static void run() {
if (LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Geothermal Engines.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Geothermal Engines.");
if (CORE.ConfigSwitches.enableMachine_GeothermalEngines) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java
index a241fa7e42..4a76f6a88e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialBlastSmelter.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_AlloyBlastSmelter;
@@ -9,7 +9,7 @@ public class GregtechIndustrialBlastSmelter {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Alloy Blast Smelter Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Alloy Blast Smelter Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_AlloyBlastSmelter) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java
index bb317487d7..9a595265ac 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCentrifuge.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialCentrifuge;
@@ -9,7 +9,7 @@ public class GregtechIndustrialCentrifuge {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Centrifuge Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Centrifuge Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialCentrifuge) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java
index 4a0b6cff96..4fbcd3ecdb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCokeOven.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialCokeOven;
@@ -9,7 +9,7 @@ public class GregtechIndustrialCokeOven {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Coke Oven Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Coke Oven Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialCokeOven) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java
index 8d0760d7dc..fe05c17d1f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCuttingFactory.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialCuttingMachine;
@@ -9,7 +9,7 @@ public class GregtechIndustrialCuttingFactory {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Cutting Factory Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Cutting Factory Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialCuttingMachine) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java
index bdcee6be3d..e20d59df0e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElectrolyzer.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialElectrolyzer;
@@ -9,7 +9,7 @@ public class GregtechIndustrialElectrolyzer {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Electrolyzer Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Electrolyzer Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialElectrolyzer) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java
index be40f59c06..9099bf8a8c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFuelRefinery.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_Refinery;
@@ -9,7 +9,7 @@ public class GregtechIndustrialFuelRefinery {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Fuel Processing and Refinery Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Fuel Processing and Refinery Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_NuclearFuelRefinery) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java
index 05988a1fdb..5da9dbfe9f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialGeneratorArray.java
@@ -1,6 +1,6 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityGeneratorArray;
@@ -8,7 +8,7 @@ public class GregtechIndustrialGeneratorArray {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Generator Array Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Generator Array Multiblock.");
//if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO
run1();
//}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java
index ef244020a5..e1083df78d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMacerator.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialMacerator;
@@ -9,7 +9,7 @@ public class GregtechIndustrialMacerator {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Maceration Stack Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Maceration Stack Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialMacerationStack) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java
index 10caa89f75..dda459f25d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMassFabricator.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_MassFabricator;
@@ -9,7 +9,7 @@ public class GregtechIndustrialMassFabricator {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Matter Fabricator Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Matter Fabricator Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_MatterFabricator) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java
index 81252f77a9..6e650948e0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialMultiTank.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_MultiTank;
@@ -9,7 +9,7 @@ public class GregtechIndustrialMultiTank {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Multitank controller blocks.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Multitank controller blocks.");
if (CORE.ConfigSwitches.enableMultiblock_MultiTank) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java
index 3629ebdecc..abff78105d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialPlatePress.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialPlatePress;
@@ -9,7 +9,7 @@ public class GregtechIndustrialPlatePress {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Press Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Press Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java
index 62f4209456..55f3f57210 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialMacerator;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialSifter;
@@ -10,7 +10,7 @@ public class GregtechIndustrialSifter {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Sifter Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Sifter Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialSifter) { // TODO
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java
index 910dd33576..92cecb0730 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialThermalCentrifuge.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialMacerator;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialThermalCentrifuge;
@@ -10,7 +10,7 @@ public class GregtechIndustrialThermalCentrifuge {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Thermal Centrifuge Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Thermal Centrifuge Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialThermalCentrifuge) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java
index 124661a917..84c8441aaf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialTreeFarm.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityTreeFarm;
@@ -9,7 +9,7 @@ public class GregtechIndustrialTreeFarm {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Tree Farm Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Tree Farm Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java
index f6fb887b01..fa7c20da1d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWashPlant.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialMacerator;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialThermalCentrifuge;
@@ -11,7 +11,7 @@ public class GregtechIndustrialWashPlant {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Wash Plant Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Wash Plant Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java
index a883ded0dc..1be17c685c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialWiremill.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialWireMill;
@@ -9,7 +9,7 @@ public class GregtechIndustrialWiremill {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Wire Factory Multiblock.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Wire Factory Multiblock.");
if (CORE.ConfigSwitches.enableMultiblock_IndustrialWireMill) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java
index 30f3d49734..10ff50ab52 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIronBlastFurnace.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IronBlastFurnace;
@@ -9,7 +9,7 @@ public class GregtechIronBlastFurnace {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Iron Blast Furnace.");
+ Logger.INFO("Gregtech5u Content | Registering Iron Blast Furnace.");
if (CORE.ConfigSwitches.enableMultiblock_IronBlastFurnace) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
index cb731012b6..6740dc2aca 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMTE_NuclearReactor;
@@ -9,7 +9,7 @@ public class GregtechLFTR {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Liquid Fluorine Thorium Reactor [LFTR].");
+ Logger.INFO("Gregtech5u Content | Registering Liquid Fluorine Thorium Reactor [LFTR].");
if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java
index 7f88c49782..a6d9f7e7e1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java
@@ -8,8 +8,8 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.Recipe_GT;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -34,7 +34,7 @@ public class GregtechMiniRaFusion {
int mRecipeCount = 0;
GT_Recipe_Map r = GT_Recipe.GT_Recipe_Map.sFusionRecipes;
final Collection<GT_Recipe> x = r.mRecipeList;
- Utils.LOG_INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug.");
+ Logger.INFO("Dumping " + r.mUnlocalizedName + " Recipes for Debug.");
for (final GT_Recipe newBo : x) {
if (Recipe_GT.Gregtech_Recipe_Map.sSlowFusionRecipes.addRecipe(
true,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java
index 320d9980c4..582cd542b6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNitroDieselFix.java
@@ -20,6 +20,7 @@ import gregtech.api.objects.MaterialStack;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
@@ -33,7 +34,7 @@ public class GregtechNitroDieselFix {
@SuppressWarnings("unchecked")
public static void run(){
if (CORE.ConfigSwitches.enableNitroFix){
- Utils.LOG_INFO("Gregtech5u Content | Attempting to Fix Nitro-Diesel production.");
+ Logger.INFO("Gregtech5u Content | Attempting to Fix Nitro-Diesel production.");
try {
int mSub = Utils.getGregtechSubVersion();
if (mSub != 0){
@@ -42,7 +43,7 @@ public class GregtechNitroDieselFix {
Object df = mb.getConstructor(int.class, TextureSet.class, String.class).newInstance(975, TextureSet.SET_FLUID, "Nitro-Diesel [Old]");
if (mb.isInstance(df)){
- Utils.LOG_INFO("[Nitro] Created new instance of Material builder, for Nitro fix.");
+ Logger.INFO("[Nitro] Created new instance of Material builder, for Nitro fix.");
//Get Methods
Method addFluid = mb.getDeclaredMethod("addFluid");
@@ -53,7 +54,7 @@ public class GregtechNitroDieselFix {
Method setTemp = mb.getDeclaredMethod("setLiquidTemperature", int.class);
Method setRGB = mb.getDeclaredMethod("setRGB", int.class, int.class, int.class);
Method construct = mb.getDeclaredMethod("constructMaterial");
- Utils.LOG_INFO("[Nitro] Got internal methods for setting fields.");
+ Logger.INFO("[Nitro] Got internal methods for setting fields.");
//Invoke the methods
addFluid.invoke(df);
@@ -64,10 +65,10 @@ public class GregtechNitroDieselFix {
setTemp.invoke(df, 295);
setRGB.invoke(df, 200, 255, 0);
Materials mNitroFix = (Materials) construct.invoke(df);
- Utils.LOG_INFO("[Nitro] Invoked 8 method calls successfully.");
+ Logger.INFO("[Nitro] Invoked 8 method calls successfully.");
GT_Mod.gregtechproxy.addFluid("NitroFuel_Old", "Nitro Diesel [Old]", mNitroFix, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, mNitroFix, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- Utils.LOG_INFO("[Nitro] Added a fluid.");
+ Logger.INFO("[Nitro] Added a fluid.");
/**
@@ -101,7 +102,7 @@ public class GregtechNitroDieselFix {
}
}
}
- Utils.LOG_INFO("[Nitro] Found "+mIndexSingle+" single block Chemical Reactor recipes to remove.");
+ Logger.INFO("[Nitro] Found "+mIndexSingle+" single block Chemical Reactor recipes to remove.");
//Iterate Multi Block recipes for Nitro production.
for (GT_Recipe rnd : xMulti){
@@ -111,7 +112,7 @@ public class GregtechNitroDieselFix {
}
}
}
- Utils.LOG_INFO("[Nitro] Found "+mIndexMulti+" multi block Chemical Reactor recipes to remove.");
+ Logger.INFO("[Nitro] Found "+mIndexMulti+" multi block Chemical Reactor recipes to remove.");
//Remove Single Block recipes found.
int mRemovedSingle = 0;
@@ -121,7 +122,7 @@ public class GregtechNitroDieselFix {
mRemovedSingle++;
}
}
- Utils.LOG_INFO("[Nitro] Removed "+mRemovedSingle+" single block Chemical Reactor recipes.");
+ Logger.INFO("[Nitro] Removed "+mRemovedSingle+" single block Chemical Reactor recipes.");
//Remove Multi Block recipes found.
for (GT_Recipe multi : toRemoveMulti){
@@ -129,7 +130,7 @@ public class GregtechNitroDieselFix {
mRemovedMulti++;
}
}
- Utils.LOG_INFO("[Nitro] Removed "+mRemovedMulti+" multi block Chemical Reactor recipes.");
+ Logger.INFO("[Nitro] Removed "+mRemovedMulti+" multi block Chemical Reactor recipes.");
Materials mGlycerol = Materials.valueOf("Glycerol");
Materials mLightFuel = Materials.valueOf("LightFuel");
@@ -138,34 +139,34 @@ public class GregtechNitroDieselFix {
Materials mFuels[] = {mLightFuel, Materials.Fuel};
for (Materials fuel : mFuels){
boolean didAdd[] = new boolean[3];
- Utils.LOG_INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the mixer, using "+fuel.mDefaultLocalName+" as the fuel input.");
+ Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the mixer, using "+fuel.mDefaultLocalName+" as the fuel input.");
didAdd[0] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NI, GT_Values.NI, GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20, 30);
didAdd[1] = GT_Values.RA.addMixerRecipe(getCells(fuel, 4), GT_Values.NI, GT_Values.NI, GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20, 30);
didAdd[2] = GT_Values.RA.addMixerRecipe(getCells(mGlycerol, 1), GT_Values.NI,GT_Values.NI,GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20, 30);
- Utils.LOG_INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]);
+ Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]);
}
for (Materials fuel : mFuels){
boolean didAdd[] = new boolean[3];
- Utils.LOG_INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the chemical reactors, using "+fuel.mDefaultLocalName+" as the fuel input.");
+ Logger.INFO("[Nitro] Getting ready to add back in the old nitro-diesel recipe to the chemical reactors, using "+fuel.mDefaultLocalName+" as the fuel input.");
didAdd[0] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), getCells(mGlycerol, 1), GT_Values.NF, GT_Values.NF, getCells(mNitroFix, 5), 20);
didAdd[1] = GT_Values.RA.addChemicalRecipe(getCells(fuel, 4), GT_Values.NI, mGlycerol.getFluid(1000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(4L), 20);
didAdd[2] = GT_Values.RA.addChemicalRecipe(getCells(mGlycerol, 1), GT_Values.NI, fuel.getFluid(4000L),mNitroFix.getFluid(5000L), ItemList.Cell_Empty.get(1L), 20);
- Utils.LOG_INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]);
+ Logger.INFO("[Nitro] Did the recipes add? 1: "+didAdd[0]+" | 2: "+didAdd[1]+" | 3: "+didAdd[2]);
}
- Utils.LOG_INFO("[Nitro] Getting ready to add back in the old glycerol recipe!");
+ Logger.INFO("[Nitro] Getting ready to add back in the old glycerol recipe!");
GT_Values.RA.addChemicalRecipe(getCells(Materials.Nitrogen, 1), getDust(Materials.Carbon, 1), Materials.Water.getFluid(2000L), mGlycerol.getFluid(3000L), ItemList.Cell_Empty.get(1), 3000);
- Utils.LOG_INFO("[Nitro] Added recipes.");
+ Logger.INFO("[Nitro] Added recipes.");
}
}
}
}
catch (ClassNotFoundException | IllegalArgumentException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
- Utils.LOG_INFO("[Nitro] ================ Error ================");
+ Logger.INFO("[Nitro] ================ Error ================");
e.printStackTrace();
- Utils.LOG_INFO("[Nitro] ================ Error ================");
+ Logger.INFO("[Nitro] ================ Error ================");
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java
index cec8dc1810..9e006ba59e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.*;
@@ -9,7 +9,7 @@ public class GregtechPollutionDevices {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Anti-Pollution Devices.");
+ Logger.INFO("Gregtech5u Content | Registering Anti-Pollution Devices.");
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java
index 6a2e55f3c9..3abf673930 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPowerSubStation.java
@@ -4,9 +4,9 @@ import gregtech.api.enums.ItemList;
import gregtech.api.enums.OreDictNames;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery;
@@ -16,7 +16,7 @@ public class GregtechPowerSubStation {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Power Substation Node.");
+ Logger.INFO("Gregtech5u Content | Registering Power Substation Node.");
if (CORE.ConfigSwitches.enableMultiblock_PowerSubstation) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
index 954f652b40..a7332657ce 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
@@ -1,6 +1,6 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG;
@@ -8,7 +8,7 @@ public class GregtechRTG {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering RTG.");
+ Logger.INFO("Gregtech5u Content | Registering RTG.");
run1();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
index 35334f3e34..b929b1e673 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
@@ -2,11 +2,11 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityRocketFuelGenerator;
import net.minecraft.item.ItemStack;
@@ -15,7 +15,7 @@ public class GregtechRocketFuelGenerator {
public static void run() {
if (LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Industrial Rocket Engines.");
+ Logger.INFO("Gregtech5u Content | Registering Industrial Rocket Engines.");
if (CORE.ConfigSwitches.enableMachine_RocketEngines) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java
index 282e08de30..cc7e43cbe8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSafeBlock.java
@@ -2,15 +2,15 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock;
public class GregtechSafeBlock {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Lockable Safe Blocks.");
+ Logger.INFO("Gregtech5u Content | Registering Lockable Safe Blocks.");
if (CORE.ConfigSwitches.enableMachine_Safes) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java
index 77a8f8e517..45f78d660b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarGenerators.java
@@ -1,16 +1,16 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntitySolarGenerator;
public class GregtechSolarGenerators {
public static void run() {
if (LoadedMods.Gregtech && ConfigSwitches.enableMachine_SolarGenerators) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Solar Generator Blocks.");
+ Logger.INFO("Gregtech5u Content | Registering Solar Generator Blocks.");
if (CORE.ConfigSwitches.enableMachine_SolarGenerators) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java
index ec7f55a210..60e6b31936 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSteamCondenser.java
@@ -1,7 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaCondensor;
@@ -9,7 +9,7 @@ public class GregtechSteamCondenser {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Steam Condensor.");
+ Logger.INFO("Gregtech5u Content | Registering Steam Condensor.");
if (CORE.ConfigSwitches.enableMachine_SteamConverter) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
index d30007eb22..5cf3c346ae 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java
@@ -1,15 +1,15 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredTank;
public class GregtechTieredFluidTanks {
public static void run() {
if (LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Portable Fluid Tanks.");
+ Logger.INFO("Gregtech5u Content | Registering Portable Fluid Tanks.");
if (CORE.ConfigSwitches.enableMachine_FluidTanks) {
run1();
}
@@ -19,9 +19,9 @@ public class GregtechTieredFluidTanks {
private static void run1() {
int ID = 817;
- Utils.LOG_INFO("Is New Horizons Loaded? " + CORE.GTNH);
+ Logger.INFO("Is New Horizons Loaded? " + CORE.GTNH);
if (CORE.GTNH) {
- Utils.LOG_INFO("Only loading ULV-IV tier tanks for New Horizons Modpack.");
+ Logger.INFO("Only loading ULV-IV tier tanks for New Horizons Modpack.");
}
GregtechItemList.GT_FluidTank_ULV
.set(new GT_MetaTileEntity_TieredTank(ID++, "fluidtank.tier.00", "Ultra Low Voltage Fluid Tank", 0)
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java
index 8dede46019..07139da024 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTreeFarmerTE.java
@@ -1,14 +1,14 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaTreeFarmerStructural;
public class GregtechTreeFarmerTE {
public static void run() {
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Tree Farmer Structural Block.");
+ Logger.INFO("Gregtech5u Content | Registering Tree Farmer Structural Block.");
if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java
index 6e7e71e5b9..a6fef4dddd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechWirelessChargers.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
@@ -12,7 +13,7 @@ public class GregtechWirelessChargers {
public static void run(){
if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- Utils.LOG_INFO("Gregtech5u Content | Registering Wireless Chargers.");
+ Logger.INFO("Gregtech5u Content | Registering Wireless Chargers.");
long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java
index d6925035b0..289ea342f5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/NewHorizonsAccelerator.java
@@ -2,11 +2,11 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntityGeothermalGenerator;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_WorldAccelerator;
@@ -16,7 +16,7 @@ public class NewHorizonsAccelerator {
public static void run() {
if (LoadedMods.Gregtech && !CORE.GTNH) {
- Utils.LOG_INFO("New Horizons Content | Registering World Accelerators.");
+ Logger.INFO("New Horizons Content | Registering World Accelerators.");
if (CORE.ConfigSwitches.enableMachine_WorldAccelerators) {
run1();
}
diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
index 687a5afa3b..2e6c9c5c84 100644
--- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
+++ b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
@@ -1,9 +1,12 @@
package gtPlusPlus.xmod.growthcraft.fishtrap;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
@@ -11,30 +14,62 @@ import net.minecraft.item.ItemStack;
public class FishTrapHandler {
private static final String[] fishTypes = {"fish", "junk", "treasure"};
+ private static Object mFishingRegistry;
+ private static Growthcraft_Old mHandler;
+
+ public static Object getFishingRegistry(){
+ if (mFishingRegistry != null){
+ return mFishingRegistry;
+ }
+ else {
+ return setFishTrapRegistry();
+ }
+ }
+
+ private final static Object setFishTrapRegistry(){
+ Class mFishingRegistryClass;
+ try {
+ mFishingRegistryClass = Class.forName("growthcraft.api.fishtrap.FishTrapRegistry");
+ final Method mFishingRegistryMethod = mFishingRegistryClass.getDeclaredMethod("getInstance", null);
+ mFishingRegistry = mFishingRegistryMethod.invoke(null);
+ if (mFishingRegistry != null){
+ return mFishingRegistry;
+ }
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ }
+ return null;
+ }
protected static void addFish(final String lootType, final ItemStack lootStack, final int lootChance){
+ if (mFishingRegistry == null){
+ setFishTrapRegistry();
+ }
+ if (mHandler == null){
+ mHandler = new Growthcraft_Old();
+ }
+
final String GCVersion = LoadedMods.getModVersion("Growthcraft");
-
final String[] versionString = GCVersion.split("//.");
if (LoadedMods.getModVersion("Growthcraft").contains("2.3.1") || versionString[1].equals("3")){
if (lootType.equals(fishTypes[0])){
- Growthcraft_Old.addTrapFish(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps.");
+ mHandler.addTrapFish(lootStack, lootChance);
+ Logger.INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps.");
}
else if (lootType.equals(fishTypes[1])){
- Growthcraft_Old.addTrapJunk(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps.");
+ mHandler.addTrapJunk(lootStack, lootChance);
+ Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps.");
}
else if (lootType.equals(fishTypes[2])){
- Growthcraft_Old.addTrapTreasure(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps.");
+ mHandler.addTrapTreasure(lootStack, lootChance);
+ Logger.INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps.");
}
else {
return;
}
- }
+ }/*
else if (LoadedMods.getModVersion("Growthcraft").contains("2.7.2")){
if (lootType.equals(fishTypes[0])){
Growthcraft_New.addTrapFish(lootStack, lootChance);
@@ -51,10 +86,10 @@ public class FishTrapHandler {
else {
return;
}
- }
+ }*/
else {
- Utils.LOG_INFO("Extra Fish loot for Growthcraft Fishtraps disabled. Found V."+LoadedMods.getModVersion("Growthcraft"));
+ Logger.INFO("Extra Fish loot for Growthcraft Fishtraps disabled. Found V."+LoadedMods.getModVersion("Growthcraft"));
}
}
diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
index 4405709888..3b6b46d630 100644
--- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
+++ b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
@@ -1,24 +1,84 @@
package gtPlusPlus.xmod.growthcraft.fishtrap;
-import growthcraft.api.fishtrap.FishTrapEntry;
-import growthcraft.api.fishtrap.FishTrapRegistry;
+import java.lang.reflect.*;
+
import net.minecraft.item.ItemStack;
public class Growthcraft_New {
- public static void addTrapJunk(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance));
-
+ Method addTrapJunk;
+ Method addTrapTreasure;
+ Method addTrapFish;
+ Object FishTrapRegistryO;
+
+ public Growthcraft_New(){
+ setFishTrapRegistry();
+ }
+
+ void setFishTrapRegistry(){
+ try {
+ Class<?> FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
+ Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
+ if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){
+ addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry);
+ addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry);
+ addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry);
+ FishTrapRegistryO = FishTrapHandler.getFishingRegistry();
+ }
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private Object createFishTrapEntry(ItemStack loot, int chance){
+ try {
+ Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
+ Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class);
+ if (FishTrapEntry != null){
+ Constructor[] constructors = FishTrapEntry.getDeclaredConstructors();
+ constructors[0].setAccessible(true);
+ Object x = constructors[0].newInstance(loot, chance);
+ if (x != null){
+ return x;
+ }
+ }
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
+
+ return null;
+ }
+
+ private boolean invoke(Method m, ItemStack o, int p){
+ try {
+ Object I = createFishTrapEntry(o, p);
+ m.invoke(FishTrapRegistryO, I);
+ return true;
+ }
+ catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
+ return false;
}
- public static void addTrapTreasure(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance));
+ public void addTrapJunk(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance));
+ if (addTrapJunk != null){
+ invoke(addTrapJunk, loot, lootChance);
+ }
}
- public static void addTrapFish(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance));
+ public void addTrapTreasure(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance));
+ if (addTrapTreasure != null){
+ invoke(addTrapTreasure, loot, lootChance);
+ }
+ }
+ public void addTrapFish(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance));
+ if (addTrapFish != null){
+ invoke(addTrapFish, loot, lootChance);
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
index f988abd53a..62fe2f29cb 100644
--- a/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
+++ b/src/Java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
@@ -1,24 +1,84 @@
package gtPlusPlus.xmod.growthcraft.fishtrap;
-import growthcraft.api.fishtrap.FishTrapEntry;
-import growthcraft.api.fishtrap.FishTrapRegistry;
+import java.lang.reflect.*;
+
import net.minecraft.item.ItemStack;
public class Growthcraft_Old {
- public static void addTrapJunk(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance));
-
+ Method addTrapJunk;
+ Method addTrapTreasure;
+ Method addTrapFish;
+ Object FishTrapRegistryO;
+
+ public Growthcraft_Old(){
+ setFishTrapRegistry();
+ }
+
+ void setFishTrapRegistry(){
+ try {
+ Class<?> FishTrapRegistryClass = Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
+ Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
+ if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())){
+ addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry);
+ addTrapTreasure = FishTrapRegistryClass.getDeclaredMethod("addTrapTreasure", FishTrapEntry);
+ addTrapFish = FishTrapRegistryClass.getDeclaredMethod("addTrapFish", FishTrapEntry);
+ FishTrapRegistryO = FishTrapHandler.getFishingRegistry();
+ }
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | SecurityException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private Object createFishTrapEntry(ItemStack loot, int chance){
+ try {
+ Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
+ Object o = FishTrapEntry.getConstructor(ItemStack.class, int.class);
+ if (FishTrapEntry != null){
+ Constructor[] constructors = FishTrapEntry.getDeclaredConstructors();
+ constructors[0].setAccessible(true);
+ Object x = constructors[0].newInstance(loot, chance);
+ if (x != null){
+ return x;
+ }
+ }
+ }
+ catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
+
+ return null;
+ }
+
+ private boolean invoke(Method m, ItemStack o, int p){
+ try {
+ Object I = createFishTrapEntry(o, p);
+ m.invoke(FishTrapRegistryO, I);
+ return true;
+ }
+ catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
+ return false;
}
- public static void addTrapTreasure(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance));
+ public void addTrapJunk(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapJunk(new FishTrapEntry(loot, lootChance));
+ if (addTrapJunk != null){
+ invoke(addTrapJunk, loot, lootChance);
+ }
}
- public static void addTrapFish(final ItemStack loot, final int lootChance){
- FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance));
+ public void addTrapTreasure(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapTreasure(new FishTrapEntry(loot, lootChance));
+ if (addTrapTreasure != null){
+ invoke(addTrapTreasure, loot, lootChance);
+ }
+ }
+ public void addTrapFish(final ItemStack loot, final int lootChance){
+ //FishTrapRegistry.instance().addTrapFish(new FishTrapEntry(loot, lootChance));
+ if (addTrapFish != null){
+ invoke(addTrapFish, loot, lootChance);
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java b/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java
index 5eea877bf7..5c0ca52ec5 100644
--- a/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java
+++ b/src/Java/gtPlusPlus/xmod/ic2/recipe/RECIPE_IC2.java
@@ -2,9 +2,9 @@ package gtPlusPlus.xmod.ic2.recipe;
import gregtech.api.enums.*;
import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -137,30 +137,30 @@ public class RECIPE_IC2 {
GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.DarkIron), Character.valueOf('S'), OrePrefixes.screw.get(Materials.DarkIron)});
GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.TungstenSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.TungstenSteel)});
GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_WindmillShaft.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Rod, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Molybdenum), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Molybdenum)});
- Utils.LOG_INFO("Added recipe item for GT5 Extruder: Shaft Shape");
+ Logger.INFO("Added recipe item for GT5 Extruder: Shaft Shape");
//Shaft Recipes
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250);
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T1), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T1, 2560, 250);
if (LoadedMods.EnderIO || CORE.GTNH) {
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [Energetic]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Energetic]");
} else {
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [Magnalium]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Magnalium]");
}
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500);
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T2), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T2, 5120, 500);
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [TungstenSteel]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [TungstenSteel]");
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000);
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T3), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T3, 10240, 2000);
if (LoadedMods.EnderIO || CORE.GTNH) {
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [Vibrant]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Vibrant]");
} else {
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [Ultimet]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Ultimet]");
}
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(9L, block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000);
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, shaft_block_T4), GregtechItemList.Shape_Extruder_WindmillShaft.get(0L, new Object[0]), shaft_T4, 20480, 4000);
- Utils.LOG_INFO("Added recipe for GT5 Extruder: Windmill Shaft [Iridium]");
+ Logger.INFO("Added recipe for GT5 Extruder: Windmill Shaft [Iridium]");
if (!CORE.GTNH) {
//Rotor Recipes
diff --git a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java b/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java
index ce4ec38a09..da3cd268bd 100644
--- a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java
+++ b/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java
@@ -4,8 +4,8 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.nbt.NBTUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
@@ -29,7 +29,7 @@ public class HANDLER_Mekanism {
public static void postInit(){
if (LoadedMods.Mekanism && !LoadedMods.RedTech){
- Utils.LOG_INFO("Performing GT recipe balance for Mek. now that it's Osmium is useless.");
+ Logger.INFO("Performing GT recipe balance for Mek. now that it's Osmium is useless.");
//Steel Casing
final ItemStack tSteelCasing = ItemUtils.simpleMetaStack("Mekanism:BasicBlock:8", 8, 1);
@@ -263,12 +263,12 @@ public class HANDLER_Mekanism {
}
}
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Utils.LOG_INFO("[Mek] Failed to use the built-in recipe remover from Mekanism.");
+ Logger.INFO("[Mek] Failed to use the built-in recipe remover from Mekanism.");
}
if (!removed){
removed = GT_ModHandler.removeRecipeByOutput(item);
}
- Utils.LOG_INFO("[Mek] Successfully removed the recipe for "+item.getDisplayName()+".");
+ Logger.INFO("[Mek] Successfully removed the recipe for "+item.getDisplayName()+".");
return removed;
}
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/common/ItemBlockThaumcraft.java b/src/Java/gtPlusPlus/xmod/thaumcraft/common/ItemBlockThaumcraft.java
index 465f443906..f52d48db70 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/common/ItemBlockThaumcraft.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/common/ItemBlockThaumcraft.java
@@ -22,6 +22,7 @@ public class ItemBlockThaumcraft extends ItemBlockEntityBase{
return super.getUnlocalizedName() + "." + par1ItemStack.getItemDamage();
}
+ @Override
public boolean placeBlockAt(final ItemStack stack, final EntityPlayer player, final World world, final int x,
final int y, final int z, final int side, final float hitX, final float hitY, final float hitZ,
final int metadata) {
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/common/tile/TCTileEntities.java b/src/Java/gtPlusPlus/xmod/thaumcraft/common/tile/TCTileEntities.java
index 5366eb9cec..f2de41e308 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/common/tile/TCTileEntities.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/common/tile/TCTileEntities.java
@@ -2,14 +2,14 @@ package gtPlusPlus.xmod.thaumcraft.common.tile;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
public class TCTileEntities {
@Optional.Method(modid = "Thaumcraft")
public static void init() {
- Utils.LOG_INFO("Registering TC Tile Entities.");
+ Logger.INFO("Registering TC Tile Entities.");
if (LoadedMods.Thaumcraft){
GameRegistry.registerTileEntity(TileFastAlchemyFurnace.class, "TileFastAlchemyFurnace");
GameRegistry.registerTileEntity(TileFastArcaneAlembic.class, "TileFastArcaneAlembic");
diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java
index 82b15e6968..fe9a82c6b5 100644
--- a/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java
+++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/HANDLER_TF.java
@@ -1,11 +1,7 @@
package gtPlusPlus.xmod.thermalfoundation;
-import java.lang.reflect.Field;
-
-import gregtech.api.enums.Materials;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.thermalfoundation.block.TF_Blocks;
import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids;
import gtPlusPlus.xmod.thermalfoundation.item.TF_Items;
@@ -20,14 +16,7 @@ public class HANDLER_TF{
TF_Blocks.preInit();
if (LoadedMods.Gregtech){
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Field f;
- try {
- f = Materials.class.getField("mHasParentMod");
- f.setAccessible(true);
- f.set(Materials.Enderium, true);
- Utils.LOG_INFO("Re-enabled Enderium.");
- }
- catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {}
+ //mGregMatLoader.enableMaterial(Materials.Enderium);
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java
index 40c5de8de4..082786cc4a 100644
--- a/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java
+++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/fluid/TF_Fluids.java
@@ -2,8 +2,8 @@ package gtPlusPlus.xmod.thermalfoundation.fluid;
import cofh.core.util.fluid.DispenserEmptyBucketHandler;
import cofh.core.util.fluid.DispenserFilledBucketHandler;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.thermalfoundation.item.TF_Items;
import net.minecraft.block.BlockDispenser;
import net.minecraft.init.Items;
@@ -20,42 +20,42 @@ public class TF_Fluids
public static void preInit()
{
if (!LoadedMods.ThermalFoundation){
- Utils.LOG_INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT");
+ Logger.INFO("Adding in our own versions of Thermal Foundation Fluids - Non-GT");
final Fluid pyrotheum = FluidRegistry.getFluid("pyrotheum");
final Fluid cryotheum = FluidRegistry.getFluid("cryotheum");
final Fluid ender = FluidRegistry.getFluid("ender");
if (pyrotheum == null){
- Utils.LOG_INFO("Registering Blazing Pyrotheum as it does not exist.");
+ Logger.INFO("Registering Blazing Pyrotheum as it does not exist.");
fluidPyrotheum = new Fluid("pyrotheum").setLuminosity(15).setDensity(2000).setViscosity(1200).setTemperature(4000).setRarity(EnumRarity.rare);
registerFluid(fluidPyrotheum, "pyrotheum");
}
else {
- Utils.LOG_INFO("Registering Blazing Pyrotheum as it is an already existing Fluid.");
+ Logger.INFO("Registering Blazing Pyrotheum as it is an already existing Fluid.");
fluidPyrotheum = pyrotheum;
}
if (cryotheum == null){
- Utils.LOG_INFO("Registering Gelid Cryotheum as it does not exist.");
+ Logger.INFO("Registering Gelid Cryotheum as it does not exist.");
fluidCryotheum = new Fluid("cryotheum").setLuminosity(0).setDensity(4000).setViscosity(3000).setTemperature(50).setRarity(EnumRarity.rare);
registerFluid(fluidCryotheum, "cryotheum");
}
else {
- Utils.LOG_INFO("Registering Gelid Cryotheum as it is an already existing Fluid.");
+ Logger.INFO("Registering Gelid Cryotheum as it is an already existing Fluid.");
fluidCryotheum = cryotheum;
}
if (ender == null){
- Utils.LOG_INFO("Registering Resonant Ender as it does not exist.");
+ Logger.INFO("Registering Resonant Ender as it does not exist.");
fluidEnder = new Fluid("ender").setLuminosity(3).setDensity(4000).setViscosity(3000).setTemperature(300).setRarity(EnumRarity.uncommon);
registerFluid(fluidEnder, "ender");
}
else {
- Utils.LOG_INFO("Registering Resonant Ender as it is an already existing Fluid.");
+ Logger.INFO("Registering Resonant Ender as it is an already existing Fluid.");
fluidEnder = ender;
}
}
else {
- Utils.LOG_INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum.");
+ Logger.INFO("Thermal Foundation is already loaded, no need to add our own Cryotheum/Pyrotheum.");
}
}
diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java
index c3efae0782..7864aab278 100644
--- a/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java
+++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/recipe/TF_Gregtech_Recipes.java
@@ -3,7 +3,7 @@ package gtPlusPlus.xmod.thermalfoundation.recipe;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.thermalfoundation.item.TF_Items;
import net.minecraft.init.Items;
@@ -27,27 +27,27 @@ public class TF_Gregtech_Recipes {
final FluidStack moltenRedstone = getFluidStack("molten.redstone", 250);
//Gelid Cryotheum
- Utils.LOG_INFO("Adding Recipes for Gelid Cryotheum");
+ Logger.INFO("Adding Recipes for Gelid Cryotheum");
GT_Values.RA.addFluidExtractionRecipe(dust_Cryotheum, GT_Values.NI, getFluidStack("cryotheum", 250), 10000, 200, 240);
GT_Values.RA.addChemicalBathRecipe((GT_OreDictUnificator.get(OrePrefixes.ore, Materials.Cinnabar, 1L)), getFluidStack("cryotheum", 200), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cinnabar, 3L), GT_Values.NI, GT_Values.NI, null, 400, 30);
//Blizz Powder
- Utils.LOG_INFO("Adding Recipes for Blizz Powder");
+ Logger.INFO("Adding Recipes for Blizz Powder");
GT_Values.RA.addChemicalBathRecipe(new ItemStack(Items.snowball, 4), moltenRedstone, dust_Blizz, GT_Values.NI, GT_Values.NI, null, 400, 240);
//Blizz Rod
- Utils.LOG_INFO("Adding Recipes for Blizz Rod");
+ Logger.INFO("Adding Recipes for Blizz Rod");
GT_Values.RA.addVacuumFreezerRecipe(new ItemStack(Items.blaze_rod), rod_Blizz, (int) Math.max((Materials.Blaze.getMass()*4) * 3L, 1L));
GT_ModHandler.addPulverisationRecipe(rod_Blizz, dust_Blizz3, new ItemStack(Items.snowball, 1), 50, false);
//Blazing Pyrotheum
- Utils.LOG_INFO("Adding Recipes for Blazing Pyrotheum");
+ Logger.INFO("Adding Recipes for Blazing Pyrotheum");
GT_Values.RA.addFluidExtractionRecipe(dust_Pyrotheum, GT_Values.NI, getFluidStack("pyrotheum", 250), 10000, 200, 240);
}
private static FluidStack getFluidStack(final String fluidName, final int amount){
- Utils.LOG_WARNING("Trying to get a fluid stack of "+fluidName);
+ Logger.WARNING("Trying to get a fluid stack of "+fluidName);
try {
return FluidRegistry.getFluidStack(fluidName, amount);
}