2013-12-27 23:59:59 +01:00
|
|
|
package appeng.items;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import appeng.core.features.AEFeature;
|
|
|
|
import appeng.core.features.AEFeatureHandler;
|
|
|
|
import appeng.core.features.IAEFeature;
|
|
|
|
|
|
|
|
public class AEBaseItem extends Item implements IAEFeature
|
|
|
|
{
|
|
|
|
|
|
|
|
String FeatureFullname;
|
|
|
|
String FeatureSubname;
|
|
|
|
AEFeatureHandler feature;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString()
|
|
|
|
{
|
|
|
|
return FeatureFullname;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public AEFeatureHandler feature()
|
|
|
|
{
|
|
|
|
return feature;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setfeature(EnumSet<AEFeature> f)
|
|
|
|
{
|
|
|
|
feature = new AEFeatureHandler( f, this, FeatureSubname );
|
|
|
|
}
|
|
|
|
|
|
|
|
public AEBaseItem(Class c) {
|
|
|
|
this( c, null );
|
2014-02-05 04:17:35 +01:00
|
|
|
canRepair = false;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public AEBaseItem(Class c, String subname) {
|
|
|
|
FeatureSubname = subname;
|
|
|
|
FeatureFullname = AEFeatureHandler.getName( c, subname );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-01-30 03:47:55 +01:00
|
|
|
@Override
|
|
|
|
public void postInit()
|
|
|
|
{
|
|
|
|
// override!
|
|
|
|
}
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|