Recipe Engine Added, not quite done yet tho.
This commit is contained in:
@@ -36,10 +36,13 @@ public class ItemMaterial extends AEBaseItem implements IStorageComponent, IUpgr
|
||||
|
||||
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap();
|
||||
|
||||
public static ItemMaterial instance;
|
||||
|
||||
public ItemMaterial() {
|
||||
super( ItemMaterial.class );
|
||||
setfeature( EnumSet.of( AEFeature.Core ) );
|
||||
setHasSubtypes( true );
|
||||
instance = this;
|
||||
}
|
||||
|
||||
class SlightlyBetterSort implements Comparator<String>
|
||||
|
||||
@@ -41,11 +41,14 @@ public class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
|
||||
HashMap<Integer, PartTypeIst> dmgToPart = new HashMap();
|
||||
|
||||
public static ItemPart instance;
|
||||
|
||||
public ItemPart() {
|
||||
super( ItemPart.class );
|
||||
setfeature( EnumSet.of( AEFeature.Core ) );
|
||||
AEApi.instance().partHelper().setItemBusRenderer( this );
|
||||
setHasSubtypes( true );
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public ItemStackSrc createPart(PartType mat, Enum varient)
|
||||
@@ -91,6 +94,16 @@ public class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getDamageByType(PartType t)
|
||||
{
|
||||
for (Entry<Integer, PartTypeIst> pt : dmgToPart.entrySet())
|
||||
{
|
||||
if ( pt.getValue().part == t )
|
||||
return pt.getKey();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public PartType getTypeByStack(ItemStack is)
|
||||
{
|
||||
if ( is == null )
|
||||
|
||||
Reference in New Issue
Block a user