Fixes #675 No disabled feature should log spam or crash anymore.

Deprecates the old usage of the AEItemDefinitions via the direct method access of

* blocks()
* parts()
* items()
* materials()

and thus use the new re-direct via definitions().

All definitions are now initialized, no matter what. But SubItems, Items and Blocks are not registered, if by chance are disabled.
This commit is contained in:
thatsIch
2015-01-03 02:53:14 +01:00
parent 3dd81433ac
commit 9986ffc458
385 changed files with 12477 additions and 8292 deletions
@@ -40,6 +40,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.config.FuzzyMode;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IAETagCompound;
import appeng.util.Platform;
@@ -113,13 +114,14 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
this.def.isOre = OreHelper.INSTANCE.isOre( is );
}
public static AEItemStack create(Object a)
public static AEItemStack create( ItemStack stack )
{
if ( a instanceof ItemStack )
return new AEItemStack( (ItemStack) a );
if ( a instanceof IAEItemStack )
((IAEItemStack) a).copy();
return null;
return new AEItemStack( stack );
}
public static IAEStack<IAEItemStack> create( IAEStack<IAEItemStack> stack )
{
return stack.copy();
}
@Override