diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-07-02 20:52:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-02 20:52:49 +0200 |
commit | 2a5b42343509d9684affa6be27da32e9eef89851 (patch) | |
tree | c1542a71bf37ed7611aa4cecb6d633556798d01d /src/main/java/gregtech/api/GregTech_API.java | |
parent | 77c57a97b7286863f9239de806ac9659013d6852 (diff) | |
parent | 6f80c03736d6d9ea9c72d19f0af72fc727714370 (diff) | |
download | GT5-Unofficial-2a5b42343509d9684affa6be27da32e9eef89851.tar.gz GT5-Unofficial-2a5b42343509d9684affa6be27da32e9eef89851.tar.bz2 GT5-Unofficial-2a5b42343509d9684affa6be27da32e9eef89851.zip |
Merge pull request #572 from GTNewHorizons/beter-power-net
Better power net
Diffstat (limited to 'src/main/java/gregtech/api/GregTech_API.java')
-rw-r--r-- | src/main/java/gregtech/api/GregTech_API.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index e24297c48c..ba7e3ab43e 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -17,6 +17,7 @@ import gregtech.api.objects.GT_Cover_Default; import gregtech.api.objects.GT_Cover_None; import gregtech.api.objects.GT_HashSet; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.threads.GT_Runnable_Cable_Update; import gregtech.api.threads.GT_Runnable_MachineBlockUpdate; import gregtech.api.util.*; import gregtech.api.world.GT_Worldgen; @@ -407,6 +408,15 @@ public class GregTech_API { return false; } + public static boolean causeCableUpdate(World aWorld, int aX, int aY, int aZ) { + if (aWorld != null && !aWorld.isRemote) { // World might be null during Worldgen + GT_Runnable_Cable_Update.setCableUpdateValues(aWorld, new ChunkCoordinates(aX, aY, aZ)); + return true; + } + return false; + + } + /** * Adds a Multi-Machine Block, like my Machine Casings for example. * You should call @causeMachineUpdate in @Block.breakBlock and in @Block.onBlockAdded of your registered Block. |