Fixed connecting only to wires sitting on the face
This commit is contained in:
parent
5e8dc4da03
commit
18b3219a61
1 changed files with 13 additions and 5 deletions
|
@ -101,12 +101,20 @@ public class TraitConductor extends TileMultipart implements IConductor
|
||||||
@Override
|
@Override
|
||||||
public long onReceiveEnergy(ForgeDirection from, long receive, boolean doReceive)
|
public long onReceiveEnergy(ForgeDirection from, long receive, boolean doReceive)
|
||||||
{
|
{
|
||||||
// TODO: Allow floor connections to also receive this.
|
/**
|
||||||
TMultiPart part = this.partMap(from.ordinal());
|
* Try out different sides to try to inject energy into.
|
||||||
|
*/
|
||||||
|
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
|
{
|
||||||
|
if (dir != from.getOpposite() && dir != from)
|
||||||
|
{
|
||||||
|
TMultiPart part = this.partMap(dir.ordinal());
|
||||||
|
|
||||||
if (this.interfaces.contains(part))
|
if (this.interfaces.contains(part))
|
||||||
{
|
{
|
||||||
((IConductor) part).onReceiveEnergy(from, receive, doReceive);
|
return ((IConductor) part).onReceiveEnergy(from, receive, doReceive);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue