From 1b820de08a05070909a267e17f033fcf58ac8710 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 2 Sep 2024 23:17:17 +0200 Subject: The Great Renaming (#3014) * move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names --- src/main/java/tectech/Reference.java | 16 + src/main/java/tectech/TecTech.java | 119 + src/main/java/tectech/TecTechEventHandlers.java | 23 + .../openComputers/AvrArchitecture.java | 307 ++ src/main/java/tectech/loader/MainLoader.java | 206 + .../java/tectech/loader/NetworkDispatcher.java | 25 + src/main/java/tectech/loader/TecTechConfig.java | 271 + .../tectech/loader/gui/CreativeTabTecTech.java | 36 + src/main/java/tectech/loader/recipe/Assembler.java | 3091 +++++++++++ .../java/tectech/loader/recipe/AssemblyLine.java | 169 + .../tectech/loader/recipe/BaseRecipeLoader.java | 49 + .../tectech/loader/recipe/CircuitAssembler.java | 54 + src/main/java/tectech/loader/recipe/Crafting.java | 57 + src/main/java/tectech/loader/recipe/Extractor.java | 67 + src/main/java/tectech/loader/recipe/Godforge.java | 675 +++ .../loader/recipe/ResearchStationAssemblyLine.java | 3709 +++++++++++++ .../java/tectech/loader/thing/CoverLoader.java | 47 + .../java/tectech/loader/thing/MachineLoader.java | 2532 +++++++++ src/main/java/tectech/loader/thing/MuTeLoader.java | 21 + .../java/tectech/loader/thing/ThingsLoader.java | 93 + .../mechanics/dataTransport/DataPacket.java | 104 + .../dataTransport/InventoryDataPacket.java | 62 + .../mechanics/dataTransport/QuantumDataPacket.java | 50 + .../enderStorage/EnderFluidContainer.java | 134 + .../mechanics/enderStorage/EnderLinkTag.java | 39 + .../mechanics/enderStorage/EnderLinkTank.java | 47 + .../enderStorage/EnderWorldSavedData.java | 144 + .../java/tectech/mechanics/pipe/IActivePipe.java | 12 + .../mechanics/pipe/IConnectsToDataPipe.java | 17 + .../mechanics/pipe/IConnectsToEnergyTunnel.java | 11 + .../mechanics/pipe/PipeActivityMessage.java | 136 + .../tectech/mechanics/spark/RendererMessage.java | 148 + .../java/tectech/mechanics/spark/ThaumSpark.java | 57 + .../tectech/mechanics/tesla/ITeslaConnectable.java | 184 + .../mechanics/tesla/ITeslaConnectableSimple.java | 24 + .../mechanics/tesla/TeslaCoverConnection.java | 81 + src/main/java/tectech/proxy/ClientProxy.java | 185 + src/main/java/tectech/proxy/CommonProxy.java | 94 + .../java/tectech/recipe/EyeOfHarmonyFrontend.java | 206 + .../java/tectech/recipe/EyeOfHarmonyRecipe.java | 465 ++ .../tectech/recipe/EyeOfHarmonyRecipeStorage.java | 186 + .../tectech/recipe/GodforgeExoticFrontend.java | 82 + .../tectech/recipe/GodforgePlasmaFrontend.java | 79 + .../tectech/recipe/ResearchStationFrontend.java | 101 + src/main/java/tectech/recipe/TTRecipeAdder.java | 251 + .../java/tectech/recipe/TecTechRecipeMaps.java | 78 + .../tectech/rendering/EOH/EOHItemRenderer.java | 94 + .../tectech/rendering/EOH/EOHRenderingUtils.java | 270 + .../tectech/rendering/EOH/EOHTileEntitySR.java | 92 + src/main/java/tectech/thing/CustomItemList.java | 629 +++ .../java/tectech/thing/block/BlockEOHRender.java | 78 + .../java/tectech/thing/block/BlockForgeOfGods.java | 71 + .../tectech/thing/block/BlockGodforgeGlass.java | 106 + .../tectech/thing/block/BlockQuantumGlass.java | 110 + .../tectech/thing/block/BlockQuantumStuff.java | 103 + .../java/tectech/thing/block/BlockReactorSim.java | 94 + .../tectech/thing/block/ItemGodForgeGlass.java | 31 + .../java/tectech/thing/block/ItemQuantumGlass.java | 34 + .../java/tectech/thing/block/ItemReactorSim.java | 37 + .../tectech/thing/block/RenderForgeOfGods.java | 65 + .../tectech/thing/block/RenderGodforgeGlass.java | 122 + .../tectech/thing/block/RenderQuantumGlass.java | 129 + .../tectech/thing/block/RenderQuantumStuff.java | 103 + .../thing/block/TileEntityEyeOfHarmony.java | 200 + .../tectech/thing/block/TileEntityForgeOfGods.java | 82 + .../tectech/thing/casing/BlockGTCasingsBA0.java | 224 + .../tectech/thing/casing/BlockGTCasingsNH.java | 59 + .../tectech/thing/casing/BlockGTCasingsTT.java | 193 + .../tectech/thing/casing/BlockGodforgeCasings.java | 130 + .../java/tectech/thing/casing/ItemCasingsBA0.java | 110 + .../tectech/thing/casing/ItemCasingsGodforge.java | 124 + .../java/tectech/thing/casing/ItemCasingsNH.java | 15 + .../tectech/thing/casing/ItemCasingsSpacetime.java | 56 + .../thing/casing/ItemCasingsStabilisation.java | 47 + .../java/tectech/thing/casing/ItemCasingsTT.java | 132 + .../thing/casing/ItemCasingsTimeAcceleration.java | 46 + .../casing/SpacetimeCompressionFieldCasing.java | 116 + .../thing/casing/StabilisationFieldCasing.java | 116 + .../tectech/thing/casing/TTCasingsContainer.java | 28 + .../thing/casing/TimeAccelerationFieldCasing.java | 116 + .../tectech/thing/cover/CoverEnderFluidLink.java | 245 + .../tectech/thing/cover/CoverPowerPassUpgrade.java | 52 + .../java/tectech/thing/cover/CoverTeslaCoil.java | 85 + .../thing/cover/CoverTeslaCoilUltimate.java | 44 + .../java/tectech/thing/gui/TecTechUITextures.java | 192 + .../thing/item/ItemAstralArrayFabricator.java | 53 + .../thing/item/ItemEnderFluidLinkCover.java | 55 + .../java/tectech/thing/item/ItemEuMeterGT.java | 167 + .../thing/item/ItemParametrizerMemoryCard.java | 233 + .../thing/item/ItemPowerPassUpgradeCover.java | 54 + .../tectech/thing/item/ItemRenderForgeOfGods.java | 59 + .../tectech/thing/item/ItemTeslaCoilCapacitor.java | 107 + .../tectech/thing/item/ItemTeslaCoilComponent.java | 71 + .../tectech/thing/item/ItemTeslaCoilCover.java | 86 + .../java/tectech/thing/item/ItemTeslaStaff.java | 52 + .../tectech/thing/metaTileEntity/Textures.java | 318 ++ .../metaTileEntity/hatch/MTEHatchCapacitor.java | 241 + .../metaTileEntity/hatch/MTEHatchCreativeData.java | 129 + .../hatch/MTEHatchCreativeMaintenance.java | 90 + .../hatch/MTEHatchCreativeUncertainty.java | 56 + .../hatch/MTEHatchDataConnector.java | 198 + .../metaTileEntity/hatch/MTEHatchDataInput.java | 101 + .../hatch/MTEHatchDataItemsInput.java | 255 + .../hatch/MTEHatchDataItemsOutput.java | 133 + .../metaTileEntity/hatch/MTEHatchDataOutput.java | 113 + .../metaTileEntity/hatch/MTEHatchDynamoMulti.java | 127 + .../metaTileEntity/hatch/MTEHatchDynamoTunnel.java | 286 + .../metaTileEntity/hatch/MTEHatchEnergyMulti.java | 133 + .../metaTileEntity/hatch/MTEHatchEnergyTunnel.java | 203 + .../metaTileEntity/hatch/MTEHatchObjectHolder.java | 176 + .../thing/metaTileEntity/hatch/MTEHatchParam.java | 554 ++ .../metaTileEntity/hatch/MTEHatchParamText.java | 291 ++ .../thing/metaTileEntity/hatch/MTEHatchRack.java | 412 ++ .../metaTileEntity/hatch/MTEHatchUncertainty.java | 467 ++ .../hatch/MTEHatchWirelessComputationInput.java | 132 + .../hatch/MTEHatchWirelessComputationOutput.java | 60 + .../hatch/MTEHatchWirelessDataItemsInput.java | 139 + .../hatch/MTEHatchWirelessDataItemsOutput.java | 142 + .../hatch/MTEHatchWirelessMulti.java | 209 + .../multi/ForgeOfGodsRingsStructureString.java | 5105 ++++++++++++++++++ .../multi/ForgeOfGodsStructureString.java | 5435 ++++++++++++++++++++ .../metaTileEntity/multi/MTEActiveTransformer.java | 231 + .../thing/metaTileEntity/multi/MTEDataBank.java | 382 ++ .../metaTileEntity/multi/MTEEnergyInfuser.java | 315 ++ .../metaTileEntity/multi/MTEEyeOfHarmony.java | 1845 +++++++ .../thing/metaTileEntity/multi/MTEForgeOfGods.java | 3059 +++++++++++ .../thing/metaTileEntity/multi/MTEMicrowave.java | 342 ++ .../metaTileEntity/multi/MTENetworkSwitch.java | 283 + .../metaTileEntity/multi/MTEQuantumComputer.java | 618 +++ .../metaTileEntity/multi/MTEResearchStation.java | 687 +++ .../thing/metaTileEntity/multi/MTETeslaTower.java | 991 ++++ .../metaTileEntity/multi/base/INameFunction.java | 6 + .../metaTileEntity/multi/base/IStatusFunction.java | 6 + .../thing/metaTileEntity/multi/base/LedStatus.java | 64 + .../metaTileEntity/multi/base/Parameters.java | 327 ++ .../thing/metaTileEntity/multi/base/SoundLoop.java | 59 + .../multi/base/TTMultiblockBase.java | 2760 ++++++++++ .../render/TTRenderedExtendedFacingTexture.java | 25 + .../multi/godforge_modules/MTEBaseModule.java | 510 ++ .../multi/godforge_modules/MTEExoticModule.java | 547 ++ .../multi/godforge_modules/MTEMoltenModule.java | 244 + .../multi/godforge_modules/MTEPlasmaModule.java | 245 + .../multi/godforge_modules/MTESmeltingModule.java | 245 + .../metaTileEntity/pipe/MTEPipeBlockData.java | 52 + .../metaTileEntity/pipe/MTEPipeBlockEnergy.java | 52 + .../thing/metaTileEntity/pipe/MTEPipeData.java | 312 ++ .../thing/metaTileEntity/pipe/MTEPipeEnergy.java | 281 + .../metaTileEntity/pipe/MTEPipeEnergyMirror.java | 223 + .../metaTileEntity/single/MTEBuckConverter.java | 265 + .../metaTileEntity/single/MTEDebugPollutor.java | 217 + .../single/MTEDebugPowerGenerator.java | 383 ++ .../single/MTEDebugStructureWriter.java | 292 ++ .../metaTileEntity/single/MTEOwnerDetector.java | 237 + .../thing/metaTileEntity/single/MTETeslaCoil.java | 396 ++ .../metaTileEntity/single/MTETransformerTT.java | 68 + .../metaTileEntity/single/MTEWetTransformer.java | 49 + .../tectech/thing/multiTileEntity/GodForge.java | 0 .../thing/tileEntity/TileEntityReactorSim.java | 142 + src/main/java/tectech/util/CommonValues.java | 28 + src/main/java/tectech/util/Converter.java | 41 + src/main/java/tectech/util/FluidStackLong.java | 29 + src/main/java/tectech/util/GodforgeMath.java | 299 ++ src/main/java/tectech/util/ItemStackLong.java | 28 + src/main/java/tectech/util/TTUtility.java | 188 + 164 files changed, 52939 insertions(+) create mode 100644 src/main/java/tectech/Reference.java create mode 100644 src/main/java/tectech/TecTech.java create mode 100644 src/main/java/tectech/TecTechEventHandlers.java create mode 100644 src/main/java/tectech/compatibility/openComputers/AvrArchitecture.java create mode 100644 src/main/java/tectech/loader/MainLoader.java create mode 100644 src/main/java/tectech/loader/NetworkDispatcher.java create mode 100644 src/main/java/tectech/loader/TecTechConfig.java create mode 100644 src/main/java/tectech/loader/gui/CreativeTabTecTech.java create mode 100644 src/main/java/tectech/loader/recipe/Assembler.java create mode 100644 src/main/java/tectech/loader/recipe/AssemblyLine.java create mode 100644 src/main/java/tectech/loader/recipe/BaseRecipeLoader.java create mode 100644 src/main/java/tectech/loader/recipe/CircuitAssembler.java create mode 100644 src/main/java/tectech/loader/recipe/Crafting.java create mode 100644 src/main/java/tectech/loader/recipe/Extractor.java create mode 100644 src/main/java/tectech/loader/recipe/Godforge.java create mode 100644 src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java create mode 100644 src/main/java/tectech/loader/thing/CoverLoader.java create mode 100644 src/main/java/tectech/loader/thing/MachineLoader.java create mode 100644 src/main/java/tectech/loader/thing/MuTeLoader.java create mode 100644 src/main/java/tectech/loader/thing/ThingsLoader.java create mode 100644 src/main/java/tectech/mechanics/dataTransport/DataPacket.java create mode 100644 src/main/java/tectech/mechanics/dataTransport/InventoryDataPacket.java create mode 100644 src/main/java/tectech/mechanics/dataTransport/QuantumDataPacket.java create mode 100644 src/main/java/tectech/mechanics/enderStorage/EnderFluidContainer.java create mode 100644 src/main/java/tectech/mechanics/enderStorage/EnderLinkTag.java create mode 100644 src/main/java/tectech/mechanics/enderStorage/EnderLinkTank.java create mode 100644 src/main/java/tectech/mechanics/enderStorage/EnderWorldSavedData.java create mode 100644 src/main/java/tectech/mechanics/pipe/IActivePipe.java create mode 100644 src/main/java/tectech/mechanics/pipe/IConnectsToDataPipe.java create mode 100644 src/main/java/tectech/mechanics/pipe/IConnectsToEnergyTunnel.java create mode 100644 src/main/java/tectech/mechanics/pipe/PipeActivityMessage.java create mode 100644 src/main/java/tectech/mechanics/spark/RendererMessage.java create mode 100644 src/main/java/tectech/mechanics/spark/ThaumSpark.java create mode 100644 src/main/java/tectech/mechanics/tesla/ITeslaConnectable.java create mode 100644 src/main/java/tectech/mechanics/tesla/ITeslaConnectableSimple.java create mode 100644 src/main/java/tectech/mechanics/tesla/TeslaCoverConnection.java create mode 100644 src/main/java/tectech/proxy/ClientProxy.java create mode 100644 src/main/java/tectech/proxy/CommonProxy.java create mode 100644 src/main/java/tectech/recipe/EyeOfHarmonyFrontend.java create mode 100644 src/main/java/tectech/recipe/EyeOfHarmonyRecipe.java create mode 100644 src/main/java/tectech/recipe/EyeOfHarmonyRecipeStorage.java create mode 100644 src/main/java/tectech/recipe/GodforgeExoticFrontend.java create mode 100644 src/main/java/tectech/recipe/GodforgePlasmaFrontend.java create mode 100644 src/main/java/tectech/recipe/ResearchStationFrontend.java create mode 100644 src/main/java/tectech/recipe/TTRecipeAdder.java create mode 100644 src/main/java/tectech/recipe/TecTechRecipeMaps.java create mode 100644 src/main/java/tectech/rendering/EOH/EOHItemRenderer.java create mode 100644 src/main/java/tectech/rendering/EOH/EOHRenderingUtils.java create mode 100644 src/main/java/tectech/rendering/EOH/EOHTileEntitySR.java create mode 100644 src/main/java/tectech/thing/CustomItemList.java create mode 100644 src/main/java/tectech/thing/block/BlockEOHRender.java create mode 100644 src/main/java/tectech/thing/block/BlockForgeOfGods.java create mode 100644 src/main/java/tectech/thing/block/BlockGodforgeGlass.java create mode 100644 src/main/java/tectech/thing/block/BlockQuantumGlass.java create mode 100644 src/main/java/tectech/thing/block/BlockQuantumStuff.java create mode 100644 src/main/java/tectech/thing/block/BlockReactorSim.java create mode 100644 src/main/java/tectech/thing/block/ItemGodForgeGlass.java create mode 100644 src/main/java/tectech/thing/block/ItemQuantumGlass.java create mode 100644 src/main/java/tectech/thing/block/ItemReactorSim.java create mode 100644 src/main/java/tectech/thing/block/RenderForgeOfGods.java create mode 100644 src/main/java/tectech/thing/block/RenderGodforgeGlass.java create mode 100644 src/main/java/tectech/thing/block/RenderQuantumGlass.java create mode 100644 src/main/java/tectech/thing/block/RenderQuantumStuff.java create mode 100644 src/main/java/tectech/thing/block/TileEntityEyeOfHarmony.java create mode 100644 src/main/java/tectech/thing/block/TileEntityForgeOfGods.java create mode 100644 src/main/java/tectech/thing/casing/BlockGTCasingsBA0.java create mode 100644 src/main/java/tectech/thing/casing/BlockGTCasingsNH.java create mode 100644 src/main/java/tectech/thing/casing/BlockGTCasingsTT.java create mode 100644 src/main/java/tectech/thing/casing/BlockGodforgeCasings.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsBA0.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsGodforge.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsNH.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsSpacetime.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsStabilisation.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsTT.java create mode 100644 src/main/java/tectech/thing/casing/ItemCasingsTimeAcceleration.java create mode 100644 src/main/java/tectech/thing/casing/SpacetimeCompressionFieldCasing.java create mode 100644 src/main/java/tectech/thing/casing/StabilisationFieldCasing.java create mode 100644 src/main/java/tectech/thing/casing/TTCasingsContainer.java create mode 100644 src/main/java/tectech/thing/casing/TimeAccelerationFieldCasing.java create mode 100644 src/main/java/tectech/thing/cover/CoverEnderFluidLink.java create mode 100644 src/main/java/tectech/thing/cover/CoverPowerPassUpgrade.java create mode 100644 src/main/java/tectech/thing/cover/CoverTeslaCoil.java create mode 100644 src/main/java/tectech/thing/cover/CoverTeslaCoilUltimate.java create mode 100644 src/main/java/tectech/thing/gui/TecTechUITextures.java create mode 100644 src/main/java/tectech/thing/item/ItemAstralArrayFabricator.java create mode 100644 src/main/java/tectech/thing/item/ItemEnderFluidLinkCover.java create mode 100644 src/main/java/tectech/thing/item/ItemEuMeterGT.java create mode 100644 src/main/java/tectech/thing/item/ItemParametrizerMemoryCard.java create mode 100644 src/main/java/tectech/thing/item/ItemPowerPassUpgradeCover.java create mode 100644 src/main/java/tectech/thing/item/ItemRenderForgeOfGods.java create mode 100644 src/main/java/tectech/thing/item/ItemTeslaCoilCapacitor.java create mode 100644 src/main/java/tectech/thing/item/ItemTeslaCoilComponent.java create mode 100644 src/main/java/tectech/thing/item/ItemTeslaCoilCover.java create mode 100644 src/main/java/tectech/thing/item/ItemTeslaStaff.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/Textures.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCapacitor.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeData.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeMaintenance.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchCreativeUncertainty.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataConnector.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataInput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsInput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataItemsOutput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDataOutput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDynamoMulti.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchDynamoTunnel.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchEnergyMulti.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchEnergyTunnel.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchObjectHolder.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParam.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchParamText.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchRack.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchUncertainty.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessComputationInput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessComputationOutput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsInput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessDataItemsOutput.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/hatch/MTEHatchWirelessMulti.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/ForgeOfGodsRingsStructureString.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/ForgeOfGodsStructureString.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEActiveTransformer.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEDataBank.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEEnergyInfuser.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEEyeOfHarmony.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEMicrowave.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTENetworkSwitch.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEQuantumComputer.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTEResearchStation.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/MTETeslaTower.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/INameFunction.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/IStatusFunction.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/LedStatus.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/Parameters.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/SoundLoop.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/base/render/TTRenderedExtendedFacingTexture.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeBlockData.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeBlockEnergy.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeData.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergy.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/pipe/MTEPipeEnergyMirror.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEBuckConverter.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPollutor.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEDebugPowerGenerator.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEDebugStructureWriter.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEOwnerDetector.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTETeslaCoil.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTETransformerTT.java create mode 100644 src/main/java/tectech/thing/metaTileEntity/single/MTEWetTransformer.java create mode 100644 src/main/java/tectech/thing/multiTileEntity/GodForge.java create mode 100644 src/main/java/tectech/thing/tileEntity/TileEntityReactorSim.java create mode 100644 src/main/java/tectech/util/CommonValues.java create mode 100644 src/main/java/tectech/util/Converter.java create mode 100644 src/main/java/tectech/util/FluidStackLong.java create mode 100644 src/main/java/tectech/util/GodforgeMath.java create mode 100644 src/main/java/tectech/util/ItemStackLong.java create mode 100644 src/main/java/tectech/util/TTUtility.java (limited to 'src/main/java/tectech') diff --git a/src/main/java/tectech/Reference.java b/src/main/java/tectech/Reference.java new file mode 100644 index 0000000000..a0ac472954 --- /dev/null +++ b/src/main/java/tectech/Reference.java @@ -0,0 +1,16 @@ +package tectech; + +import gregtech.GT_Version; +import gregtech.api.enums.Mods; + +public final class Reference { + + public static final String MODID = Mods.Names.TECTECH; + public static final String NAME = "TecTech - Tec Technology!"; + public static final String VERSION = GT_Version.VERSION; + public static final String COLLECTIONNAME = "TecTech"; + public static final String CLIENTSIDE = "tectech.proxy.ClientProxy"; + public static final String SERVERSIDE = "tectech.proxy.CommonProxy"; + + private Reference() {} +} diff --git a/src/main/java/tectech/TecTech.java b/src/main/java/tectech/TecTech.java new file mode 100644 index 0000000000..503f6ff35c --- /dev/null +++ b/src/main/java/tectech/TecTech.java @@ -0,0 +1,119 @@ +package tectech; + +import static gregtech.api.enums.Mods.COFHCore; + +import net.minecraftforge.common.MinecraftForge; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import cpw.mods.fml.common.event.FMLPostInitializationEvent; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import eu.usrv.yamcore.auxiliary.IngameErrorLog; +import eu.usrv.yamcore.auxiliary.LogHelper; +import gregtech.api.objects.XSTR; +import tectech.loader.MainLoader; +import tectech.loader.TecTechConfig; +import tectech.loader.gui.CreativeTabTecTech; +import tectech.loader.thing.MuTeLoader; +import tectech.mechanics.enderStorage.EnderWorldSavedData; +import tectech.proxy.CommonProxy; +import tectech.recipe.EyeOfHarmonyRecipeStorage; +import tectech.recipe.TecTechRecipeMaps; + +@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:structurelib;" + + "after:ComputerCraft;" + + "after:OpenComputers;" + + "required-after:gtneioreplugin;" + + "required-after:gregtech;" + + "after:dreamcraft;" + + "after:appliedenergistics2;" + + "after:CoFHCore;" + + "after:Thaumcraft;") +public class TecTech { + + @SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE) + public static CommonProxy proxy; + + @Mod.Instance(Reference.MODID) + public static TecTech instance; + + public static final XSTR RANDOM = XSTR.XSTR_INSTANCE; + public static final LogHelper LOGGER = new LogHelper(Reference.MODID); + public static CreativeTabTecTech creativeTabTecTech; + + public static TecTechConfig configTecTech; + + public static EnderWorldSavedData enderWorldSavedData; + + /** + * For Loader.isModLoaded checks during the runtime + */ + public static boolean hasCOFH = false; + + public static final byte tectechTexturePage1 = 8; + + @Mod.EventHandler + @SuppressWarnings("unused") + public void PreLoad(FMLPreInitializationEvent PreEvent) { + LOGGER.setDebugOutput(true); + + configTecTech = new TecTechConfig( + PreEvent.getModConfigurationDirectory(), + Reference.COLLECTIONNAME, + Reference.MODID); + + if (!configTecTech.LoadConfig()) { + LOGGER.error(Reference.MODID + " could not load its config file. Things are going to be weird!"); + } + + if (configTecTech.MOD_ADMIN_ERROR_LOGS) { + LOGGER.setDebugOutput(TecTechConfig.DEBUG_MODE); + LOGGER.debug("moduleAdminErrorLogs is enabled"); + IngameErrorLog moduleAdminErrorLogs = new IngameErrorLog(); + } + + enderWorldSavedData = new EnderWorldSavedData(); + FMLCommonHandler.instance() + .bus() + .register(enderWorldSavedData); + MinecraftForge.EVENT_BUS.register(enderWorldSavedData); + TecTechEventHandlers.init(); + + TecTechRecipeMaps.init(); + MainLoader.preLoad(); + new MuTeLoader().run(); + } + + @Mod.EventHandler + @SuppressWarnings("unused") + public void Load(FMLInitializationEvent event) { + hasCOFH = COFHCore.isModLoaded(); + + MainLoader.load(); + MainLoader.addAfterGregTechPostLoadRunner(); + } + + @Mod.EventHandler + @SuppressWarnings("unused") + public void PostLoad(FMLPostInitializationEvent PostEvent) { + MainLoader.postLoad(); + } + + @Mod.EventHandler + @SuppressWarnings("unused") + public void onLoadCompleted(FMLLoadCompleteEvent event) { + eyeOfHarmonyRecipeStorage = new EyeOfHarmonyRecipeStorage(); + MainLoader.onLoadCompleted(); + } + + public static EyeOfHarmonyRecipeStorage eyeOfHarmonyRecipeStorage = null; + +} diff --git a/src/main/java/tectech/TecTechEventHandlers.java b/src/main/java/tectech/TecTechEventHandlers.java new file mode 100644 index 0000000000..97808e1b93 --- /dev/null +++ b/src/main/java/tectech/TecTechEventHandlers.java @@ -0,0 +1,23 @@ +package tectech; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent.Phase; +import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent; +import tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil; + +public class TecTechEventHandlers { + + public static void init() { + FMLCommonHandler.instance() + .bus() + .register(new TecTechEventHandlers()); + } + + @SubscribeEvent + public void onServerTickEnd(ServerTickEvent event) { + if (event.phase == Phase.END) { + TeslaUtil.housekeep(); + } + } +} diff --git a/src/main/java/tectech/compatibility/openComputers/AvrArchitecture.java b/src/main/java/tectech/compatibility/openComputers/AvrArchitecture.java new file mode 100644 index 0000000000..c12ac0e754 --- /dev/null +++ b/src/main/java/tectech/compatibility/openComputers/AvrArchitecture.java @@ -0,0 +1,307 @@ +package tectech.compatibility.openComputers; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import org.apache.commons.compress.utils.IOUtils; + +import com.github.technus.avrClone.AvrCore; +import com.github.technus.avrClone.instructions.ExecutionEvent; +import com.github.technus.avrClone.instructions.InstructionRegistry; +import com.github.technus.avrClone.instructions.exceptions.DebugEvent; +import com.github.technus.avrClone.instructions.exceptions.DelayEvent; +import com.github.technus.avrClone.memory.EepromMemory; +import com.github.technus.avrClone.memory.RemovableMemory; +import com.github.technus.avrClone.memory.program.ProgramMemory; + +import li.cil.oc.Settings; +import li.cil.oc.api.Driver; +import li.cil.oc.api.driver.Item; +import li.cil.oc.api.driver.item.Memory; +import li.cil.oc.api.machine.Architecture; +import li.cil.oc.api.machine.ExecutionResult; +import li.cil.oc.api.machine.Machine; +import li.cil.oc.api.machine.Signal; +import li.cil.oc.common.SaveHandler; +import tectech.TecTech; +import tectech.util.Converter; + +@Architecture.Name("AVR 32Bit Clone") +@Architecture.NoMemoryRequirements +public class AvrArchitecture implements Architecture { + + private final Machine machine; + private AvrCore core; + private boolean debugRun; + private int delay; + private int[] tempData; + private int memSize; + + public AvrArchitecture(Machine machine) { + this.machine = machine; + } + + @Override + public boolean isInitialized() { + return core != null && core.checkValid(); + } + + @Override + public boolean recomputeMemory(Iterable components) { + computeMemory(components); + return true; + } + + private void computeMemory(Iterable components) { + int memory = 0; + for (ItemStack component : components) { + Item driver = Driver.driverFor(component); + if (driver instanceof Memory memoryDriver) { + memory += memoryDriver.amount(component) * 256; // in integers + } // else if (driver instanceof DriverEEPROM$) { + + // } + } + memory = Math.min( + Math.max(memory, 0), + Settings.get() + .maxTotalRam()); + if (memory != memSize) {} + } + + @Override + public boolean initialize() { + core = new AvrCore(); + + computeMemory( + this.machine.host() + .internalComponents()); + + if (isInitialized()) { + machine.beep("."); + return true; + } + return false; + } + + @Override + public void close() { + core = null; + tempData = null; + delay = 0; + } + + @Override + public void runSynchronized() { + core.cycle(); + } + + @Override + public ExecutionResult runThreaded(boolean isSynchronizedReturn) { + if (core.awoken) { + delay = 0; + for (int load = 0; load < 512;) { + load += core.getInstruction() + .getCost(core); + ExecutionEvent executionEvent = core.cpuCycleForce(); + if (executionEvent != null) { + if (executionEvent.throwable instanceof DelayEvent) { + delay = executionEvent.data[0]; + break; + } else if (executionEvent.throwable instanceof DebugEvent) { + if (debugRun) { + // aBaseMetaTileEntity.setActive(false); + break; + } + } + } + } + } else if (delay > 0) { + delay--; + if (delay == 0) { + core.awoken = true; + } + } + return null; + } + + @Override + public void onSignal() { + Signal signal = machine.popSignal(); + + core.interruptsHandle(); + } + + @Override + public void onConnect() { + // init network components, in case init was called from load logic (pre first tick?) + } + + @Override + public void load(NBTTagCompound avr) { + debugRun = avr.getBoolean("debugRun"); + delay = avr.getInteger("delay"); + core.active = avr.getBoolean("active"); + core.awoken = (avr.getBoolean("awoken")); + core.programCounter = avr.getInteger("programCounter"); + InstructionRegistry registry = InstructionRegistry.REGISTRIES.get(avr.getString("instructionRegistry")); + if (registry != null) { + byte[] instructions = SaveHandler.load( + avr, + this.machine.node() + .address() + "_instructionsMemory"); + byte[] param0 = SaveHandler.load( + avr, + this.machine.node() + .address() + "_param0Memory"); + byte[] param1 = SaveHandler.load( + avr, + this.machine.node() + .address() + "_param1Memory"); + if (instructions != null && param0 != null + && param1 != null + && instructions.length > 0 + && param0.length > 0 + && param1.length > 0) { + int[] instr = null, par0 = null, par1 = null; + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(instructions)); + instr = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress instructions memory from disk."); + e.printStackTrace(); + } + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(param0)); + par0 = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress param0 memory from disk."); + e.printStackTrace(); + } + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(param1)); + par1 = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress param1 memory from disk."); + e.printStackTrace(); + } + if (instr != null && par0 != null + && par1 != null + && instr.length == par0.length + && instr.length == par1.length) { + core.setProgramMemory(new ProgramMemory(registry, avr.getBoolean("immersive"), instr, par0, par1)); + } + } + } + if (avr.hasKey("eepromSize")) { + core.restoreEepromDefinition(EepromMemory.make(avr.getInteger("eepromSize"))); + } + byte[] data = SaveHandler.load( + avr, + this.machine.node() + .address() + "_dataMemory"); + if (data != null && data.length > 0) { + try { + GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(data)); + tempData = Converter.readInts(IOUtils.toByteArray(gzis)); + IOUtils.closeQuietly(gzis); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to decompress data memory from disk."); + e.printStackTrace(); + } + } + core.checkValid(); + } + + @Override + public void save(NBTTagCompound avr) { + avr.setBoolean("debugRun", debugRun); + avr.setInteger("delay", delay); + avr.setBoolean("active", core.active); + avr.setBoolean("awoken", core.awoken); + avr.setInteger("programCounter", core.programCounter); + ProgramMemory programMemory = core.getProgramMemory(); + if (programMemory != null) { + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.instructions)); + gzos.close(); + SaveHandler.scheduleSave( + machine.host(), + avr, + machine.node() + .address() + "_instructionsMemory", + baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress instructions memory to disk"); + e.printStackTrace(); + } + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.param0)); + gzos.close(); + SaveHandler.scheduleSave( + machine.host(), + avr, + machine.node() + .address() + "_param0Memory", + baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress param0 memory to disk"); + e.printStackTrace(); + } + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(programMemory.param1)); + gzos.close(); + SaveHandler.scheduleSave( + machine.host(), + avr, + machine.node() + .address() + "_param1Memory", + baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress param1 memory to disk"); + e.printStackTrace(); + } + avr.setBoolean("immersive", programMemory.immersiveOperands); + avr.setString("instructionRegistry", programMemory.registry.toString()); + } + RemovableMemory eeprom = core.getEepromMemory(); + if (eeprom != null) { + avr.setInteger( + "eepromSize", + eeprom.getDefinition() + .getSize()); + } + if (core.dataMemory != null) { + try { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzos = new GZIPOutputStream(baos); + gzos.write(Converter.writeInts(core.dataMemory)); + gzos.close(); + SaveHandler.scheduleSave( + machine.host(), + avr, + machine.node() + .address() + "_dataMemory", + baos.toByteArray()); + } catch (IOException e) { + TecTech.LOGGER.error("Failed to compress data memory to disk"); + e.printStackTrace(); + } + } + } +} diff --git a/src/main/java/tectech/loader/MainLoader.java b/src/main/java/tectech/loader/MainLoader.java new file mode 100644 index 0000000000..801653ca4b --- /dev/null +++ b/src/main/java/tectech/loader/MainLoader.java @@ -0,0 +1,206 @@ +package tectech.loader; + +import static gregtech.api.enums.Mods.NewHorizonsCoreMod; +import static gregtech.api.enums.Mods.TwilightForest; +import static tectech.TecTech.LOGGER; +import static tectech.TecTech.configTecTech; +import static tectech.TecTech.creativeTabTecTech; +import static tectech.TecTech.proxy; +import static tectech.loader.TecTechConfig.DEBUG_MODE; + +import java.util.HashMap; + +import net.minecraft.block.Block; +import net.minecraft.util.DamageSource; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; + +import cpw.mods.fml.common.ProgressManager; +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.GregTechAPI; +import gregtech.api.enums.Materials; +import gregtech.api.recipe.RecipeMaps; +import gregtech.api.util.GTRecipe; +import tectech.TecTech; +import tectech.loader.gui.CreativeTabTecTech; +import tectech.loader.recipe.BaseRecipeLoader; +import tectech.loader.recipe.ResearchStationAssemblyLine; +import tectech.loader.thing.CoverLoader; +import tectech.loader.thing.MachineLoader; +import tectech.loader.thing.ThingsLoader; +import tectech.thing.casing.TTCasingsContainer; +import tectech.thing.metaTileEntity.Textures; + +@SuppressWarnings("deprecation") +public final class MainLoader { + + public static DamageSource microwaving; + + private MainLoader() {} + + public static void preLoad() { + creativeTabTecTech = new CreativeTabTecTech("TecTech"); + + // set expanded texture arrays for tiers + try { + Textures.run(); + } catch (Throwable t) { + LOGGER.error("Loading textures...", t); + } + } + + public static void load() { + ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 6); + + progressBarLoad.step("Regular Things"); + new ThingsLoader().run(); + LOGGER.info("Block/Item Init Done"); + + progressBarLoad.step("Machine Things"); + new MachineLoader().run(); + LOGGER.info("Machine Init Done"); + + progressBarLoad.step("Cover Things"); + new CoverLoader().run(); + LOGGER.info("Cover Init Done"); + + progressBarLoad.step("Add damage types"); + microwaving = new DamageSource("microwaving").setDamageBypassesArmor(); + LOGGER.info("Damage types addition Done"); + + progressBarLoad.step("Register Packet Dispatcher"); + new NetworkDispatcher(); + LOGGER.info("Packet Dispatcher registered"); + + progressBarLoad.step("Register GUI Handler"); + proxy.registerRenderInfo(); + LOGGER.info("GUI Handler registered"); + + ProgressManager.pop(progressBarLoad); + } + + public static void postLoad() { + ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 4); + + progressBarPostLoad.step("Dreamcraft Compatibility"); + if (NewHorizonsCoreMod.isModLoaded()) { + try { + Class clazz = Class.forName("com.dreammaster.gthandler.casings.GT_Container_CasingsNH"); + TTCasingsContainer.sBlockCasingsNH = (Block) clazz.getField("sBlockCasingsNH") + .get(null); + + if (TTCasingsContainer.sBlockCasingsNH == null) { + throw new NullPointerException("sBlockCasingsNH Is not set at this time"); + } + } catch (Exception e) { + throw new Error("Unable to get NH casings", e); + } + } + + progressBarPostLoad.step("Recipes"); + new BaseRecipeLoader().run(); + TecTech.LOGGER.info("Recipe Init Done"); + + if (!configTecTech.DISABLE_BLOCK_HARDNESS_NERF) { + progressBarPostLoad.step("Nerf blocks blast resistance"); + adjustTwilightBlockResistance(); + TecTech.LOGGER.info("Blocks nerf done"); + } else { + progressBarPostLoad.step("Do not nerf blocks blast resistance"); + TecTech.LOGGER.info("Blocks were not nerfed"); + } + + // ProgressManager.pop(progressBarPostLoad); + } + + public static void addAfterGregTechPostLoadRunner() { + GregTechAPI.sAfterGTPostload.add(() -> { + if (TecTech.configTecTech.NERF_FUSION) { + FixBrokenFusionRecipes(); + } + }); + } + + private static 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 (GTRecipe r : RecipeMaps.fusionRecipes.getAllRecipes()) { + 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.mFluidOutputs[0].amount); + } + fluid = binds.get(r.mFluidInputs[0].getFluid()); + if (fluid != null) { + if (DEBUG_MODE) { + LOGGER.info("Fixing plasma use in Recipe " + r.mFluidInputs[0].getUnlocalizedName()); + } + r.mFluidInputs[0] = new FluidStack(fluid, r.mFluidInputs[0].amount); + } + fluid = binds.get(r.mFluidInputs[1].getFluid()); + if (fluid != null) { + if (DEBUG_MODE) { + LOGGER.info("Fixing plasma use in Recipe " + r.mFluidInputs[1].getUnlocalizedName()); + } + r.mFluidInputs[1] = new FluidStack(fluid, r.mFluidInputs[1].amount); + } + } + } + + private static void safeSetResistance(Block block, float resistance) { + if (block != null) { + block.setResistance(resistance); + } + } + + private static void adjustTwilightBlockResistance() { + if (TwilightForest.isModLoaded()) { + safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFShield"), 30); + safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFThorns"), 10); + safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFTowerTranslucent"), 30); + safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFDeadrock"), 5); + } + } + + public static void onLoadCompleted() { + new ResearchStationAssemblyLine().runLateRecipes(); + } +} diff --git a/src/main/java/tectech/loader/NetworkDispatcher.java b/src/main/java/tectech/loader/NetworkDispatcher.java new file mode 100644 index 0000000000..dd46715450 --- /dev/null +++ b/src/main/java/tectech/loader/NetworkDispatcher.java @@ -0,0 +1,25 @@ +package tectech.loader; + +import static tectech.Reference.MODID; + +import tectech.mechanics.pipe.PipeActivityMessage; +import tectech.mechanics.spark.RendererMessage; + +public class NetworkDispatcher extends eu.usrv.yamcore.network.PacketDispatcher { + + public static NetworkDispatcher INSTANCE; + + public NetworkDispatcher() { + super(MODID); + INSTANCE = this; + registerPackets(); + } + + @Override + public void registerPackets() { + registerMessage(PipeActivityMessage.ServerHandler.class, PipeActivityMessage.PipeActivityQuery.class); + registerMessage(PipeActivityMessage.ClientHandler.class, PipeActivityMessage.PipeActivityData.class); + + registerMessage(RendererMessage.ClientHandler.class, RendererMessage.RendererData.class); + } +} diff --git a/src/main/java/tectech/loader/TecTechConfig.java b/src/main/java/tectech/loader/TecTechConfig.java new file mode 100644 index 0000000000..06ded34e01 --- /dev/null +++ b/src/main/java/tectech/loader/TecTechConfig.java @@ -0,0 +1,271 @@ +package tectech.loader; + +import java.io.File; + +import net.minecraft.launchwrapper.Launch; + +import eu.usrv.yamcore.config.ConfigManager; + +public class TecTechConfig extends ConfigManager { + + public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory, String pModID) { + super(pConfigBaseDirectory, pModCollectionDirectory, pModID); + } + + // final static to allow compiler to remove the debug code when this is false + public static boolean DEBUG_MODE = false; + public static boolean POWERLESS_MODE = false; + /** + * Not complete; enabled by default only in dev env + */ + public boolean ENABLE_GOD_FORGE; + + public boolean BOOM_ENABLE; + public boolean DISABLE_BLOCK_HARDNESS_NERF; + public boolean EASY_SCAN; + public boolean NERF_FUSION; + public boolean ENABLE_TURRET_EXPLOSIONS; + public float TURRET_DAMAGE_FACTOR; + public float TURRET_EXPLOSION_FACTOR; + + public boolean MOD_ADMIN_ERROR_LOGS; + + public boolean TESLA_MULTI_GAS_OUTPUT; + public float TESLA_MULTI_LOSS_FACTOR_OVERDRIVE; + public int TESLA_MULTI_LOSS_PER_BLOCK_T0; + public int TESLA_MULTI_LOSS_PER_BLOCK_T1; + public int TESLA_MULTI_LOSS_PER_BLOCK_T2; + public int TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM; + public int TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN; + public int TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON; + public int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1; + public int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2; + public int TESLA_MULTI_RANGE_COVER; + public int TESLA_MULTI_RANGE_TOWER; + public int TESLA_MULTI_RANGE_TRANSCEIVER; + public float TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE; + public int TESLA_SINGLE_LOSS_PER_BLOCK; + public int TESLA_SINGLE_RANGE; + public boolean TESLA_VISUAL_EFFECT; + + /** + * This loading phases do not correspond to mod loading phases! + */ + @Override + protected void PreInit() { + + BOOM_ENABLE = true; + DISABLE_BLOCK_HARDNESS_NERF = false; + EASY_SCAN = false; + NERF_FUSION = false; + ENABLE_TURRET_EXPLOSIONS = true; + TURRET_DAMAGE_FACTOR = 10; + TURRET_EXPLOSION_FACTOR = 1; + + MOD_ADMIN_ERROR_LOGS = false; + + TESLA_MULTI_GAS_OUTPUT = false; + TESLA_MULTI_LOSS_FACTOR_OVERDRIVE = 0.25F; + TESLA_MULTI_LOSS_PER_BLOCK_T0 = 1; + TESLA_MULTI_LOSS_PER_BLOCK_T1 = 1; + TESLA_MULTI_LOSS_PER_BLOCK_T2 = 1; + TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM = 100; + TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN = 50; + TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON = 50; + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1 = 2; + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2 = 4; + TESLA_MULTI_RANGE_COVER = 16; + TESLA_MULTI_RANGE_TOWER = 32; + TESLA_MULTI_RANGE_TRANSCEIVER = 16; + TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = 0.25F; + TESLA_SINGLE_LOSS_PER_BLOCK = 1; + TESLA_SINGLE_RANGE = 20; + TESLA_VISUAL_EFFECT = true; + + ENABLE_GOD_FORGE = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); + } + + /** + * This loading phases do not correspond to mod loading phases! + */ + @Override + protected void Init() { + DEBUG_MODE = _mainConfig + .getBoolean("DebugMode", "debug", DEBUG_MODE, "Enables logging and other purely debug features"); + POWERLESS_MODE = _mainConfig + .getBoolean("PowerlessMode", "debug", POWERLESS_MODE, "Enables 0EU/t multi block machinery"); + ENABLE_GOD_FORGE = _mainConfig.getBoolean( + "EnableGodForge", + "debug", + ENABLE_GOD_FORGE, + "Enables the in progress God Forge; enabled automatically in dev env"); + + BOOM_ENABLE = _mainConfig.getBoolean( + "BoomEnable", + "features", + BOOM_ENABLE, + "Set to false to disable explosions on everything bad that you can do"); + DISABLE_BLOCK_HARDNESS_NERF = _mainConfig.getBoolean( + "DisableBlockHardnessNerf", + "features", + DISABLE_BLOCK_HARDNESS_NERF, + "Set to true to disable the block hardness nerf"); + EASY_SCAN = _mainConfig.getBoolean( + "EasyScan", + "features", + EASY_SCAN, + "Enables tricorder to scan EM i/o hatches directly, too CHEEKY"); + 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"); + + MOD_ADMIN_ERROR_LOGS = _mainConfig.getBoolean( + "AdminErrorLog", + "modules", + MOD_ADMIN_ERROR_LOGS, + "If set to true, every op/admin will receive all errors occurred during the startup phase as in game message on join"); + + TESLA_MULTI_GAS_OUTPUT = _mainConfig.getBoolean( + "TeslaMultiGasOutput", + "tesla_tweaks", + TESLA_MULTI_GAS_OUTPUT, + "Set to true to enable outputting plasmas as gasses from the tesla tower with a 1:1 ratio"); + TESLA_MULTI_LOSS_FACTOR_OVERDRIVE = _mainConfig.getFloat( + "TeslaMultiLossFactorOverdrive", + "tesla_tweaks", + TESLA_MULTI_LOSS_FACTOR_OVERDRIVE, + 0, + 1, + "Additional Tesla Tower power loss per amp as a factor of the tier voltage"); + TESLA_MULTI_LOSS_PER_BLOCK_T0 = _mainConfig.getInt( + "TeslaMultiLossPerBlockT0", + "tesla_tweaks", + TESLA_MULTI_LOSS_PER_BLOCK_T0, + 0, + Integer.MAX_VALUE, + "Tesla Tower power transmission loss per block per amp using no plasmas"); + TESLA_MULTI_LOSS_PER_BLOCK_T1 = _mainConfig.getInt( + "TeslaMultiLossPerBlockT1", + "tesla_tweaks", + TESLA_MULTI_LOSS_PER_BLOCK_T1, + 0, + Integer.MAX_VALUE, + "Tesla Tower power transmission loss per block per amp using helium or nitrogen plasma"); + TESLA_MULTI_LOSS_PER_BLOCK_T2 = _mainConfig.getInt( + "TeslaMultiLossPerBlockT2", + "tesla_tweaks", + TESLA_MULTI_LOSS_PER_BLOCK_T2, + 0, + Integer.MAX_VALUE, + "Tesla Tower power transmission loss per block per amp using radon plasma"); + TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM = _mainConfig.getInt( + "TeslaMultiPlasmaPerSecondT1Helium", + "tesla_tweaks", + TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM, + 0, + Integer.MAX_VALUE, + "Tesla Tower helium plasma consumed each second the tesla tower is active"); + TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN = _mainConfig.getInt( + "TeslaMultiPlasmaPerSecondT1Nitrogen", + "tesla_tweaks", + TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN, + 0, + Integer.MAX_VALUE, + "Tesla Tower nitrogen plasma consumed each second the tesla tower is active"); + TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON = _mainConfig.getInt( + "TeslaMultiPlasmaPerSecondT2Radon", + "tesla_tweaks", + TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON, + 0, + Integer.MAX_VALUE, + "Tesla Tower radon plasma consumed each second the tesla tower is active"); + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1 = _mainConfig.getInt( + "TeslaMultiRangeCoefficientPlasmaT1", + "tesla_tweaks", + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1, + 0, + Integer.MAX_VALUE, + "Tesla Tower T1 Plasmas Range Multiplier"); + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2 = _mainConfig.getInt( + "TeslaMultiRangeCoefficientPlasmaT2", + "tesla_tweaks", + TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2, + 0, + Integer.MAX_VALUE, + "Tesla Tower T2 Plasmas Range Multiplier"); + TESLA_MULTI_RANGE_COVER = _mainConfig.getInt( + "TeslaMultiRangeCover", + "tesla_tweaks", + TESLA_MULTI_RANGE_COVER, + 0, + Integer.MAX_VALUE, + "Tesla Tower to Tesla Coil Rich Edition Cover max range"); + TESLA_MULTI_RANGE_TOWER = _mainConfig.getInt( + "TeslaMultiRangeTower", + "tesla_tweaks", + TESLA_MULTI_RANGE_TOWER, + 0, + Integer.MAX_VALUE, + "Tesla Tower to Tower max range"); + TESLA_MULTI_RANGE_TRANSCEIVER = _mainConfig.getInt( + "TeslaMultiRangeTransceiver", + "tesla_tweaks", + TESLA_MULTI_RANGE_TRANSCEIVER, + 0, + Integer.MAX_VALUE, + "Tesla Tower to Transceiver max range"); + TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = _mainConfig.getFloat( + "TeslaSingleLossFactorOverdrive", + "tesla_tweaks", + TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE, + 0, + 1, + "Additional Tesla Transceiver power loss per amp as a factor of the tier voltage"); + TESLA_SINGLE_LOSS_PER_BLOCK = _mainConfig.getInt( + "TeslaSingleLossPerBlock", + "tesla_tweaks", + TESLA_SINGLE_LOSS_PER_BLOCK, + 0, + Integer.MAX_VALUE, + "Tesla Transceiver power transmission loss per block per amp"); + TESLA_SINGLE_RANGE = _mainConfig.getInt( + "TeslaSingleRange", + "tesla_tweaks", + TESLA_SINGLE_RANGE, + 0, + Integer.MAX_VALUE, + "Tesla Transceiver to max range"); + TESLA_VISUAL_EFFECT = _mainConfig.getBoolean( + "EnableTeslaVisualEffect", + "tesla_tweaks", + TESLA_VISUAL_EFFECT, + "Set true to enable the cool visual effect when tesla tower running."); + } + + /** + * This loading phases do not correspond to mod loading phases! + */ + @Override + protected void PostInit() {} +} diff --git a/src/main/java/tectech/loader/gui/CreativeTabTecTech.java b/src/main/java/tectech/loader/gui/CreativeTabTecTech.java new file mode 100644 index 0000000000..d098d375c4 --- /dev/null +++ b/src/main/java/tectech/loader/gui/CreativeTabTecTech.java @@ -0,0 +1,36 @@ +package tectech.loader.gui; + +import java.util.List; + +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.GregTechAPI; +import tectech.thing.CustomItemList; +import tectech.thing.casing.TTCasingsContainer; + +public class CreativeTabTecTech extends CreativeTabs { + + public CreativeTabTecTech(String name) { + super(name); + } + + @SideOnly(Side.CLIENT) + @Override + public Item getTabIconItem() { + return Item.getItemFromBlock(TTCasingsContainer.sBlockCasingsTT); // High power casing + } + + @Override + public void displayAllReleventItems(List stuffToShow) { + for (CustomItemList item : CustomItemList.values()) { + if (item.hasBeenSet() && item.getBlock() == GregTe