diff options
author | Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> | 2022-09-11 01:59:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-11 01:59:07 +0100 |
commit | fe595d51866c8b43fb07b2d8aa3d76ffcbfbc48e (patch) | |
tree | d2ad01823fff33408beb772f75ae24a8ad71d6ac /src/main/java/gregtech/api/metatileentity/implementations | |
parent | 930d4392b82129a413fd23e700a94052ad3e4632 (diff) | |
download | GT5-Unofficial-fe595d51866c8b43fb07b2d8aa3d76ffcbfbc48e.tar.gz GT5-Unofficial-fe595d51866c8b43fb07b2d8aa3d76ffcbfbc48e.tar.bz2 GT5-Unofficial-fe595d51866c8b43fb07b2d8aa3d76ffcbfbc48e.zip |
Fix global wireless EU bugging by transferring to world NBT system (#1371)
* Transfer to NBT
* Half working, write only.
* Fix load data
* Works, thanks Kuba.
* spotlessApply (#1372)
Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>
Co-authored-by: GitHub GTNH Actions <>
* Fix NPE in unit tests
* Spotless
* Move clear map
* Spotless and import cleanup
* Suppressions and warning corrections
* Warnings, warnings, warnings smh.
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Co-authored-by: kuba6000 <kuba.123123.6000@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
2 files changed, 1 insertions, 7 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java index 3fd496e960..140a81f766 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Dynamo.java @@ -124,9 +124,6 @@ public class GT_MetaTileEntity_Wireless_Dynamo extends GT_MetaTileEntity_Hatch_D owner_uuid = aBaseMetaTileEntity.getOwnerUuid().toString(); owner_name = aBaseMetaTileEntity.getOwnerName(); - // Attempt to load in map from file. - if (GlobalEnergy.size() == 0) loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); - strongCheckOrAddUser(owner_uuid, owner_name); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java index baffde6f3f..ee1af3281b 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Wireless_Hatch.java @@ -129,9 +129,6 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En owner_uuid = aBaseMetaTileEntity.getOwnerUuid().toString(); owner_name = aBaseMetaTileEntity.getOwnerName(); - // Attempt to load in map from file. - if (GlobalEnergy.size() == 0) loadGlobalEnergyInfo(aBaseMetaTileEntity.getWorld()); - strongCheckOrAddUser(owner_uuid, owner_name); if (addEUToGlobalEnergyMap(owner_uuid, eu_transferred_per_operation.negate())) @@ -144,7 +141,7 @@ public class GT_MetaTileEntity_Wireless_Hatch extends GT_MetaTileEntity_Hatch_En // Every ticks_between_energy_addition add eu_transferred_per_operation to internal EU storage from network. if (aTick % ticks_between_energy_addition == 0L) { - long total_eu = this.getBaseMetaTileEntity().getStoredEU(); + long total_eu = getBaseMetaTileEntity().getStoredEU(); // Can the machine store the EU being added? long new_eu_storage = total_eu + eu_transferred_per_operation_long; |