diff --git a/dependencies.gradle b/dependencies.gradle index 16cfb25..ed20068 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,7 +1,7 @@ // Add your dependencies here dependencies { - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev') - api('com.github.GTNewHorizons:bartworks:0.9.4:dev') - api('com.github.GTNewHorizons:ThaumicTinkerer:2.9.0:dev') + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.100:dev') + api('com.github.GTNewHorizons:bartworks:0.9.17:dev') + api('com.github.GTNewHorizons:ThaumicTinkerer:2.9.2:dev') } diff --git a/gradle.properties b/gradle.properties index 214aa87..688f096 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ channel = stable mappingsVersion = 12 # Defines other MCP mappings for dependency deobfuscation. -remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ +remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ # Select a default username for testing your mod. You can always override this per-run by running # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. @@ -61,6 +61,9 @@ gradleTokenModId = # [DEPRECATED] Mod name replacement token. gradleTokenModName = +# [DEPRECATED] Mod Group replacement token. +gradleTokenGroupName = + # [DEPRECATED] # Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java # public static final String VERSION = "GRADLETOKEN_VERSION"; @@ -123,7 +126,7 @@ includeWellKnownRepositories = true usesMavenPublishing = true # Maven repository to publish the mod to. -# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/ +# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/ # Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token. # @@ -187,5 +190,3 @@ curseForgeRelations = # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true -# Non-GTNH properties -gradleTokenGroupName = diff --git a/settings.gradle b/settings.gradle index e8946ad..d2f6c29 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17' } diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index 43ed1ed..f6538ba 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -34,6 +34,7 @@ import java.util.List; import java.util.Queue; import java.util.Set; +import java.util.UUID; import java.util.function.Consumer; import net.minecraft.block.Block; @@ -75,7 +76,6 @@ import gregtech.api.enums.GT_Values; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.gui.modularui.GT_UITextures; -import gregtech.api.interfaces.IGlobalWirelessEnergy; import gregtech.api.interfaces.IHatchElement; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -89,10 +89,11 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; +import gregtech.common.misc.WirelessNetworkManager; +import gregtech.common.misc.spaceprojects.SpaceProjectManager; -public class GTMTE_LapotronicSuperCapacitor - extends GT_MetaTileEntity_EnhancedMultiBlockBase - implements IGlobalWirelessEnergy, ISurvivalConstructable { +public class GTMTE_LapotronicSuperCapacitor extends + GT_MetaTileEntity_EnhancedMultiBlockBase implements ISurvivalConstructable { private enum TopState { MayBeTop, @@ -521,7 +522,7 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec return sTexture; } - private String global_energy_user_uuid; + private UUID global_energy_user_uuid; @Override public void onPreTick(IGregTechTileEntity tileEntity, long aTick) { @@ -530,10 +531,10 @@ public void onPreTick(IGregTechTileEntity tileEntity, long aTick) { // On first tick (aTick restarts from 0 upon world reload). if (not_processed_lsc && tileEntity.isServerSide()) { // Add user to wireless network. - strongCheckOrAddUser(tileEntity.getOwnerUuid(), tileEntity.getOwnerName()); + WirelessNetworkManager.strongCheckOrAddUser(tileEntity.getOwnerUuid()); // Get team UUID. - global_energy_user_uuid = getUUIDFromUsername(tileEntity.getOwnerName()); + global_energy_user_uuid = SpaceProjectManager.getPlayerUUIDFromName(tileEntity.getOwnerName()); not_processed_lsc = false; } @@ -555,7 +556,7 @@ public boolean checkRecipe(ItemStack stack) { @Override public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) { - strongCheckOrAddUser(thisController.getOwnerUuid(), thisController.getOwnerName()); + WirelessNetworkManager.strongCheckOrAddUser(thisController.getOwnerUuid()); // Reset capacitor counts Arrays.fill(capacitors, 0); @@ -784,7 +785,7 @@ public boolean onRunningTick(ItemStack stack) { } // If that difference can be added then do so. - if (addEUToGlobalEnergyMap(global_energy_user_uuid, transferred_eu)) { + if (WirelessNetworkManager.addEUToGlobalEnergyMap(global_energy_user_uuid, transferred_eu)) { // If it succeeds there was sufficient energy so set the internal capacity as such. stored = LSC_wireless_eu_cap.multiply(BigInteger.valueOf(getUHVCapacitorCount())).add( UEV_wireless_eu_cap.multiply(BigInteger.valueOf(getUEVCapacitorCount())) @@ -940,7 +941,7 @@ public String[] getInfoData() { + getUMVCapacitorCount()); ll.add( "Total wireless EU: " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(getUserEU(global_energy_user_uuid))); + + GT_Utility.formatNumbers(WirelessNetworkManager.getUserEU(global_energy_user_uuid))); ll.add("---------------------------------------------"); final String[] a = new String[ll.size()];