aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-15 03:55:29 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-15 03:55:29 +0100
commit56c2250dbf7d36ee72580ce9304646dcd1757ac1 (patch)
treec89e1995d83d247b9b2ed559179009be6cd34fe3 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
parentb5e6865373c48ce444b5c3e09335ca50945eba8e (diff)
downloadGT5-Unofficial-56c2250dbf7d36ee72580ce9304646dcd1757ac1.tar.gz
GT5-Unofficial-56c2250dbf7d36ee72580ce9304646dcd1757ac1.tar.bz2
GT5-Unofficial-56c2250dbf7d36ee72580ce9304646dcd1757ac1.zip
$ Made code compatible with changes made by @mitchej123 during https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d.
> I guess this code is never called, or it's inherited. Odd that it hasn't ever broke.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
index d17c820699..4dd5bf25d6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaPipeEntityBase_Cable.java
@@ -5,6 +5,7 @@ import static gregtech.api.enums.GT_Values.VN;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashSet;
import cofh.api.energy.IEnergyReceiver;
import net.minecraft.entity.Entity;
@@ -219,6 +220,18 @@ public class GregtechMetaPipeEntityBase_Cable extends MetaPipeEntity implements
return this.transferElectricity(aSide, aVoltage, aAmperage,
new ArrayList<>(Arrays.asList((TileEntity) this.getBaseMetaTileEntity())));
}
+
+
+ /**
+ * Adds support for the newer function added by https://github.com/Blood-Asp/GT5-Unofficial/commit/73ee102b63efd92c0f164a7ed7a79ebcd2619617#diff-3051838621d8ae87aa5ccd1345e1f07d
+ */
+ public long transferElectricity(byte arg0, long arg1, long arg2, HashSet<TileEntity> arg3) {
+ ArrayList<TileEntity> aTiles = new ArrayList<TileEntity>();
+ for (TileEntity y : arg3) {
+ aTiles.add(y);
+ }
+ return transferElectricity(arg0, arg1, arg2, aTiles);
+ }
@Override
public long transferElectricity(final byte aSide, long aVoltage, final long aAmperage,