mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Implement canConnectEnergy so RF cables don't connect when they shouldn't
This commit is contained in:
1 parent
12215490f0
commit
a865a19340
1 file changed
+10
-1
@@ -288,7 +288,16 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
|
||||
@Method(modid = "CoFHAPI|energy")
|
||||
public boolean canConnectEnergy(ForgeDirection from)
|
||||
{
|
||||
return true;
|
||||
if(redstoneReactive && world().isBlockIndirectlyGettingPowered(x(), y(), z()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
testingSide = from;
|
||||
boolean unblocked = tile().canReplacePart(this, this);
|
||||
testingSide = null;
|
||||
|
||||
return unblocked;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user