From 00ab7e912b336ee0fe5b9c03cde982294b180d33 Mon Sep 17 00:00:00 2001 From: Robert S Date: Fri, 19 Sep 2014 16:23:00 -0400 Subject: [PATCH] Attempt to fix multipart placement issue --- .../resonantinduction/core/ResonantPartFactory.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/scala/resonantinduction/core/ResonantPartFactory.scala b/src/main/scala/resonantinduction/core/ResonantPartFactory.scala index c900a2386..1dd09c88f 100644 --- a/src/main/scala/resonantinduction/core/ResonantPartFactory.scala +++ b/src/main/scala/resonantinduction/core/ResonantPartFactory.scala @@ -27,5 +27,11 @@ object ResonantPartFactory extends IPartFactory MultipartGenerator.registerTrait("universalelectricity.api.core.grid.INodeProvider", "resonantinduction.core.prefab.TNodeProvider") } - def createPart(name: String, client: Boolean): TMultiPart = partMap(name).newInstance() + def createPart(name: String, client: Boolean): TMultiPart = + { + if(partMap.contains(name)) + return partMap(name).newInstance() + else + return null + } }