Cache Part Constructor.

This commit is contained in:
AlgorithmX2
2014-08-28 03:37:43 -05:00
parent 16c7369589
commit cdaac3baa0
2 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -191,7 +191,12 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
{
PartType t = getTypeByStack( is );
if ( t != null )
return t.getPart().getConstructor( ItemStack.class ).newInstance( is );
{
if ( t.constructor == null )
t.constructor = t.getPart().getConstructor( ItemStack.class );
return t.constructor.newInstance( is );
}
}
catch (Throwable e)
{