Fixed a casting issue and Microblock trait reference to class path

This commit is contained in:
Robert S 2014-05-17 20:24:11 -04:00
parent 8341033ade
commit 7918802c66
2 changed files with 10 additions and 7 deletions

View file

@ -19,7 +19,7 @@ public class MultipartMechanical implements IPartFactory
MultiPartRegistry.registerParts(this, PART_TYPES);
MultipartGenerator.registerPassThroughInterface("resonantinduction.core.grid.fluid.IPressureNodeProvider");
// TODO: Move to UE
MultipartGenerator.registerTrait("calclavia.lib.grid.INodeProvider", "resonantinduction.core.grid.TraitNodeProvider");
MultipartGenerator.registerTrait("resonant.lib.grid.INodeProvider", "resonantinduction.core.grid.TraitNodeProvider");
}
@Override

View file

@ -49,10 +49,12 @@ public class GearShaftNode extends MechanicalNode
dirs.add(shaft().placementSide.getOpposite());
/** Check for internal connections, the FRONT and BACK. */
Iterator<ForgeDirection> it = dirs.iterator();
while(it.hasNext())
while (it.hasNext())
{
ForgeDirection checkDir = it.next();
if (checkDir == shaft().placementSide || checkDir == shaft().placementSide.getOpposite())
{
if (shaft().tile() instanceof INodeProvider)
{
MechanicalNode instance = ((INodeProvider) shaft().tile()).getNode(MechanicalNode.class, checkDir);
@ -63,6 +65,7 @@ public class GearShaftNode extends MechanicalNode
}
}
}
}
/** Look for connections outside this block space, the relative FRONT and BACK */
if (!dirs.isEmpty())