diff --git a/mechanical/src/main/scala/resonantinduction/mechanical/MultipartMechanical.java b/mechanical/src/main/scala/resonantinduction/mechanical/MultipartMechanical.java index cad43fd8b..5045c74f1 100644 --- a/mechanical/src/main/scala/resonantinduction/mechanical/MultipartMechanical.java +++ b/mechanical/src/main/scala/resonantinduction/mechanical/MultipartMechanical.java @@ -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 diff --git a/mechanical/src/main/scala/resonantinduction/mechanical/energy/gearshaft/GearShaftNode.java b/mechanical/src/main/scala/resonantinduction/mechanical/energy/gearshaft/GearShaftNode.java index baf2c8435..43294cc56 100644 --- a/mechanical/src/main/scala/resonantinduction/mechanical/energy/gearshaft/GearShaftNode.java +++ b/mechanical/src/main/scala/resonantinduction/mechanical/energy/gearshaft/GearShaftNode.java @@ -49,17 +49,20 @@ public class GearShaftNode extends MechanicalNode dirs.add(shaft().placementSide.getOpposite()); /** Check for internal connections, the FRONT and BACK. */ Iterator it = dirs.iterator(); - while(it.hasNext()) + while (it.hasNext()) { ForgeDirection checkDir = it.next(); if (checkDir == shaft().placementSide || checkDir == shaft().placementSide.getOpposite()) { - MechanicalNode instance = ((INodeProvider) shaft().tile()).getNode(MechanicalNode.class, checkDir); - - if (instance != null && instance != this && instance.canConnect(checkDir.getOpposite(), this)) + if (shaft().tile() instanceof INodeProvider) { - connections.put(instance, checkDir); - it.remove(); + MechanicalNode instance = ((INodeProvider) shaft().tile()).getNode(MechanicalNode.class, checkDir); + + if (instance != null && instance != this && instance.canConnect(checkDir.getOpposite(), this)) + { + connections.put(instance, checkDir); + it.remove(); + } } } }