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
@@ -23,20 +23,22 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
import appeng.api.storage.data.IAEItemStack;
/**
* Any item which implements this can be treated as an IMEInventory via
* Util.getCell / Util.isCell It automatically handles the internals and NBT
* data, which is both nice, and bad for you!
*
*
* Good cause it means you don't have to do anything, bad because you have
* little to no control over it.
*
*
* The standard AE implementation only provides 1-63 Types
*
*/
public interface IStorageCell extends ICellWorkbenchItem
{
@@ -46,37 +48,41 @@ public interface IStorageCell extends ICellWorkbenchItem
* The limit is ({@link Integer#MAX_VALUE} + 1) / 8.
*
* @param cellItem item
*
* @return number of bytes
*/
int getBytes(ItemStack cellItem);
int getBytes( ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem item
*
* @return number of bytes
*/
int BytePerType(ItemStack cellItem);
int BytePerType( ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
* the item.
*
* @param cellItem item
*
* @return number of types
*/
int getTotalTypes(ItemStack cellItem);
int getTotalTypes( ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
* don't care, just return false; As the handler for this type of cell is
* still the default cells, the normal AE black list is also applied.
*
*
* @param cellItem item
* @param requestedAddition requested addition
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed(ItemStack cellItem, IAEItemStack requestedAddition);
boolean isBlackListed( ItemStack cellItem, IAEItemStack requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
@@ -84,8 +90,8 @@ public interface IStorageCell extends ICellWorkbenchItem
* that are not general purpose storage.
*
* @return true if the storage cell can be stored inside other storage
* cells, this is generally false, except for certain situations
* such as the matter cannon.
* cells, this is generally false, except for certain situations
* such as the matter cannon.
*/
boolean storableInStorageCell();
@@ -94,9 +100,10 @@ public interface IStorageCell extends ICellWorkbenchItem
* cell.
*
* @param i item
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell(ItemStack i);
boolean isStorageCell( ItemStack i );
/**
* @return drain in ae/t this storage cell will use.