Implement canConnectEnergy so RF cables don't connect when they shouldn't
This commit is contained in:
parent
12215490f0
commit
a865a19340
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue