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); MultiPartRegistry.registerParts(this, PART_TYPES);
MultipartGenerator.registerPassThroughInterface("resonantinduction.core.grid.fluid.IPressureNodeProvider"); MultipartGenerator.registerPassThroughInterface("resonantinduction.core.grid.fluid.IPressureNodeProvider");
// TODO: Move to UE // 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 @Override

View file

@ -53,6 +53,8 @@ public class GearShaftNode extends MechanicalNode
{ {
ForgeDirection checkDir = it.next(); ForgeDirection checkDir = it.next();
if (checkDir == shaft().placementSide || checkDir == shaft().placementSide.getOpposite()) if (checkDir == shaft().placementSide || checkDir == shaft().placementSide.getOpposite())
{
if (shaft().tile() instanceof INodeProvider)
{ {
MechanicalNode instance = ((INodeProvider) shaft().tile()).getNode(MechanicalNode.class, checkDir); 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 */ /** Look for connections outside this block space, the relative FRONT and BACK */
if (!dirs.isEmpty()) if (!dirs.isEmpty())