Implement canConnectEnergy so RF cables don't connect when they shouldn't
This commit is contained in:
parent
12215490f0
commit
a865a19340
|
@ -288,7 +288,16 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
|
||||||
@Method(modid = "CoFHAPI|energy")
|
@Method(modid = "CoFHAPI|energy")
|
||||||
public boolean canConnectEnergy(ForgeDirection from)
|
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
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue