Fixed Bug: #0754 - Facade crash ( probably )

This commit is contained in:
AlgorithmX2 2014-08-08 01:42:23 -05:00
parent 2c2f880783
commit 5a14cf563c

View file

@ -30,6 +30,14 @@ public class FMPPlacementHelper implements IPartHost
private CableBusPart getPart()
{
scala.collection.Iterator<TMultiPart> i = myMP.partList().iterator();
while (i.hasNext())
{
TMultiPart p = i.next();
if ( p instanceof CableBusPart )
myPart = (CableBusPart) p;
}
if ( myPart == null )
myPart = (CableBusPart) PartRegistry.CableBusPart.construct( 0 );
@ -37,7 +45,7 @@ public class FMPPlacementHelper implements IPartHost
if ( myMP.canAddPart( myPart ) && Platform.isServer() )
{
TileMultipart.addPart( myMP.getWorldObj(), loc, myPart );
myMP = TileMultipart.addPart( myMP.getWorldObj(), loc, myPart );
hasPart = true;
}
@ -54,7 +62,7 @@ public class FMPPlacementHelper implements IPartHost
TMultiPart p = i.next();
if ( p == myPart )
{
myMP.remPart( myPart );
myMP = myMP.remPart( myPart );
break;
}
}