From 5411fed8689d0c05d7f9a59c32b0aaffa9471a50 Mon Sep 17 00:00:00 2001 From: Tec Date: Sun, 6 May 2018 12:36:50 +0200 Subject: Refactoring --- .../java/com/github/technus/tectech/Reference.java | 17 + .../java/com/github/technus/tectech/TecTech.java | 207 +-- src/main/java/com/github/technus/tectech/Util.java | 26 +- .../technus/tectech/auxiliary/Reference.java | 14 - .../technus/tectech/auxiliary/TecTechConfig.java | 58 - .../dreamcraft/DreamCraftRecipeLoader.java | 2 +- .../dreamcraft/NoDreamCraftBlockLoader.java | 11 - .../dreamcraft/NoDreamCraftMachineLoader.java | 18 +- .../tectech/compatibility/gtpp/GtppAtomLoader.java | 4 +- .../compatibility/thaumcraft/EssentiaCompat.java | 30 - .../thaumcraft/EssentiaCompatEnabled.java | 73 - .../definitions/AspectDefinitionCompat.java | 30 - .../definitions/AspectDefinitionCompatEnabled.java | 78 - .../definitions/dComplexAspectDefinition.java | 280 ---- .../definitions/ePrimalAspectDefinition.java | 48 - .../thaumcraft/definitions/iElementalAspect.java | 8 - .../definitions/AspectDefinitionCompat.java | 30 + .../definitions/AspectDefinitionCompatEnabled.java | 78 + .../definitions/dComplexAspectDefinition.java | 279 ++++ .../definitions/ePrimalAspectDefinition.java | 47 + .../definitions/iElementalAspect.java | 8 + .../thing/metaTileEntity/multi/EssentiaCompat.java | 28 + .../multi/EssentiaCompatEnabled.java | 68 + .../GT_MetaTileEntity_EM_essentiaDequantizer.java | 8 +- .../GT_MetaTileEntity_EM_essentiaQuantizer.java | 8 +- .../technus/tectech/dataFramework/DataPacket.java | 106 -- .../tectech/dataFramework/InventoryDataPacket.java | 59 - .../tectech/dataFramework/QuantumDataPacket.java | 48 - .../github/technus/tectech/elementalMatter/README | 44 - .../elementalMatter/core/cElementalDecay.java | 73 - .../core/cElementalDefinitionStackMap.java | 65 - .../core/cElementalInstanceStackMap.java | 522 ------ .../core/cElementalMutableDefinitionStackMap.java | 277 ---- .../elementalMatter/core/cElementalStackMap.java | 160 -- .../elementalMatter/core/commands/GiveEM.java | 158 -- .../elementalMatter/core/commands/ListEM.java | 95 -- .../core/iElementalInstanceContainer.java | 10 - .../elementalMatter/core/rElementalRecipe.java | 62 - .../elementalMatter/core/rElementalRecipeMap.java | 74 - .../core/stacks/cElementalDefinitionStack.java | 98 -- .../core/stacks/cElementalInstanceStack.java | 493 ------ .../core/stacks/iHasElementalDefinition.java | 18 - .../elementalMatter/core/tElementalException.java | 10 - .../core/templates/cElementalDefinition.java | 129 -- .../core/templates/cElementalPrimitive.java | 260 --- .../core/templates/iElementalDefinition.java | 79 - .../transformations/aFluidDequantizationInfo.java | 48 - .../transformations/aFluidQuantizationInfo.java | 48 - .../transformations/aItemDequantizationInfo.java | 45 - .../transformations/aItemQuantizationInfo.java | 69 - .../aOredictDequantizationInfo.java | 59 - .../transformations/aOredictQuantizationInfo.java | 59 - .../core/transformations/bTransformationInfo.java | 93 -- .../core/transformations/iExchangeInfo.java | 11 - .../definitions/complex/atom/dAtomDefinition.java | 1659 ------------------- .../definitions/complex/atom/iaeaNuclide.java | 288 ---- .../complex/hadron/dHadronDefinition.java | 460 ------ .../primitive/cPrimitiveDefinition.java | 39 - .../definitions/primitive/eBosonDefinition.java | 41 - .../definitions/primitive/eLeptonDefinition.java | 65 - .../definitions/primitive/eNeutrinoDefinition.java | 57 - .../definitions/primitive/eQuarkDefinition.java | 103 -- .../technus/tectech/entity/fx/BlockHint.java | 2 +- .../technus/tectech/loader/BloodyRecipeLoader.java | 595 ------- .../technus/tectech/loader/ElementalLoader.java | 40 - .../technus/tectech/loader/EntityLoader.java | 18 - .../technus/tectech/loader/MachineLoader.java | 332 ---- .../github/technus/tectech/loader/MainLoader.java | 277 +++- .../technus/tectech/loader/ModGuiHandler.java | 27 - .../technus/tectech/loader/RecipeLoader.java | 113 -- .../technus/tectech/loader/TecTechConfig.java | 68 + .../technus/tectech/loader/ThingsLoader.java | 66 - .../tectech/loader/entity/EntityLoader.java | 18 + .../tectech/loader/gui/CreativeTabTecTech.java | 51 + .../technus/tectech/loader/gui/ModGuiHandler.java | 27 + .../tectech/loader/mechanics/ElementalLoader.java | 40 + .../tectech/loader/recipe/BloodyRecipeLoader.java | 595 +++++++ .../tectech/loader/recipe/RecipeLoader.java | 117 ++ .../tectech/loader/thing/MachineLoader.java | 333 ++++ .../technus/tectech/loader/thing/ThingsLoader.java | 67 + .../mechanics/dataTransport/DataPacket.java | 106 ++ .../dataTransport/InventoryDataPacket.java | 59 + .../mechanics/dataTransport/QuantumDataPacket.java | 48 + .../tectech/mechanics/elementalMatter/README | 44 + .../elementalMatter/core/cElementalDecay.java | 73 + .../core/cElementalDefinitionStackMap.java | 65 + .../core/cElementalInstanceStackMap.java | 522 ++++++ .../core/cElementalMutableDefinitionStackMap.java | 277 ++++ .../elementalMatter/core/cElementalStackMap.java | 160 ++ .../elementalMatter/core/commands/GiveEM.java | 158 ++ .../elementalMatter/core/commands/ListEM.java | 95 ++ .../core/iElementalInstanceContainer.java | 10 + .../elementalMatter/core/rElementalRecipe.java | 62 + .../elementalMatter/core/rElementalRecipeMap.java | 74 + .../core/stacks/cElementalDefinitionStack.java | 98 ++ .../core/stacks/cElementalInstanceStack.java | 493 ++++++ .../core/stacks/iHasElementalDefinition.java | 18 + .../elementalMatter/core/tElementalException.java | 10 + .../core/templates/cElementalDefinition.java | 129 ++ .../core/templates/cElementalPrimitive.java | 260 +++ .../core/templates/iElementalDefinition.java | 79 + .../transformations/aFluidDequantizationInfo.java | 48 + .../transformations/aFluidQuantizationInfo.java | 48 + .../transformations/aItemDequantizationInfo.java | 45 + .../transformations/aItemQuantizationInfo.java | 69 + .../aOredictDequantizationInfo.java | 59 + .../transformations/aOredictQuantizationInfo.java | 59 + .../core/transformations/bTransformationInfo.java | 93 ++ .../core/transformations/iExchangeInfo.java | 11 + .../definitions/complex/atom/dAtomDefinition.java | 1660 ++++++++++++++++++++ .../definitions/complex/atom/iaeaNuclide.java | 288 ++++ .../complex/hadron/dHadronDefinition.java | 460 ++++++ .../primitive/cPrimitiveDefinition.java | 39 + .../definitions/primitive/eBosonDefinition.java | 41 + .../definitions/primitive/eLeptonDefinition.java | 65 + .../definitions/primitive/eNeutrinoDefinition.java | 57 + .../definitions/primitive/eQuarkDefinition.java | 103 ++ .../tectech/nei/TT_NEI_ResearchHandler.java | 2 +- .../technus/tectech/nei/TT_NEI_ScannerHandler.java | 2 +- .../github/technus/tectech/proxy/ClientProxy.java | 14 +- .../github/technus/tectech/recipe/TT_recipe.java | 10 +- .../technus/tectech/recipe/TT_recipeAdder.java | 12 +- .../tectech/thing/block/QuantumGlassBlock.java | 2 +- .../tectech/thing/block/QuantumStuffBlock.java | 2 +- .../tectech/thing/block/QuantumStuffRender.java | 4 +- .../tectech/thing/block/ReactorSimBlock.java | 2 +- .../tectech/thing/casing/GT_Block_HintTT.java | 2 +- .../thing/item/ConstructableTriggerItem.java | 2 +- .../item/DebugElementalInstanceContainer_EM.java | 10 +- .../item/ElementalDefinitionContainer_EM.java | 8 +- .../item/ElementalDefinitionScanStorage_EM.java | 6 +- .../technus/tectech/thing/item/EuMeterGT.java | 4 +- .../thing/item/FrontRotationTriggerItem.java | 2 +- .../tectech/thing/item/ParametrizerMemoryCard.java | 2 +- .../tectech/thing/item/gui/ScanDisplayScreen.java | 4 +- .../GT_MetaTileEntity_Hatch_DataConnector.java | 2 +- ...GT_MetaTileEntity_Hatch_ElementalContainer.java | 16 +- .../hatch/GT_MetaTileEntity_Hatch_InputData.java | 2 +- .../GT_MetaTileEntity_Hatch_InputDataItems.java | 2 +- .../hatch/GT_MetaTileEntity_Hatch_OutputData.java | 2 +- .../GT_MetaTileEntity_Hatch_OutputDataItems.java | 2 +- .../GT_MetaTileEntity_Hatch_OverflowElemental.java | 2 +- .../hatch/GT_MetaTileEntity_Hatch_Rack.java | 13 +- .../hatch/GT_MetaTileEntity_Hatch_Uncertainty.java | 4 +- .../hatch/gui/GT_GUIContainer_Uncertainty.java | 2 +- .../multi/GT_MetaTileEntity_EM_computer.java | 6 +- .../multi/GT_MetaTileEntity_EM_dataBank.java | 6 +- .../multi/GT_MetaTileEntity_EM_decay.java | 4 +- .../multi/GT_MetaTileEntity_EM_dequantizer.java | 16 +- .../multi/GT_MetaTileEntity_EM_infuser.java | 4 +- .../multi/GT_MetaTileEntity_EM_quantizer.java | 30 +- .../multi/GT_MetaTileEntity_EM_research.java | 2 +- .../multi/GT_MetaTileEntity_EM_scanner.java | 14 +- .../multi/GT_MetaTileEntity_EM_switch.java | 4 +- .../multi/GT_MetaTileEntity_EM_transformer.java | 2 +- .../multi/GT_MetaTileEntity_TM_microwave.java | 2 +- .../multi/GT_MetaTileEntity_TM_teslaCoil.java | 2 +- .../base/GT_MetaTileEntity_MultiblockBase_EM.java | 24 +- .../base/network/RotationPacketDispatcher.java | 2 +- .../multi/em_machine/Behaviour_Centrifuge.java | 34 +- .../multi/em_machine/Behaviour_Electrolyzer.java | 2 +- .../Behaviour_ElectromagneticSeparator.java | 10 +- .../multi/em_machine/Behaviour_PrecisionLaser.java | 2 +- .../multi/em_machine/Behaviour_Recycler.java | 2 +- .../multi/em_machine/Behaviour_Scanner.java | 2 +- .../em_machine/GT_MetaTileEntity_EM_machine.java | 4 +- .../single/GT_MetaTileEntity_DataReader.java | 2 +- .../GT_MetaTileEntity_DebugStructureWriter.java | 6 +- .../thing/tileEntity/ReactorSimTileEntity.java | 2 +- .../blocks/turretbases/TurretBaseEM.java | 7 +- .../blocks/turretheads/TurretHeadEM.java | 5 +- .../entity/projectiles/projectileEM.java | 24 +- .../entity/projectiles/projectileRenderEM.java | 2 +- .../tileentity/turret/TileTurretHeadEM.java | 2 +- .../tileentity/turretbase/TileTurretBaseEM.java | 2 +- 175 files changed, 8319 insertions(+), 8257 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/Reference.java delete mode 100644 src/main/java/com/github/technus/tectech/auxiliary/Reference.java delete mode 100644 src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftBlockLoader.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/dComplexAspectDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/ePrimalAspectDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/iElementalAspect.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompat.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/AspectDefinitionCompatEnabled.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/ePrimalAspectDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/iElementalAspect.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java create mode 100644 src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java delete mode 100644 src/main/java/com/github/technus/tectech/dataFramework/DataPacket.java delete mode 100644 src/main/java/com/github/technus/tectech/dataFramework/InventoryDataPacket.java delete mode 100644 src/main/java/com/github/technus/tectech/dataFramework/QuantumDataPacket.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/README delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDecay.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalDefinitionStackMap.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalInstanceStackMap.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalMutableDefinitionStackMap.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/cElementalStackMap.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/commands/GiveEM.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/commands/ListEM.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/iElementalInstanceContainer.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/rElementalRecipe.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/rElementalRecipeMap.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalDefinitionStack.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/cElementalInstanceStack.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/stacks/iHasElementalDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/tElementalException.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/templates/cElementalPrimitive.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/templates/iElementalDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aFluidDequantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aFluidQuantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aItemDequantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aItemQuantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aOredictDequantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/aOredictQuantizationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/bTransformationInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/core/transformations/iExchangeInfo.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/atom/dAtomDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/atom/iaeaNuclide.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/complex/hadron/dHadronDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/cPrimitiveDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eBosonDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eLeptonDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eNeutrinoDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/elementalMatter/definitions/primitive/eQuarkDefinition.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/BloodyRecipeLoader.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/ElementalLoader.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/EntityLoader.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/MachineLoader.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/ModGuiHandler.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/RecipeLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/TecTechConfig.java delete mode 100644 src/main/java/com/github/technus/tectech/loader/ThingsLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/entity/EntityLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/gui/CreativeTabTecTech.java create mode 100644 src/main/java/com/github/technus/tectech/loader/gui/ModGuiHandler.java create mode 100644 src/main/java/com/github/technus/tectech/loader/mechanics/ElementalLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/recipe/BloodyRecipeLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java create mode 100644 src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/dataTransport/InventoryDataPacket.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/README create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDecay.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalDefinitionStackMap.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalInstanceStackMap.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalMutableDefinitionStackMap.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/cElementalStackMap.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/GiveEM.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/commands/ListEM.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/iElementalInstanceContainer.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipe.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/rElementalRecipeMap.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalDefinitionStack.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/cElementalInstanceStack.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/stacks/iHasElementalDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/tElementalException.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/cElementalPrimitive.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/templates/iElementalDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aFluidDequantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aFluidQuantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aItemDequantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aItemQuantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aOredictDequantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/aOredictQuantizationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/bTransformationInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/core/transformations/iExchangeInfo.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/dAtomDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/atom/iaeaNuclide.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/complex/hadron/dHadronDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/cPrimitiveDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/eBosonDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/eLeptonDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/eNeutrinoDefinition.java create mode 100644 src/main/java/com/github/technus/tectech/mechanics/elementalMatter/definitions/primitive/eQuarkDefinition.java (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/Reference.java b/src/main/java/com/github/technus/tectech/Reference.java new file mode 100644 index 0000000000..6b5db0a519 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/Reference.java @@ -0,0 +1,17 @@ +package com.github.technus.tectech; + +public final class Reference { + public static final String MODID = "tectech"; + public static final String NAME = "TecTech - Tec Technology!"; + public static final String VERSION = "GRADLETOKEN_VERSION"; + public static final String COLLECTIONNAME = "TecTech"; + public static final String CLIENTSIDE = "com.github.technus.tectech.proxy.ClientProxy"; + public static final String SERVERSIDE = "com.github.technus.tectech.proxy.CommonProxy"; + + public static final String COFHCORE = "CoFHCore"; + public static final String THAUMCRAFT = "Thaumcraft"; + public static final String DREAMCRAFT = "dreamcraft"; + public static final String GTPLUSPLUS = "miscutils"; + + private Reference() {} +} diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index 3dc8d2aed7..c289845934 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -1,38 +1,18 @@ package com.github.technus.tectech; -import com.github.technus.tectech.auxiliary.Reference; -import com.github.technus.tectech.auxiliary.TecTechConfig; -import com.github.technus.tectech.elementalMatter.core.commands.GiveEM; -import com.github.technus.tectech.elementalMatter.core.commands.ListEM; import com.github.technus.tectech.loader.MainLoader; -import com.github.technus.tectech.loader.ModGuiHandler; +import com.github.technus.tectech.loader.TecTechConfig; +import com.github.technus.tectech.mechanics.elementalMatter.core.commands.GiveEM; +import com.github.technus.tectech.mechanics.elementalMatter.core.commands.ListEM; import com.github.technus.tectech.proxy.CommonProxy; -import com.github.technus.tectech.thing.metaTileEntity.Textures; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.network.RotationPacketDispatcher; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.*; -import cpw.mods.fml.common.network.NetworkRegistry; -import cpw.mods.fml.common.registry.GameData; -import cpw.mods.fml.common.registry.GameRegistry; import eu.usrv.yamcore.auxiliary.IngameErrorLog; import eu.usrv.yamcore.auxiliary.LogHelper; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Recipe; -import net.minecraft.block.Block; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; - -import static com.github.technus.tectech.CommonValues.*; -import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE; -import static gregtech.api.enums.Dyes.*; + +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);" + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;") @@ -43,200 +23,71 @@ public class TecTech { @Mod.Instance(Reference.MODID) public static TecTech instance; - public static final XSTR Rnd = XSTR.XSTR_INSTANCE; - public static final LogHelper Logger = new LogHelper(Reference.MODID); - private static IngameErrorLog Module_AdminErrorLogs; - public static MainLoader GTCustomLoader; - public static TecTechConfig ModConfig; - public static CreativeTabs mainTab; + public static final XSTR RANDOM = XSTR.XSTR_INSTANCE; + public static final LogHelper LOGGER = new LogHelper(Reference.MODID); + + private static IngameErrorLog moduleAdminErrorLogs; + public static TecTechConfig configTecTech; - public static boolean hasCOFH = false, hasThaumcraft = false; + /** + * For Loader.isModLoaded checks during the runtime + */ + public static boolean hasCOFH = false; public static final byte tectechTexturePage1=8; public static void AddLoginError(String pMessage) { - if (Module_AdminErrorLogs != null) { - Module_AdminErrorLogs.AddErrorLogOnAdminJoin(pMessage); + if (moduleAdminErrorLogs != null) { + moduleAdminErrorLogs.AddErrorLogOnAdminJoin(pMessage); } } static { - for(int i=0;i<16;i++){ - GT_Values.V[i]=V[i]; - GT_Values.VN[i]=VN[i]; - GT_Values.VOLTAGE_NAMES[i]=VOLTAGE_NAMES[i]; - } + MainLoader.staticLoad(); } @Mod.EventHandler public void PreLoad(FMLPreInitializationEvent PreEvent) { - Logger.setDebugOutput(true); - - dyeLightBlue.mRGBa[0]=96; - dyeLightBlue.mRGBa[1]=128; - dyeLightBlue.mRGBa[2]=255; - dyeBlue.mRGBa[0]=0; - dyeBlue.mRGBa[1]=32; - dyeBlue.mRGBa[2]=255; - MACHINE_METAL.mRGBa[0]=210; - MACHINE_METAL.mRGBa[1]=220; - MACHINE_METAL.mRGBa[2]=255; - - try { - new Textures(); - }catch (Throwable t){ - Logger.error("Loading textures...",t); - } + LOGGER.setDebugOutput(true); - ModConfig = new TecTechConfig(PreEvent.getModConfigurationDirectory(), Reference.COLLECTIONNAME, + configTecTech = new TecTechConfig(PreEvent.getModConfigurationDirectory(), Reference.COLLECTIONNAME, Reference.MODID); - if (!ModConfig.LoadConfig()) { - Logger.error(Reference.MODID + " could not load its config file. Things are going to be weird!"); + if (!configTecTech.LoadConfig()) { + LOGGER.error(Reference.MODID + " could not load its config file. Things are going to be weird!"); } - if (ModConfig.ModAdminErrorLogs_Enabled) { - Logger.debug("Module_AdminErrorLogs is enabled"); - Module_AdminErrorLogs = new IngameErrorLog(); + if (configTecTech.modAdminErrorLogs) { + LOGGER.setDebugOutput(DEBUG_MODE); + LOGGER.debug("moduleAdminErrorLogs is enabled"); + moduleAdminErrorLogs = new IngameErrorLog(); } - GTCustomLoader = new MainLoader(); - - Logger.info("Added Atom Overrider"); + MainLoader.preLoad(); } @Mod.EventHandler public void Load(FMLInitializationEvent event) { hasCOFH = Loader.isModLoaded(Reference.COFHCORE); - hasThaumcraft = Loader.isModLoaded(Reference.THAUMCRAFT); - - GTCustomLoader.load(); - - new RotationPacketDispatcher(); - NetworkRegistry.INSTANCE.registerGuiHandler(instance, new ModGuiHandler()); - proxy.registerRenderInfo(); + MainLoader.load(); } @Mod.EventHandler public void PostLoad(FMLPostInitializationEvent PostEvent) { - GTCustomLoader.postLoad(); - if (ModConfig.NERF_FUSION) { - FixBrokenFusionRecipes(); - } - fixBlocks(); + MainLoader.postLoad(); } @Mod.EventHandler public void serverLoad(FMLServerStartingEvent pEvent) { + pEvent.registerServerCommand(new ListEM()); if(DEBUG_MODE) { pEvent.registerServerCommand(new GiveEM()); - pEvent.registerServerCommand(new ListEM()); } } @Mod.EventHandler public void onServerAboutToStart(FMLServerAboutToStartEvent ev) { - } - private void FixBrokenFusionRecipes() { - HashMap binds = new HashMap<>(); - for (Materials material : Materials.values()) { - FluidStack p = material.getPlasma(1); - if (p != null) { - if (DEBUG_MODE) { - Logger.info("Found Plasma of " + material.mName); - } - if (material.mElement != null && - (material.mElement.mProtons >= Materials.Iron.mElement.mProtons || - -material.mElement.mProtons >= Materials.Iron.mElement.mProtons || - material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons || - -material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) { - if (DEBUG_MODE) { - Logger.info("Attempting to bind " + material.mName); - } - if (material.getMolten(1) != null) { - binds.put(p.getFluid(), material.getMolten(1).getFluid()); - } else if (material.getGas(1) != null) { - binds.put(p.getFluid(), material.getGas(1).getFluid()); - } else if (material.getFluid(1) != null) { - binds.put(p.getFluid(), material.getFluid(1).getFluid()); - } else { - binds.put(p.getFluid(), Materials.Iron.getMolten(1).getFluid()); - } - } - } - } - for (GT_Recipe r : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList) { - Fluid fluid = binds.get(r.mFluidOutputs[0].getFluid()); - if (fluid != null) { - if (DEBUG_MODE) { - Logger.info("Nerfing Recipe " + r.mFluidOutputs[0].getUnlocalizedName()); - } - r.mFluidOutputs[0] = new FluidStack(fluid, r.mFluidInputs[0].amount); - } - } - } - - private void fixBlocks(){ - HashSet modIDs=new HashSet<>(Arrays.asList( - "minecraft", - "IC2", - "gregtech", - "dreamcraft", - "miscutils", - "GT++DarkWorld", - "GalacticraftCore", - "GalacticraftMars", - "GalaxySpace", - "extracells", - "Avaritia", - "avaritiaddons", - "EnderStorage", - "enhancedportals", - "DraconicEvolution", - "IC2NuclearControl", - "IronChest", - "opensecurity", - "openmodularturrets", - "Railcraft", - "RIO", - "SGCraft", - "appliedenergistics2", - "thaumicenergistics", - "witchery", - "lootgames", - "utilityworlds", - Reference.MODID - )); - for(Block block : GameData.getBlockRegistry().typeSafeIterable()) { - GameRegistry.UniqueIdentifier uniqueIdentifier=GameRegistry.findUniqueIdentifierFor(block); - if (uniqueIdentifier != null) { - if (modIDs.contains(uniqueIdentifier.modId)) {//Full Whitelisted Mods - continue; - } else if ("OpenBlocks".equals(uniqueIdentifier.modId)) { - if ("grave".equals(uniqueIdentifier.name)) { - continue; - } - } else if ("TwilightForest".equals(uniqueIdentifier.modId)){ - if ("tile.TFShield".equals(uniqueIdentifier.name)){ - block.setResistance(30); - continue; - }else if ("tile.TFThorns".equals(uniqueIdentifier.name)){ - block.setResistance(10); - continue; - }else if ("tile.TFTowerTranslucent".equals(uniqueIdentifier.name)){ - block.setResistance(30); - continue; - }else if ("tile.TFDeadrock".equals(uniqueIdentifier.name)) { - block.setResistance(5); - continue; - } else { - continue; - } - } - } - block.setResistance(5); - } } } diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 0bd48ede69..1fd479939c 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -29,7 +29,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static com.github.technus.tectech.auxiliary.TecTechConfig.DEBUG_MODE; +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static gregtech.api.enums.GT_Values.E; /** @@ -176,13 +176,13 @@ public final class Util { //countable air -> net.minecraft.block.BlockAir if (world.getBlock(x, y, z) != blockType[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); + TecTech.LOGGER.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); } return false; } if (world.getBlockMetadata(x, y, z) != blockMeta[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); + TecTech.LOGGER.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); } return false; } @@ -310,13 +310,13 @@ public final class Util { //countable air -> net.minecraft.block.BlockAir if (world.getBlock(x, y, z) != blockType[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); + TecTech.LOGGER.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); } return false; } if (world.getBlockMetadata(x, y, z) != blockMeta[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); + TecTech.LOGGER.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); } return false; } @@ -326,13 +326,13 @@ public final class Util { if (igt == null || !(boolean) adder.invoke(imt, addingMethods[pointer], igt, casingTextures[pointer])) { if (world.getBlock(x, y, z) != blockTypeFallback[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Fallback-struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName())); + TecTech.LOGGER.info("Fallback-struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName())); } return false; } if (world.getBlockMetadata(x, y, z) != blockMetaFallback[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Fallback-Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMetaFallback[pointer]); + TecTech.LOGGER.info("Fallback-Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMetaFallback[pointer]); } return false; } @@ -540,7 +540,7 @@ public final class Util { break; default: if (DEBUG_MODE) { - TecTech.Logger.info("facing = " + facingAndRotation); + TecTech.LOGGER.info("facing = " + facingAndRotation); } return false; } @@ -568,13 +568,13 @@ public final class Util { //countable air -> net.minecraft.block.BlockAir if (world.getBlock(x, y, z) != blockType[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); + TecTech.LOGGER.info("Struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName()); } return false; } if (world.getBlockMetadata(x, y, z) != blockMeta[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); + TecTech.LOGGER.info("Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMeta[pointer]); } return false; } @@ -584,13 +584,13 @@ public final class Util { if (igt == null || !(boolean) adder.invoke(imt, addingMethods[pointer], igt, casingTextures[pointer])) { if (world.getBlock(x, y, z) != blockTypeFallback[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Fallback-struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName())); + TecTech.LOGGER.info("Fallback-struct-block-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlock(x, y, z).getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName())); } return false; } if (world.getBlockMetadata(x, y, z) != blockMetaFallback[pointer]) { if (DEBUG_MODE) { - TecTech.Logger.info("Fallback-Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMetaFallback[pointer]); + TecTech.LOGGER.info("Fallback-Struct-meta-id-error " + x + ' ' + y + ' ' + z + " / " + a + ' ' + b + ' ' + c + " / " + world.getBlockMetadata(x, y, z) + ' ' + blockMetaFallback[pointer]); } return false; } @@ -823,7 +823,7 @@ public final class Util { break; default: if (DEBUG_MODE) { - TecTech.Logger.info("facing = " + facing); + TecTech.LOGGER.info("facing = " + facing); } return false; } diff --git a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java b/src/main/java/com/github/technus/tectech/auxiliary/Reference.java deleted file mode 100644 index 828974af05..0000000000 --- a/src/main/java/com/github/technus/tectech/auxiliary/Reference.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.github.technus.tectech.auxiliary; - -public final class Reference { - public static final String MODID = "tectech"; - public static final String NAME = "TecTech - Tec Technology!"; - public static final String VERSION = "GRADLETOKEN_VERSION"; - public static final String COLLECTIONNAME = "TecTech"; - public static final String CLIENTSIDE = "com.github.technus.tectech.proxy.ClientProxy"; - public static final String SERVERSIDE = "com.github.technus.tectech.proxy.CommonProxy"; - public static final String COFHCORE = "CoFHCore"; - public static final String THAUMCRAFT = "Thaumcraft"; - - private Reference() {} -} diff --git a/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java b/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java deleted file mode 100644 index f5963a070c..0000000000 --- a/src/main/java/com/github/technus/tectech/auxiliary/TecTechConfig.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.github.technus.tectech.auxiliary; - -import eu.usrv.yamcore.config.ConfigManager; - -import java.io.File; - -public class TecTechConfig extends ConfigManager { - public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory, String pModID) { - super(pConfigBaseDirectory, pModCollectionDirectory, pModID); - } - - public boolean ModAdminErrorLogs_Enabled; - - //final static to allow compiler to remove the debug code when this is false - public static boolean DEBUG_MODE = false; - public boolean BOOM_ENABLE; - public boolean EASY_SCAN; - public boolean NERF_FUSION; - public boolean ENABLE_TURRET_EXPLOSIONS; - public float TURRET_DAMAGE_FACTOR; - public float TURRET_EXPLOSION_FACTOR; - - @Override - protected void PreInit() { - ModAdminErrorLogs_Enabled = false; - EASY_SCAN = false; - BOOM_ENABLE = true; - NERF_FUSION = false; - ENABLE_TURRET_EXPLOSIONS = true; - TURRET_DAMAGE_FACTOR = 10; - TURRET_EXPLOSION_FACTOR = 1; - } - - @Override - protected void Init() { - ModAdminErrorLogs_Enabled = _mainConfig.getBoolean("AdminErrorLog", "Modules", ModAdminErrorLogs_Enabled, - "If set to true, every op/admin will receive all errors occurred during the startup phase as in game message on join"); - DEBUG_MODE = _mainConfig.getBoolean("DebugMode", "Debug", DEBUG_MODE, - "Enables logging and other purely debug features"); - EASY_SCAN = _mainConfig.getBoolean("EasyScan", "Features", EASY_SCAN, - "Enables tricorder to scan EM i/o hatches directly, too CHEEKY"); - BOOM_ENABLE = _mainConfig.getBoolean("BoomEnable", "Features", BOOM_ENABLE, - "Set to false to disable explosions on everything bad that you can do"); - NERF_FUSION = _mainConfig.getBoolean("NerfFusion", "Features", NERF_FUSION, - "Set to true to enable removal of plasmas heavier than Fe and other weird ones"); - ENABLE_TURRET_EXPLOSIONS = _mainConfig.getBoolean("TurretBoomEnable", "Features", ENABLE_TURRET_EXPLOSIONS, - "Set to false to disable explosions caused by EM turrets"); - TURRET_DAMAGE_FACTOR = _mainConfig.getFloat("TurretDamageFactor", "Features", TURRET_DAMAGE_FACTOR, 0, Short.MAX_VALUE, - "Damage is multiplied by this number"); - TURRET_EXPLOSION_FACTOR = _mainConfig.getFloat("TurretExplosionFactor", "Features", TURRET_EXPLOSION_FACTOR, 0, Short.MAX_VALUE, - "Explosion strength is multiplied by this number"); - } - - @Override - protected void PostInit() { - - } -} diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java index be731036a9..3f209077e7 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java @@ -20,7 +20,7 @@ import net.minecraftforge.fluids.FluidStack; import java.lang.reflect.Method; -import static com.github.technus.tectech.loader.RecipeLoader.getOrDefault; +import static com.github.technus.tectech.loader.recipe.RecipeLoader.getOrDefault; /** * Created by Tec on 06.08.2017. diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftBlockLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftBlockLoader.java deleted file mode 100644 index c5c960f5b8..0000000000 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftBlockLoader.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.github.technus.tectech.compatibility.dreamcraft; - -import com.github.technus.tectech.thing.casing.GT_Block_CasingsNH; -import com.github.technus.tectech.thing.casing.TT_Container_Casings; - -public class NoDreamCraftBlockLoader implements Runnable { - @Override - public void run() { - TT_Container_Casings.sBlockCasingsNH = new GT_Block_CasingsNH(); - } -} diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java index eb4f9c2b9d..18ec3b8b26 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/NoDreamCraftMachineLoader.java @@ -1,6 +1,8 @@ package com.github.technus.tectech.compatibility.dreamcraft; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; +import com.github.technus.tectech.Reference; import com.github.technus.tectech.thing.CustomItemList; import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_WetTransformer; import cpw.mods.fml.common.Loader; @@ -16,6 +18,8 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; +import static gregtech.api.GregTech_API.METATILEENTITIES; + public class NoDreamCraftMachineLoader implements Runnable { public final static String imagination=EnumChatFormatting.RESET + "You just need " + EnumChatFormatting.DARK_PURPLE + @@ -34,9 +38,15 @@ public class NoDreamCraftMachineLoader implements Runnable { @Override public void run() { - CustomItemList.WetTransformer_LV_ULV.set(new GT_MetaTileEntity_WetTransformer( - 12000, "wettransformer.tier.00", "Ultra Low Voltage Power Transformer", 0, - "LV -> ULV (Use Soft Mallet to invert)").getStackForm(1L)); + try { + CustomItemList.WetTransformer_LV_ULV.set(new GT_MetaTileEntity_WetTransformer( + 12000, "wettransformer.tier.00", "Ultra Low Voltage Power Transformer", 0, + "LV -> ULV (Use Soft Mallet to invert)").getStackForm(1L)); + }catch (IllegalArgumentException e){ + System.out.println(METATILEENTITIES[12000].getClass().getCanonicalName()); + TecTech.LOGGER.error(e); + e.printStackTrace(); + } CustomItemList.WetTransformer_MV_LV.set(new GT_MetaTileEntity_WetTransformer( 12001, "wetransformer.tier.01", "Low Voltage Power Transformer", 1, @@ -211,7 +221,7 @@ public class NoDreamCraftMachineLoader implements Runnable { CustomItemList.Transformer_MAXV_OPV.set(temp.getStackForm(1L)); - if (Loader.isModLoaded("miscutils")) { + if (Loader.isModLoaded(Reference.GTPLUSPLUS)) { Class clazz = Class.forName("gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTransformerHiAmp"); Constructor constructor = clazz.getConstructor(int.class, String.class, String.class, int.class, String.class); diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java index 5f0342bf77..a7cb8bb8a0 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.compatibility.gtpp; -import com.github.technus.tectech.elementalMatter.core.stacks.cElementalDefinitionStack; +import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; import gregtech.api.enums.OrePrefixes; import net.minecraftforge.fluids.FluidStack; import java.lang.reflect.Method; -import static com.github.technus.tectech.elementalMatter.definitions.complex.atom.dAtomDefinition.*; +import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.atom.dAtomDefinition.*; public class GtppAtomLoader implements Runnable{ //region reflect a bit diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java deleted file mode 100644 index fba6f1e6e9..0000000000 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompat.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.github.technus.tectech.compatibility.thaumcraft; - -import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import net.minecraft.tileentity.TileEntity; - -/** - * Created by Tec on 21.05.2017. - */ -public class EssentiaCompat { - public static EssentiaCompat essentiaContainerCompat; - - public void run(){} - - public boolean check(GT_MetaTileEntity_MultiblockBase_EM meta){ - return false; - } - - public TileEntity getContainer(GT_MetaTileEntity_MultiblockBase_EM meta){ - return null; - } - - public boolean putElementalInstanceStack(TileEntity conatainer, cElementalInstanceStack stack){ - return false; - } - - public cElementalInstanceStack getFromContainer(TileEntity container){ - return null; - } -} diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java deleted file mode 100644 index 15efa593eb..0000000000 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/EssentiaCompatEnabled.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.github.technus.tectech.compatibility.thaumcraft; - -import com.github.technus.tectech.compatibility.thaumcraft.definitions.iElementalAspect; -import com.github.technus.tectech.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import net.minecraft.tileentity.TileEntity; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumcraft.api.aspects.IAspectContainer; -import thaumcraft.common.tiles.TileEssentiaReservoir; -import thaumcraft.common.tiles.TileJarFillable; - -import static com.github.technus.tectech.compatibility.thaumcraft.definitions.AspectDefinitionCompat.aspectToDef; - -/** - * Created by Tec on 21.05.2017. - */ -public class EssentiaCompatEnabled extends EssentiaCompat { - @Override - public void run() { - - } - - @Override - public boolean check(GT_MetaTileEntity_MultiblockBase_EM meta) { - TileEntity tile =meta.getBaseMetaTileEntity().getTileEntityAtSide(meta.getBaseMetaTileEntity().getBackFacing()); - return tile instanceof TileEssentiaReservoir || tile instanceof TileJarFillable; - } - - @Override - public TileEntity getContainer(GT_MetaTileEntity_MultiblockBase_EM meta) { - TileEntity tile =meta.getBaseMetaTileEntity().getTileEntityAtSide(meta.getBaseMetaTileEntity().getBackFacing()); - return tile!=null && !tile.isInvalid() && tile instanceof TileEssentiaReservoir || tile instanceof TileJarFillable ?tile:null; - } - - @Override - public boolean putElementalInstanceStack(TileEntity container,cElementalInstanceStack stack){ - if(container==null || container.isInvalid()) { - return false; - } - if(container instanceof IAspectContainer && stack.definition instanceof iElementalAspect){ - Aspect aspect=(Aspect) ((iElementalAspect) stack.definition).materializeIntoAspect(); - if(aspect!=null){ - ((IAspectContainer) container).addToContainer(aspect,1); - return true; - } - } - return false; - } - - @Override - public cElementalInstanceStack getFromContainer(TileEntity container){ - if(container==null || container.isInvalid()) { - return null; - } - if(container instanceof IAspectContainer){ - AspectList aspects=((IAspectContainer) container).getAspects(); - if(aspects!=null){ - Aspect[] aspectsArr= aspects.getAspects(); - if(aspectsArr!=null && aspectsArr[0]!=null){ - if (((IAspectContainer) container).takeFromContainer(aspectsArr[0],1)){ - cElementalDefinition def=aspectToDef.get(aspectsArr[0].getTag()); - if(def!=null){ - return new cElementalInstanceStack(def,1); - } - } - } - } - } - return null; - } -} diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java deleted file mode 100644 index 8715e33dd8..0000000000 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompat.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.github.technus.tectech.compatibility.thaumcraft.definitions; - - -import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; -import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; - -import java.util.HashMap; - -/** - * Created by Tec on 21.05.2017. - */ -public class AspectDefinitionCompat { - public static AspectDefinitionCompat aspectDefinitionCompat; - static final HashMap defToAspect = new HashMap<>(); - public static final HashMap aspectToDef = new HashMap<>(); - - public void run(){} - - Object getAspect(cElementalDefinition definition){ - return null; - } - - String getAspectTag(cElementalDefinition definition){ - return null; - } - - iElementalDefinition getDefinition(String aspect){ - return null; - } -} diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java deleted file mode 100644 index 9038e4fe26..0000000000 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/definitions/AspectDefinitionCompatEnabled.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.github.technus.tectech.compatibility.thaumcraft.definitions; - -import com.github.technus.tectech.elementalMatter.core.tElementalException; -import com.github.technus.tectech.elementalMatter.core.templates.cElementalDefinition; -import com.github.technus.tectech.elementalMatter.core.templates.iElementalDefinition; -import thaumcraft.api.aspects.Aspect; - -import java.util.ArrayList; - -import static com.github.technus.tectech.compatibility.thaumcraft.definitions.ePrimalAspectDefinition.*; - -/** - * Created by Tec on 21.05.2017. - */ -public final class AspectDefinitionCompatEnabled extends AspectDefinitionCompat { - @Override - public void run(){ - AspectDefinitionCompat.defToAspect.put(magic_air,"aer"); - AspectDefinitionCompat.defToAspect.put(magic_earth,"terra"); - AspectDefinitionCompat.defToAspect.put(magic_fire,"ignis"); - AspectDefinitionCompat.defToAspect.put(magic_water,"aqua"); - AspectDefinitionCompat.defToAspect.put(magic_order,"ordo"); - AspectDefinitionCompat.defToAspect.put(magic_entropy,"perditio"); - - AspectDefinitionCompat.aspectToDef.put("aer",magic_air); - AspectDefinitionCompat.aspectToDef.put("terra",magic_earth); - AspectDefinitionCompat.aspectToDef.put("ignis",magic_fire); - AspectDefinitionCompat.aspectToDef.put("aqua",magic_water); - AspectDefinitionCompat.aspectToDef.put("ordo",magic_order); - AspectDefinitionCompat.aspectToDef.put("perditio",magic_entropy); - - ArrayList list=Aspect.getCompoundAspects(); - Aspect[] array= list.toArray(new Aspect[list.size()]); - while (!list.isEmpty()) { - for (Aspect aspect : array) { - if (list.contains(aspect)) { - Aspect[] content = aspect.getComponents(); - if (content.length != 2) { - list.remove(aspect); - }else if(AspectDefinitionCompat.aspectToDef.containsKey(content[0].getTag()) && AspectDefinitionCompat.aspectToDef.containsKey(content[1].getTag())){ - try { - dComplexAspectDefinition newAspect; - if(content[0].getTag().equals(content[1].getTag())){ - newAspect = new dComplexAspectDefinition(AspectDefinitionCompat.aspectToDef.get(content[0].getTag()).getStackForm(2) - ); - }else{ - newAspect = new dComplexAspectDef