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:
parent
3dd81433ac
commit
9986ffc458
385 changed files with 12477 additions and 8292 deletions
|
@ -23,39 +23,46 @@
|
|||
|
||||
package appeng.api;
|
||||
|
||||
|
||||
import appeng.api.exceptions.CouldNotAccessCoreAPI;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Entry point for api.
|
||||
*
|
||||
* Available IMCs:
|
||||
*
|
||||
*/
|
||||
public class AEApi
|
||||
public enum AEApi
|
||||
{
|
||||
;
|
||||
private static final String CORE_API_PATH = "appeng.core.Api";
|
||||
private static final String API_INSTANCE_NAME = "INSTANCE";
|
||||
|
||||
static private IAppEngApi api = null;
|
||||
private static IAppEngApi instance = null;
|
||||
|
||||
/**
|
||||
* API Entry Point.
|
||||
*
|
||||
* @return the {@link IAppEngApi} or null if the INSTANCE could not be retrieved
|
||||
* @return the {@link IAppEngApi}
|
||||
*
|
||||
* @throws CouldNotAccessCoreAPI if the INSTANCE could not be retrieved
|
||||
*/
|
||||
public static IAppEngApi instance()
|
||||
|
||||
{
|
||||
if ( api == null )
|
||||
if ( instance == null )
|
||||
{
|
||||
try
|
||||
{
|
||||
Class c = Class.forName( "appeng.core.Api" );
|
||||
api = (IAppEngApi) c.getField( "INSTANCE" ).get( c );
|
||||
Class<?> c = Class.forName( CORE_API_PATH );
|
||||
instance = (IAppEngApi) c.getField( API_INSTANCE_NAME ).get( c );
|
||||
}
|
||||
catch (Throwable e)
|
||||
catch ( Throwable e )
|
||||
{
|
||||
return null;
|
||||
throw new CouldNotAccessCoreAPI( "Either core API was not in " + CORE_API_PATH + " or " + API_INSTANCE_NAME + " was not accessible" );
|
||||
}
|
||||
}
|
||||
|
||||
return api;
|
||||
return instance;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
|
||||
package appeng.api;
|
||||
|
||||
|
||||
import appeng.api.definitions.Blocks;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
import appeng.api.definitions.Items;
|
||||
import appeng.api.definitions.Materials;
|
||||
import appeng.api.definitions.Parts;
|
||||
|
@ -31,11 +33,11 @@ import appeng.api.exceptions.FailedConnection;
|
|||
import appeng.api.features.IRegistryContainer;
|
||||
import appeng.api.networking.IGridBlock;
|
||||
import appeng.api.networking.IGridConnection;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.parts.IPartHelper;
|
||||
import appeng.api.storage.IStorageHelper;
|
||||
|
||||
|
||||
public interface IAppEngApi
|
||||
{
|
||||
|
||||
|
@ -56,39 +58,57 @@ public interface IAppEngApi
|
|||
|
||||
/**
|
||||
* @return an accessible list of all of AE's Items
|
||||
*
|
||||
* @deprecated use {@link appeng.api.definitions.IDefinitions#items()}
|
||||
*/
|
||||
@Deprecated
|
||||
Items items();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's materials; materials are items
|
||||
*
|
||||
* @deprecated use {@link appeng.api.definitions.IDefinitions#materials()}
|
||||
*/
|
||||
@Deprecated
|
||||
Materials materials();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's blocks
|
||||
*
|
||||
* @deprecated use {@link appeng.api.definitions.IDefinitions#blocks()}
|
||||
*/
|
||||
@Deprecated
|
||||
Blocks blocks();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's parts, parts are items
|
||||
*
|
||||
* @deprecated use {@link appeng.api.definitions.IDefinitions#parts()}
|
||||
*/
|
||||
@Deprecated
|
||||
Parts parts();
|
||||
|
||||
/**
|
||||
* create a grid node for your {@link IGridHost}
|
||||
*
|
||||
* @param block grid block
|
||||
* @return grid node of block
|
||||
* @return an accessible list of all AE definitions
|
||||
*/
|
||||
IGridNode createGridNode(IGridBlock block);
|
||||
IDefinitions definitions();
|
||||
|
||||
/**
|
||||
* create a connection between two {@link IGridNode}
|
||||
* create a grid node for your {@link appeng.api.networking.IGridHost}
|
||||
*
|
||||
* @param block grid block
|
||||
*
|
||||
* @return grid node of block
|
||||
*/
|
||||
IGridNode createGridNode( IGridBlock block );
|
||||
|
||||
/**
|
||||
* create a connection between two {@link appeng.api.networking.IGridNode}
|
||||
*
|
||||
* @param a to be connected gridnode
|
||||
* @param b to be connected gridnode
|
||||
* @throws FailedConnection
|
||||
*
|
||||
* @throws appeng.api.exceptions.FailedConnection
|
||||
*/
|
||||
IGridConnection createGridConnection(IGridNode a, IGridNode b) throws FailedConnection;
|
||||
|
||||
IGridConnection createGridConnection( IGridNode a, IGridNode b ) throws FailedConnection;
|
||||
}
|
|
@ -23,9 +23,10 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum AccessRestriction
|
||||
{
|
||||
NO_ACCESS(0), READ(1), WRITE(2), READ_WRITE(3);
|
||||
NO_ACCESS( 0 ), READ( 1 ), WRITE( 2 ), READ_WRITE( 3 );
|
||||
|
||||
private final int permissionBit;
|
||||
|
||||
|
@ -33,39 +34,39 @@ public enum AccessRestriction
|
|||
this.permissionBit = v;
|
||||
}
|
||||
|
||||
public boolean hasPermission(AccessRestriction ar)
|
||||
public boolean hasPermission( AccessRestriction ar )
|
||||
{
|
||||
return ( this.permissionBit & ar.permissionBit) == ar.permissionBit;
|
||||
return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit;
|
||||
}
|
||||
|
||||
public AccessRestriction restrictPermissions(AccessRestriction ar)
|
||||
public AccessRestriction restrictPermissions( AccessRestriction ar )
|
||||
{
|
||||
return this.getPermByBit( this.permissionBit & ar.permissionBit);
|
||||
return this.getPermByBit( this.permissionBit & ar.permissionBit );
|
||||
}
|
||||
|
||||
public AccessRestriction addPermissions(AccessRestriction ar)
|
||||
public AccessRestriction addPermissions( AccessRestriction ar )
|
||||
{
|
||||
return this.getPermByBit( this.permissionBit | ar.permissionBit);
|
||||
return this.getPermByBit( this.permissionBit | ar.permissionBit );
|
||||
}
|
||||
|
||||
public AccessRestriction removePermissions(AccessRestriction ar)
|
||||
public AccessRestriction removePermissions( AccessRestriction ar )
|
||||
{
|
||||
return this.getPermByBit( this.permissionBit & (~ar.permissionBit) );
|
||||
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
|
||||
}
|
||||
|
||||
private AccessRestriction getPermByBit(int bit)
|
||||
private AccessRestriction getPermByBit( int bit )
|
||||
{
|
||||
switch (bit)
|
||||
switch ( bit )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
return NO_ACCESS;
|
||||
case 1:
|
||||
return READ;
|
||||
case 2:
|
||||
return WRITE;
|
||||
case 3:
|
||||
return READ_WRITE;
|
||||
default:
|
||||
case 0:
|
||||
return NO_ACCESS;
|
||||
case 1:
|
||||
return READ;
|
||||
case 2:
|
||||
return WRITE;
|
||||
case 3:
|
||||
return READ_WRITE;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum ActionItems
|
||||
{
|
||||
WRENCH, CLOSE, STASH, ENCODE, SUBSTITUTION
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum Actionable
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum CopyMode
|
||||
{
|
||||
CLEAR_ON_REMOVE, KEEP_ON_REMOVE
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum FullnessMode
|
||||
{
|
||||
EMPTY, HALF, FULL
|
||||
|
|
|
@ -23,10 +23,11 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum FuzzyMode
|
||||
{
|
||||
// Note that percentage damaged, is the inverse of percentage durability.
|
||||
IGNORE_ALL(-1), PERCENT_99(0), PERCENT_75(25), PERCENT_50(50), PERCENT_25(75);
|
||||
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
|
||||
|
||||
final public float breakPoint;
|
||||
final public float percentage;
|
||||
|
@ -36,9 +37,9 @@ public enum FuzzyMode
|
|||
this.breakPoint = p / 100.0f;
|
||||
}
|
||||
|
||||
public int calculateBreakPoint(int maxDamage)
|
||||
public int calculateBreakPoint( int maxDamage )
|
||||
{
|
||||
return (int) (( this.percentage * maxDamage) / 100.0f);
|
||||
return (int) ( ( this.percentage * maxDamage ) / 100.0f );
|
||||
}
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum IncludeExclude
|
||||
{
|
||||
WHITELIST, BLACKLIST
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum LevelEmitterMode
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum LevelType
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum ModSettings
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum NetworkEmitterMode
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum OperationMode
|
||||
{
|
||||
FILL, EMPTY
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum OutputMode
|
||||
{
|
||||
EXPORT_ONLY, EXPORT_OR_CRAFT, CRAFT_ONLY
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum PowerMultiplier
|
||||
{
|
||||
ONE, CONFIG;
|
||||
|
@ -32,12 +33,12 @@ public enum PowerMultiplier
|
|||
*/
|
||||
public double multiplier = 1.0;
|
||||
|
||||
public double multiply(double in)
|
||||
public double multiply( double in )
|
||||
{
|
||||
return in * this.multiplier;
|
||||
}
|
||||
|
||||
public double divide(double in)
|
||||
public double divide( double in )
|
||||
{
|
||||
return in / this.multiplier;
|
||||
}
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum PowerUnits
|
||||
{
|
||||
AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy
|
||||
MJ("gui.appliedenergistics2.units.buildcraft"), // BuildCraft - Minecraft Joules
|
||||
EU("gui.appliedenergistics2.units.ic2"), // IndustrialCraft 2 - Energy Units
|
||||
WA("gui.appliedenergistics2.units.rotarycraft"), // RotaryCraft - Watts
|
||||
RF("gui.appliedenergistics2.units.thermalexpansion"), // ThermalExpansion - Redstone Flux
|
||||
MK("gui.appliedenergistics2.units.mekanism"); // Mekanism - Joules
|
||||
AE( "gui.appliedenergistics2.units.appliedenergstics" ), // Native Units - AE Energy
|
||||
EU( "gui.appliedenergistics2.units.ic2" ), // IndustrialCraft 2 - Energy Units
|
||||
WA( "gui.appliedenergistics2.units.rotarycraft" ), // RotaryCraft - Watts
|
||||
RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux
|
||||
MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules
|
||||
|
||||
PowerUnits( String un ) {
|
||||
this.unlocalizedName = un;
|
||||
|
@ -54,12 +54,13 @@ public enum PowerUnits
|
|||
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
|
||||
*
|
||||
* @param target target power unit
|
||||
* @param value value
|
||||
* @param value value
|
||||
*
|
||||
* @return value converted to target units, from this units.
|
||||
*/
|
||||
public double convertTo(PowerUnits target, double value)
|
||||
public double convertTo( PowerUnits target, double value )
|
||||
{
|
||||
return (value * this.conversionRatio ) / target.conversionRatio;
|
||||
return ( value * this.conversionRatio ) / target.conversionRatio;
|
||||
}
|
||||
|
||||
}
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum RedstoneMode
|
||||
{
|
||||
IGNORE, LOW_SIGNAL, HIGH_SIGNAL, SIGNAL_PULSE
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum RelativeDirection
|
||||
{
|
||||
LEFT, RIGHT, UP, DOW
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum SearchBoxMode
|
||||
{
|
||||
AUTOSEARCH, MANUAL_SEARCH, NEI_AUTOSEARCH, NEI_MANUAL_SEARCH
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
/**
|
||||
* Represent the security systems basic permissions, these are not for anti-griefing, they are part of the mod as a
|
||||
* gameplay feature.
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum SortDir
|
||||
{
|
||||
ASCENDING, DESCENDING
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum SortOrder
|
||||
{
|
||||
NAME, AMOUNT, MOD, INVTWEAKS
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum StorageFilter
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum TerminalStyle
|
||||
{
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum TunnelType
|
||||
{
|
||||
ME, // Network Tunnel
|
||||
BC_POWER, // MJ Tunnel
|
||||
IC2_POWER, // EU Tunnel
|
||||
RF_POWER, // RF Tunnel
|
||||
REDSTONE, // Redstone Tunnel
|
||||
|
|
|
@ -25,9 +25,13 @@ package appeng.api.config;
|
|||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.util.AEItemDefinition;
|
||||
|
||||
|
||||
|
@ -43,34 +47,74 @@ public enum Upgrades
|
|||
*/
|
||||
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
|
||||
|
||||
public final int myTier;
|
||||
public final HashMap<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
|
||||
/**
|
||||
* @deprecated use {@link Upgrades#getTier()}
|
||||
*/
|
||||
@Deprecated
|
||||
public final int tier;
|
||||
|
||||
/**
|
||||
* @deprecated use {@link Upgrades#getSupported()}
|
||||
*/
|
||||
@Deprecated
|
||||
private final Map<ItemStack, Integer> supportedMax = new HashMap<ItemStack, Integer>();
|
||||
|
||||
Upgrades( int tier )
|
||||
{
|
||||
this.myTier = tier;
|
||||
this.tier = tier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list of Items/Blocks that support this upgrade, and how many it supports.
|
||||
*/
|
||||
public HashMap<ItemStack, Integer> getSupported()
|
||||
public Map<ItemStack, Integer> getSupported()
|
||||
{
|
||||
return this.supportedMax;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void registerItem( AEItemDefinition myItem, int maxSupported )
|
||||
/**
|
||||
* Registers a specific amount of this upgrade into a specific machine
|
||||
*
|
||||
* @param item machine in which this upgrade can be installed
|
||||
* @param maxSupported amount how many upgrades can be installed
|
||||
*/
|
||||
public void registerItem( IItemDefinition item, int maxSupported )
|
||||
{
|
||||
if ( myItem != null )
|
||||
final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
|
||||
for ( ItemStack stack : maybeStack.asSet() )
|
||||
{
|
||||
final ItemStack stack = myItem.stack( 1 );
|
||||
|
||||
this.registerItem( stack, maxSupported );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a specific amount of this upgrade into a specific machine
|
||||
*
|
||||
* @param item machine in which this upgrade can be installed
|
||||
* @param maxSupported amount how many upgrades can be installed
|
||||
*
|
||||
* @deprecated use {@link Upgrades#registerItem(IItemDefinition, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void registerItem( AEItemDefinition item, int maxSupported )
|
||||
{
|
||||
if ( item != null )
|
||||
{
|
||||
final ItemStack stack = item.stack( 1 );
|
||||
|
||||
if ( stack != null )
|
||||
{
|
||||
this.registerItem( stack, maxSupported );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a specific amount of this upgrade into a specific machine
|
||||
*
|
||||
* @param stack machine in which this upgrade can be installed
|
||||
* @param maxSupported amount how many upgrades can be installed
|
||||
*/
|
||||
public void registerItem( ItemStack stack, int maxSupported )
|
||||
{
|
||||
if ( stack != null )
|
||||
|
@ -78,4 +122,9 @@ public enum Upgrades
|
|||
this.supportedMax.put( stack, maxSupported );
|
||||
}
|
||||
}
|
||||
|
||||
public int getTier()
|
||||
{
|
||||
return this.tier;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum ViewItems
|
||||
{
|
||||
ALL, STORED, CRAFTABLE
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum YesNo
|
||||
{
|
||||
YES, NO, UNDECIDED
|
||||
|
|
|
@ -23,90 +23,109 @@
|
|||
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated use {@link IBlocks} now
|
||||
*/
|
||||
@Deprecated
|
||||
public class Blocks
|
||||
{
|
||||
|
||||
/*
|
||||
* World Gen
|
||||
*/
|
||||
public AEItemDefinition blockQuartzOre;
|
||||
|
||||
public AEItemDefinition blockQuartzOreCharged;
|
||||
|
||||
public AEItemDefinition blockMatrixFrame;
|
||||
|
||||
/*
|
||||
* Decorative
|
||||
*/
|
||||
public AEItemDefinition blockQuartz;
|
||||
|
||||
public AEItemDefinition blockQuartzPillar;
|
||||
|
||||
public AEItemDefinition blockQuartzChiseled;
|
||||
|
||||
public AEItemDefinition blockQuartzGlass;
|
||||
|
||||
public AEItemDefinition blockQuartzVibrantGlass;
|
||||
|
||||
public AEItemDefinition blockQuartzTorch;
|
||||
|
||||
public AEItemDefinition blockFluix;
|
||||
|
||||
public AEItemDefinition blockSkyStone;
|
||||
|
||||
public AEItemDefinition blockSkyChest;
|
||||
|
||||
public AEItemDefinition blockSkyCompass;
|
||||
|
||||
/*
|
||||
* Misc
|
||||
*/
|
||||
public AEItemDefinition blockGrindStone;
|
||||
|
||||
public AEItemDefinition blockCrankHandle;
|
||||
|
||||
public AEItemDefinition blockInscriber;
|
||||
|
||||
public AEItemDefinition blockWireless;
|
||||
|
||||
public AEItemDefinition blockCharger;
|
||||
|
||||
public AEItemDefinition blockTinyTNT;
|
||||
|
||||
public AEItemDefinition blockSecurity;
|
||||
|
||||
/*
|
||||
* Quantum Network Bridge
|
||||
*/
|
||||
public AEItemDefinition blockQuantumRing;
|
||||
|
||||
public AEItemDefinition blockQuantumLink;
|
||||
|
||||
/*
|
||||
* Spatial IO
|
||||
*/
|
||||
public AEItemDefinition blockSpatialPylon;
|
||||
|
||||
public AEItemDefinition blockSpatialIOPort;
|
||||
|
||||
/*
|
||||
* Bus / Cables
|
||||
*/
|
||||
public AEItemDefinition blockMultiPart;
|
||||
|
||||
/*
|
||||
* Machines
|
||||
*/
|
||||
public AEItemDefinition blockController;
|
||||
|
||||
public AEItemDefinition blockDrive;
|
||||
|
||||
public AEItemDefinition blockChest;
|
||||
|
||||
public AEItemDefinition blockInterface;
|
||||
|
||||
public AEItemDefinition blockCellWorkbench;
|
||||
|
||||
public AEItemDefinition blockIOPort;
|
||||
|
||||
public AEItemDefinition blockCondenser;
|
||||
|
||||
public AEItemDefinition blockEnergyAcceptor;
|
||||
|
||||
public AEItemDefinition blockVibrationChamber;
|
||||
|
||||
public AEItemDefinition blockQuartzGrowthAccelerator;
|
||||
|
||||
public AEItemDefinition blockEnergyCell;
|
||||
|
||||
public AEItemDefinition blockEnergyCellDense;
|
||||
|
||||
public AEItemDefinition blockEnergyCellCreative;
|
||||
|
||||
// rv1
|
||||
public AEItemDefinition blockCraftingUnit;
|
||||
|
||||
public AEItemDefinition blockCraftingAccelerator;
|
||||
|
||||
public AEItemDefinition blockCraftingStorage1k;
|
||||
|
||||
public AEItemDefinition blockCraftingStorage4k;
|
||||
|
||||
public AEItemDefinition blockCraftingStorage16k;
|
||||
|
||||
public AEItemDefinition blockCraftingStorage64k;
|
||||
|
||||
public AEItemDefinition blockCraftingMonitor;
|
||||
|
||||
public AEItemDefinition blockMolecularAssembler;
|
||||
|
||||
public AEItemDefinition blockLightDetector;
|
||||
public AEItemDefinition blockPaint;
|
||||
|
||||
public AEItemDefinition blockPaint;
|
||||
}
|
||||
|
|
21
src/api/java/appeng/api/definitions/IBlockDefinition.java
Normal file
21
src/api/java/appeng/api/definitions/IBlockDefinition.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public interface IBlockDefinition extends IItemDefinition
|
||||
{
|
||||
/**
|
||||
* @return the {@link Block} implementation if applicable
|
||||
*/
|
||||
Optional<Block> maybeBlock();
|
||||
|
||||
/**
|
||||
* @return the {@link ItemBlock} implementation if applicable
|
||||
*/
|
||||
Optional<ItemBlock> maybeItemBlock();
|
||||
}
|
164
src/api/java/appeng/api/definitions/IBlocks.java
Normal file
164
src/api/java/appeng/api/definitions/IBlocks.java
Normal file
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
/**
|
||||
* A list of all blocks in AE
|
||||
*/
|
||||
public interface IBlocks
|
||||
{
|
||||
/*
|
||||
* world gen
|
||||
*/
|
||||
IBlockDefinition quartzOre();
|
||||
|
||||
IBlockDefinition quartzOreCharged();
|
||||
|
||||
IBlockDefinition matrixFrame();
|
||||
|
||||
/*
|
||||
* decorative
|
||||
*/
|
||||
IBlockDefinition quartz();
|
||||
|
||||
IBlockDefinition quartzPillar();
|
||||
|
||||
IBlockDefinition quartzChiseled();
|
||||
|
||||
IBlockDefinition quartzGlass();
|
||||
|
||||
IBlockDefinition quartzVibrantGlass();
|
||||
|
||||
IBlockDefinition quartzTorch();
|
||||
|
||||
IBlockDefinition fluix();
|
||||
|
||||
IBlockDefinition skyStone();
|
||||
|
||||
IBlockDefinition skyChest();
|
||||
|
||||
IBlockDefinition skyCompass();
|
||||
|
||||
IBlockDefinition skyStoneStair();
|
||||
|
||||
IBlockDefinition skyStoneBlockStair();
|
||||
|
||||
IBlockDefinition skyStoneBrickStair();
|
||||
|
||||
IBlockDefinition skyStoneSmallBrickStair();
|
||||
|
||||
IBlockDefinition fluixStair();
|
||||
|
||||
IBlockDefinition quartzStair();
|
||||
|
||||
IBlockDefinition chiseledQuartzStair();
|
||||
|
||||
IBlockDefinition quartzPillarStair();
|
||||
|
||||
/*
|
||||
* misc
|
||||
*/
|
||||
ITileDefinition grindStone();
|
||||
|
||||
ITileDefinition crankHandle();
|
||||
|
||||
ITileDefinition inscriber();
|
||||
|
||||
ITileDefinition wireless();
|
||||
|
||||
ITileDefinition charger();
|
||||
|
||||
ITileDefinition tinyTNT();
|
||||
|
||||
ITileDefinition security();
|
||||
|
||||
/*
|
||||
* quantum Network Bridge
|
||||
*/
|
||||
ITileDefinition quantumRing();
|
||||
|
||||
ITileDefinition quantumLink();
|
||||
|
||||
/*
|
||||
* spatial iO
|
||||
*/
|
||||
ITileDefinition spatialPylon();
|
||||
|
||||
ITileDefinition spatialIOPort();
|
||||
|
||||
/*
|
||||
* Bus / cables
|
||||
*/
|
||||
ITileDefinition multiPart();
|
||||
|
||||
/*
|
||||
* machines
|
||||
*/
|
||||
ITileDefinition controller();
|
||||
|
||||
ITileDefinition drive();
|
||||
|
||||
ITileDefinition chest();
|
||||
|
||||
ITileDefinition iface();
|
||||
|
||||
ITileDefinition cellWorkbench();
|
||||
|
||||
ITileDefinition iOPort();
|
||||
|
||||
ITileDefinition condenser();
|
||||
|
||||
ITileDefinition energyAcceptor();
|
||||
|
||||
ITileDefinition vibrationChamber();
|
||||
|
||||
ITileDefinition quartzGrowthAccelerator();
|
||||
|
||||
ITileDefinition energyCell();
|
||||
|
||||
ITileDefinition energyCellDense();
|
||||
|
||||
ITileDefinition energyCellCreative();
|
||||
|
||||
// rv1
|
||||
ITileDefinition craftingUnit();
|
||||
|
||||
ITileDefinition craftingAccelerator();
|
||||
|
||||
ITileDefinition craftingStorage1k();
|
||||
|
||||
ITileDefinition craftingStorage4k();
|
||||
|
||||
ITileDefinition craftingStorage16k();
|
||||
|
||||
ITileDefinition craftingStorage64k();
|
||||
|
||||
ITileDefinition craftingMonitor();
|
||||
|
||||
ITileDefinition molecularAssembler();
|
||||
|
||||
ITileDefinition lightDetector();
|
||||
|
||||
ITileDefinition paint();
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
|
||||
/**
|
||||
* Interface to compare a definition with an itemstack or a block
|
||||
*/
|
||||
public interface IComparableDefinition
|
||||
{
|
||||
/**
|
||||
* Compare {@link ItemStack} with this
|
||||
*
|
||||
* @param comparableStack compared item
|
||||
* @return true if the item stack is a matching item.
|
||||
*/
|
||||
boolean isSameAs( ItemStack comparableStack );
|
||||
|
||||
/**
|
||||
* Compare Block with world.
|
||||
*
|
||||
* @param world world of block
|
||||
* @param x x pos of block
|
||||
* @param y y pos of block
|
||||
* @param z z pos of block
|
||||
*
|
||||
* @return if the block is placed in the world at the specific location.
|
||||
*/
|
||||
boolean isSameAs( IBlockAccess world, int x, int y, int z );
|
||||
}
|
50
src/api/java/appeng/api/definitions/IDefinitions.java
Normal file
50
src/api/java/appeng/api/definitions/IDefinitions.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
/**
|
||||
* All definitions in AE
|
||||
*/
|
||||
public interface IDefinitions
|
||||
{
|
||||
/**
|
||||
* @return an accessible list of all of AE's blocks
|
||||
*/
|
||||
IBlocks blocks();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's Items
|
||||
*/
|
||||
IItems items();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's materials; materials are items
|
||||
*/
|
||||
IMaterials materials();
|
||||
|
||||
/**
|
||||
* @return an accessible list of all of AE's parts, parts are items
|
||||
*/
|
||||
IParts parts();
|
||||
}
|
21
src/api/java/appeng/api/definitions/IItemDefinition.java
Normal file
21
src/api/java/appeng/api/definitions/IItemDefinition.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public interface IItemDefinition extends IComparableDefinition
|
||||
{
|
||||
/**
|
||||
* @return the {@link Item} Implementation if applicable
|
||||
*/
|
||||
Optional<Item> maybeItem();
|
||||
|
||||
/**
|
||||
* @return an {@link ItemStack} with specified quantity of this item.
|
||||
*/
|
||||
Optional<ItemStack> maybeStack(int stackSize);
|
||||
}
|
108
src/api/java/appeng/api/definitions/IItems.java
Normal file
108
src/api/java/appeng/api/definitions/IItems.java
Normal file
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEColoredItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* A list of all items in AE
|
||||
*/
|
||||
public interface IItems
|
||||
{
|
||||
IItemDefinition certusQuartzAxe();
|
||||
|
||||
IItemDefinition certusQuartzHoe();
|
||||
|
||||
IItemDefinition certusQuartzShovel();
|
||||
|
||||
IItemDefinition certusQuartzPick();
|
||||
|
||||
IItemDefinition certusQuartzSword();
|
||||
|
||||
IItemDefinition certusQuartzWrench();
|
||||
|
||||
IItemDefinition certusQuartzKnife();
|
||||
|
||||
IItemDefinition netherQuartzAxe();
|
||||
|
||||
IItemDefinition netherQuartzHoe();
|
||||
|
||||
IItemDefinition netherQuartzShovel();
|
||||
|
||||
IItemDefinition netherQuartzPick();
|
||||
|
||||
IItemDefinition netherQuartzSword();
|
||||
|
||||
IItemDefinition netherQuartzWrench();
|
||||
|
||||
IItemDefinition netherQuartzKnife();
|
||||
|
||||
IItemDefinition entropyManipulator();
|
||||
|
||||
IItemDefinition wirelessTerminal();
|
||||
|
||||
IItemDefinition biometricCard();
|
||||
|
||||
IItemDefinition chargedStaff();
|
||||
|
||||
IItemDefinition massCannon();
|
||||
|
||||
IItemDefinition memoryCard();
|
||||
|
||||
IItemDefinition networkTool();
|
||||
|
||||
IItemDefinition portableCell();
|
||||
|
||||
IItemDefinition cellCreative();
|
||||
|
||||
IItemDefinition viewCell();
|
||||
|
||||
IItemDefinition cell1k();
|
||||
|
||||
IItemDefinition cell4k();
|
||||
|
||||
IItemDefinition cell16k();
|
||||
|
||||
IItemDefinition cell64k();
|
||||
|
||||
IItemDefinition spatialCell2();
|
||||
|
||||
IItemDefinition spatialCell16();
|
||||
|
||||
IItemDefinition spatialCell128();
|
||||
|
||||
IItemDefinition facade();
|
||||
|
||||
IItemDefinition crystalSeed();
|
||||
|
||||
// rv1
|
||||
IItemDefinition encodedPattern();
|
||||
|
||||
IItemDefinition colorApplicator();
|
||||
|
||||
AEColoredItemDefinition coloredPaintBall();
|
||||
|
||||
AEColoredItemDefinition coloredLumenPaintBall();
|
||||
}
|
138
src/api/java/appeng/api/definitions/IMaterials.java
Normal file
138
src/api/java/appeng/api/definitions/IMaterials.java
Normal file
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
/**
|
||||
* A list of all materials in AE
|
||||
*/
|
||||
public interface IMaterials
|
||||
{
|
||||
IItemDefinition cell2SpatialPart();
|
||||
|
||||
IItemDefinition cell16SpatialPart();
|
||||
|
||||
IItemDefinition cell128SpatialPart();
|
||||
|
||||
IItemDefinition silicon();
|
||||
|
||||
IItemDefinition skyDust();
|
||||
|
||||
IItemDefinition calcProcessorPress();
|
||||
|
||||
IItemDefinition engProcessorPress();
|
||||
|
||||
IItemDefinition logicProcessorPress();
|
||||
|
||||
IItemDefinition calcProcessorPrint();
|
||||
|
||||
IItemDefinition engProcessorPrint();
|
||||
|
||||
IItemDefinition logicProcessorPrint();
|
||||
|
||||
IItemDefinition siliconPress();
|
||||
|
||||
IItemDefinition siliconPrint();
|
||||
|
||||
IItemDefinition namePress();
|
||||
|
||||
IItemDefinition logicProcessor();
|
||||
|
||||
IItemDefinition calcProcessor();
|
||||
|
||||
IItemDefinition engProcessor();
|
||||
|
||||
IItemDefinition basicCard();
|
||||
|
||||
IItemDefinition advCard();
|
||||
|
||||
IItemDefinition purifiedCertusQuartzCrystal();
|
||||
|
||||
IItemDefinition purifiedNetherQuartzCrystal();
|
||||
|
||||
IItemDefinition purifiedFluixCrystal();
|
||||
|
||||
IItemDefinition cell1kPart();
|
||||
|
||||
IItemDefinition cell4kPart();
|
||||
|
||||
IItemDefinition cell16kPart();
|
||||
|
||||
IItemDefinition cell64kPart();
|
||||
|
||||
IItemDefinition emptyStorageCell();
|
||||
|
||||
IItemDefinition cardRedstone();
|
||||
|
||||
IItemDefinition cardSpeed();
|
||||
|
||||
IItemDefinition cardCapacity();
|
||||
|
||||
IItemDefinition cardFuzzy();
|
||||
|
||||
IItemDefinition cardInverter();
|
||||
|
||||
IItemDefinition cardCrafting();
|
||||
|
||||
IItemDefinition enderDust();
|
||||
|
||||
IItemDefinition flour();
|
||||
|
||||
IItemDefinition goldDust();
|
||||
|
||||
IItemDefinition ironDust();
|
||||
|
||||
IItemDefinition fluixDust();
|
||||
|
||||
IItemDefinition certusQuartzDust();
|
||||
|
||||
IItemDefinition netherQuartzDust();
|
||||
|
||||
IItemDefinition matterBall();
|
||||
|
||||
IItemDefinition ironNugget();
|
||||
|
||||
IItemDefinition certusQuartzCrystal();
|
||||
|
||||
IItemDefinition certusQuartzCrystalCharged();
|
||||
|
||||
IItemDefinition fluixCrystal();
|
||||
|
||||
IItemDefinition fluixPearl();
|
||||
|
||||
IItemDefinition woodenGear();
|
||||
|
||||
IItemDefinition wireless();
|
||||
|
||||
IItemDefinition wirelessBooster();
|
||||
|
||||
IItemDefinition annihilationCore();
|
||||
|
||||
IItemDefinition formationCore();
|
||||
|
||||
IItemDefinition singularity();
|
||||
|
||||
IItemDefinition qESingularity();
|
||||
|
||||
IItemDefinition blankPattern();
|
||||
}
|
104
src/api/java/appeng/api/definitions/IParts.java
Normal file
104
src/api/java/appeng/api/definitions/IParts.java
Normal file
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEColoredItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* A list of all parts in AE
|
||||
*/
|
||||
public interface IParts
|
||||
{
|
||||
AEColoredItemDefinition cableSmart();
|
||||
|
||||
AEColoredItemDefinition cableCovered();
|
||||
|
||||
AEColoredItemDefinition cableGlass();
|
||||
|
||||
AEColoredItemDefinition cableDense();
|
||||
|
||||
AEColoredItemDefinition lumenCableSmart();
|
||||
|
||||
AEColoredItemDefinition lumenCableCovered();
|
||||
|
||||
AEColoredItemDefinition lumenCableGlass();
|
||||
|
||||
AEColoredItemDefinition lumenCableDense();
|
||||
|
||||
IItemDefinition quartzFiber();
|
||||
|
||||
IItemDefinition toggleBus();
|
||||
|
||||
IItemDefinition invertedToggleBus();
|
||||
|
||||
IItemDefinition storageBus();
|
||||
|
||||
IItemDefinition importBus();
|
||||
|
||||
IItemDefinition exportBus();
|
||||
|
||||
IItemDefinition iface();
|
||||
|
||||
IItemDefinition levelEmitter();
|
||||
|
||||
IItemDefinition annihilationPlane();
|
||||
|
||||
IItemDefinition formationPlane();
|
||||
|
||||
IItemDefinition p2PTunnelME();
|
||||
|
||||
IItemDefinition p2PTunnelRedstone();
|
||||
|
||||
IItemDefinition p2PTunnelItems();
|
||||
|
||||
IItemDefinition p2PTunnelLiquids();
|
||||
|
||||
IItemDefinition p2PTunnelEU();
|
||||
|
||||
IItemDefinition p2PTunnelRF();
|
||||
|
||||
IItemDefinition p2PTunnelLight();
|
||||
|
||||
IItemDefinition cableAnchor();
|
||||
|
||||
IItemDefinition monitor();
|
||||
|
||||
IItemDefinition semiDarkMonitor();
|
||||
|
||||
IItemDefinition darkMonitor();
|
||||
|
||||
IItemDefinition interfaceTerminal();
|
||||
|
||||
IItemDefinition patternTerminal();
|
||||
|
||||
IItemDefinition craftingTerminal();
|
||||
|
||||
IItemDefinition terminal();
|
||||
|
||||
IItemDefinition storageMonitor();
|
||||
|
||||
IItemDefinition conversionMonitor();
|
||||
}
|
15
src/api/java/appeng/api/definitions/ITileDefinition.java
Normal file
15
src/api/java/appeng/api/definitions/ITileDefinition.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public interface ITileDefinition extends IBlockDefinition
|
||||
{
|
||||
/**
|
||||
* @return the {@link TileEntity} Class if applicable.
|
||||
*/
|
||||
Optional<? extends Class<? extends TileEntity>> maybeEntity();
|
||||
}
|
|
@ -23,55 +23,88 @@
|
|||
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEColoredItemDefinition;
|
||||
import appeng.api.util.AEItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated use {@link IItems}
|
||||
*/
|
||||
@Deprecated
|
||||
public class Items
|
||||
{
|
||||
|
||||
public AEItemDefinition itemCertusQuartzAxe;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzHoe;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzShovel;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzPick;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzSword;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzWrench;
|
||||
|
||||
public AEItemDefinition itemCertusQuartzKnife;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzAxe;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzHoe;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzShovel;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzPick;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzSword;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzWrench;
|
||||
|
||||
public AEItemDefinition itemNetherQuartzKnife;
|
||||
|
||||
public AEItemDefinition itemEntropyManipulator;
|
||||
|
||||
public AEItemDefinition itemWirelessTerminal;
|
||||
|
||||
public AEItemDefinition itemBiometricCard;
|
||||
|
||||
public AEItemDefinition itemChargedStaff;
|
||||
|
||||
public AEItemDefinition itemMassCannon;
|
||||
|
||||
public AEItemDefinition itemMemoryCard;
|
||||
|
||||
public AEItemDefinition itemNetworkTool;
|
||||
|
||||
public AEItemDefinition itemPortableCell;
|
||||
|
||||
public AEItemDefinition itemCellCreative;
|
||||
|
||||
public AEItemDefinition itemViewCell;
|
||||
|
||||
public AEItemDefinition itemCell1k;
|
||||
|
||||
public AEItemDefinition itemCell4k;
|
||||
|
||||
public AEItemDefinition itemCell16k;
|
||||
|
||||
public AEItemDefinition itemCell64k;
|
||||
|
||||
public AEItemDefinition itemSpatialCell2;
|
||||
|
||||
public AEItemDefinition itemSpatialCell16;
|
||||
|
||||
public AEItemDefinition itemSpatialCell128;
|
||||
|
||||
public AEItemDefinition itemFacade;
|
||||
|
||||
public AEItemDefinition itemCrystalSeed;
|
||||
|
||||
// rv1
|
||||
public AEItemDefinition itemEncodedPattern;
|
||||
|
||||
public AEItemDefinition itemColorApplicator;
|
||||
|
||||
public AEColoredItemDefinition itemPaintBall;
|
||||
|
||||
public AEColoredItemDefinition itemLumenPaintBall;
|
||||
}
|
||||
|
|
|
@ -23,81 +23,121 @@
|
|||
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated use {@link IMaterials}
|
||||
*/
|
||||
@Deprecated
|
||||
public class Materials
|
||||
{
|
||||
|
||||
public AEItemDefinition materialCell2SpatialPart;
|
||||
|
||||
public AEItemDefinition materialCell16SpatialPart;
|
||||
|
||||
public AEItemDefinition materialCell128SpatialPart;
|
||||
|
||||
public AEItemDefinition materialSilicon;
|
||||
|
||||
public AEItemDefinition materialSkyDust;
|
||||
|
||||
public AEItemDefinition materialCalcProcessorPress;
|
||||
|
||||
public AEItemDefinition materialEngProcessorPress;
|
||||
|
||||
public AEItemDefinition materialLogicProcessorPress;
|
||||
|
||||
public AEItemDefinition materialCalcProcessorPrint;
|
||||
|
||||
public AEItemDefinition materialEngProcessorPrint;
|
||||
|
||||
public AEItemDefinition materialLogicProcessorPrint;
|
||||
|
||||
public AEItemDefinition materialSiliconPress;
|
||||
|
||||
public AEItemDefinition materialSiliconPrint;
|
||||
|
||||
public AEItemDefinition materialNamePress;
|
||||
|
||||
public AEItemDefinition materialLogicProcessor;
|
||||
|
||||
public AEItemDefinition materialCalcProcessor;
|
||||
|
||||
public AEItemDefinition materialEngProcessor;
|
||||
|
||||
public AEItemDefinition materialBasicCard;
|
||||
|
||||
public AEItemDefinition materialAdvCard;
|
||||
|
||||
public AEItemDefinition materialPurifiedCertusQuartzCrystal;
|
||||
|
||||
public AEItemDefinition materialPurifiedNetherQuartzCrystal;
|
||||
|
||||
public AEItemDefinition materialPurifiedFluixCrystal;
|
||||
|
||||
public AEItemDefinition materialCell1kPart;
|
||||
|
||||
public AEItemDefinition materialCell4kPart;
|
||||
|
||||
public AEItemDefinition materialCell16kPart;
|
||||
|
||||
public AEItemDefinition materialCell64kPart;
|
||||
|
||||
public AEItemDefinition materialEmptyStorageCell;
|
||||
|
||||
public AEItemDefinition materialCardRedstone;
|
||||
|
||||
public AEItemDefinition materialCardSpeed;
|
||||
|
||||
public AEItemDefinition materialCardCapacity;
|
||||
|
||||
public AEItemDefinition materialCardFuzzy;
|
||||
|
||||
public AEItemDefinition materialCardInverter;
|
||||
|
||||
public AEItemDefinition materialCardCrafting;
|
||||
|
||||
public AEItemDefinition materialEnderDust;
|
||||
|
||||
public AEItemDefinition materialFlour;
|
||||
|
||||
public AEItemDefinition materialGoldDust;
|
||||
|
||||
public AEItemDefinition materialIronDust;
|
||||
|
||||
public AEItemDefinition materialFluixDust;
|
||||
|
||||
public AEItemDefinition materialCertusQuartzDust;
|
||||
|
||||
public AEItemDefinition materialNetherQuartzDust;
|
||||
|
||||
public AEItemDefinition materialMatterBall;
|
||||
|
||||
public AEItemDefinition materialIronNugget;
|
||||
|
||||
public AEItemDefinition materialCertusQuartzCrystal;
|
||||
|
||||
public AEItemDefinition materialCertusQuartzCrystalCharged;
|
||||
|
||||
public AEItemDefinition materialFluixCrystal;
|
||||
|
||||
public AEItemDefinition materialFluixPearl;
|
||||
|
||||
public AEItemDefinition materialWoodenGear;
|
||||
|
||||
public AEItemDefinition materialWireless;
|
||||
|
||||
public AEItemDefinition materialWirelessBooster;
|
||||
|
||||
public AEItemDefinition materialAnnihilationCore;
|
||||
|
||||
public AEItemDefinition materialFormationCore;
|
||||
|
||||
public AEItemDefinition materialSingularity;
|
||||
public AEItemDefinition materialQESingularity;
|
||||
public AEItemDefinition materialBlankPattern;
|
||||
|
||||
public AEItemDefinition materialQESingularity;
|
||||
|
||||
public AEItemDefinition materialBlankPattern;
|
||||
}
|
||||
|
|
|
@ -23,54 +23,84 @@
|
|||
|
||||
package appeng.api.definitions;
|
||||
|
||||
|
||||
import appeng.api.util.AEColoredItemDefinition;
|
||||
import appeng.api.util.AEItemDefinition;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated use {@link IParts}
|
||||
*/
|
||||
@Deprecated
|
||||
public class Parts
|
||||
{
|
||||
|
||||
public AEColoredItemDefinition partCableSmart;
|
||||
|
||||
public AEColoredItemDefinition partCableCovered;
|
||||
|
||||
public AEColoredItemDefinition partCableGlass;
|
||||
|
||||
public AEColoredItemDefinition partCableDense;
|
||||
|
||||
public AEColoredItemDefinition partLumenCableSmart;
|
||||
|
||||
public AEColoredItemDefinition partLumenCableCovered;
|
||||
|
||||
public AEColoredItemDefinition partLumenCableGlass;
|
||||
|
||||
public AEColoredItemDefinition partLumenCableDense;
|
||||
|
||||
public AEItemDefinition partQuartzFiber;
|
||||
|
||||
public AEItemDefinition partToggleBus;
|
||||
|
||||
public AEItemDefinition partInvertedToggleBus;
|
||||
|
||||
public AEItemDefinition partStorageBus;
|
||||
|
||||
public AEItemDefinition partImportBus;
|
||||
|
||||
public AEItemDefinition partExportBus;
|
||||
|
||||
public AEItemDefinition partInterface;
|
||||
|
||||
public AEItemDefinition partLevelEmitter;
|
||||
|
||||
public AEItemDefinition partAnnihilationPlane;
|
||||
|
||||
public AEItemDefinition partFormationPlane;
|
||||
|
||||
public AEItemDefinition partP2PTunnelME;
|
||||
|
||||
public AEItemDefinition partP2PTunnelRedstone;
|
||||
|
||||
public AEItemDefinition partP2PTunnelItems;
|
||||
|
||||
public AEItemDefinition partP2PTunnelLiquids;
|
||||
public AEItemDefinition partP2PTunnelMJ;
|
||||
|
||||
public AEItemDefinition partP2PTunnelEU;
|
||||
|
||||
public AEItemDefinition partP2PTunnelRF;
|
||||
|
||||
public AEItemDefinition partP2PTunnelLight;
|
||||
|
||||
public AEItemDefinition partCableAnchor;
|
||||
|
||||
public AEItemDefinition partMonitor;
|
||||
|
||||
public AEItemDefinition partSemiDarkMonitor;
|
||||
|
||||
public AEItemDefinition partDarkMonitor;
|
||||
|
||||
public AEItemDefinition partInterfaceTerminal;
|
||||
|
||||
public AEItemDefinition partPatternTerminal;
|
||||
|
||||
public AEItemDefinition partCraftingTerminal;
|
||||
|
||||
public AEItemDefinition partTerminal;
|
||||
|
||||
public AEItemDefinition partStorageMonitor;
|
||||
|
||||
public AEItemDefinition partConversionMonitor;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,15 @@
|
|||
|
||||
package appeng.api.events;
|
||||
|
||||
import appeng.api.features.ILocatable;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
import appeng.api.features.ILocatable;
|
||||
|
||||
|
||||
/**
|
||||
* Input Event:
|
||||
*
|
||||
*
|
||||
* Used to Notify the Location Registry of objects, and their availability.
|
||||
*/
|
||||
public class LocatableEventAnnounce extends Event
|
||||
|
@ -40,12 +43,13 @@ public class LocatableEventAnnounce extends Event
|
|||
Unregister // Removes the locatable from the registry
|
||||
}
|
||||
|
||||
|
||||
final public ILocatable target;
|
||||
final public LocatableEvent change;
|
||||
|
||||
public LocatableEventAnnounce(ILocatable o, LocatableEvent ev) {
|
||||
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev )
|
||||
{
|
||||
this.target = o;
|
||||
this.change = ev;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,12 +23,14 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class AppEngException extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -9051434206368465494L;
|
||||
|
||||
public AppEngException(String t) {
|
||||
public AppEngException( String t )
|
||||
{
|
||||
super( t );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class CouldNotAccessCoreAPI extends RuntimeException
|
||||
{
|
||||
public CouldNotAccessCoreAPI( String message )
|
||||
{
|
||||
super( message );
|
||||
}
|
||||
}
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class FailedConnection extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -2544208090248293753L;
|
||||
|
||||
public FailedConnection() {
|
||||
public FailedConnection()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
10
src/api/java/appeng/api/exceptions/MissingDefinition.java
Normal file
10
src/api/java/appeng/api/exceptions/MissingDefinition.java
Normal file
|
@ -0,0 +1,10 @@
|
|||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class MissingDefinition extends RuntimeException
|
||||
{
|
||||
public MissingDefinition( String message )
|
||||
{
|
||||
super( message );
|
||||
}
|
||||
}
|
|
@ -23,12 +23,14 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
public class MissingIngredientError extends Exception {
|
||||
|
||||
public class MissingIngredientError extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -998858343831371697L;
|
||||
|
||||
public MissingIngredientError(String n) {
|
||||
public MissingIngredientError( String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class ModNotInstalled extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -9052435206368425494L;
|
||||
|
||||
public ModNotInstalled(String t) {
|
||||
public ModNotInstalled( String t )
|
||||
{
|
||||
super( t );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class RecipeError extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -6602870588617670262L;
|
||||
|
||||
public RecipeError(String n) {
|
||||
public RecipeError( String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
|
||||
package appeng.api.exceptions;
|
||||
|
||||
|
||||
public class RegistrationError extends Exception
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = -6602870588617670263L;
|
||||
|
||||
public RegistrationError(String n) {
|
||||
public RegistrationError( String n )
|
||||
{
|
||||
super( n );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Registration Records for {@link IGrinderRegistry}
|
||||
*/
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
|
||||
*/
|
||||
|
@ -56,30 +57,30 @@ public interface IGrinderRegistry
|
|||
* @param in input
|
||||
* @param out output
|
||||
* @param optional optional output
|
||||
* @param chance chance to get the optional output within 0.0 - 1.0
|
||||
* @param turns amount of turns to turn the input into the outputs
|
||||
* @param chance chance to get the optional output within 0.0 - 1.0
|
||||
* @param turns amount of turns to turn the input into the outputs
|
||||
*/
|
||||
void addRecipe(ItemStack in, ItemStack out, ItemStack optional, float chance, int turns);
|
||||
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, int turns );
|
||||
|
||||
/**
|
||||
* add a new recipe with optional outputs, duplicates will not be added.
|
||||
*
|
||||
*
|
||||
* @param in input
|
||||
* @param out output
|
||||
* @param optional optional output
|
||||
* @param chance chance to get the optional output within 0.0 - 1.0
|
||||
* @param optional2 second optional output
|
||||
* @param chance2 chance to get the second optional output within 0.0 - 1.0
|
||||
* @param turns amount of turns to turn the input into the outputs
|
||||
* @param chance2 chance to get the second optional output within 0.0 - 1.0
|
||||
* @param turns amount of turns to turn the input into the outputs
|
||||
*/
|
||||
void addRecipe(ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns);
|
||||
void addRecipe( ItemStack in, ItemStack out, ItemStack optional, float chance, ItemStack optional2, float chance2, int turns );
|
||||
|
||||
/**
|
||||
* Searches for a recipe for a given input, and returns it.
|
||||
*
|
||||
* @param input input
|
||||
*
|
||||
* @return identified recipe or null
|
||||
*/
|
||||
IGrinderEntry getRecipeForInput( ItemStack input );
|
||||
|
||||
}
|
||||
|
|
|
@ -23,11 +23,10 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
public interface IItemComparison
|
||||
{
|
||||
|
||||
boolean sameAsPrecise( IItemComparison comp );
|
||||
|
||||
boolean sameAsFuzzy( IItemComparison comp );
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Provider for special comparisons. when an item is encountered AE Will request
|
||||
* if the comparison function handles the item, by trying to request a
|
||||
|
@ -38,16 +40,17 @@ public interface IItemComparisonProvider
|
|||
* the supplied item.
|
||||
*
|
||||
* @param is item
|
||||
*
|
||||
* @return IItemComparison, or null
|
||||
*/
|
||||
IItemComparison getComparison(ItemStack is);
|
||||
IItemComparison getComparison( ItemStack is );
|
||||
|
||||
/**
|
||||
* Simple test for support ( AE generally skips this and calls the above function. )
|
||||
*
|
||||
* @param stack item
|
||||
*
|
||||
* @return true, if getComparison will return a valid IItemComparison Object
|
||||
*/
|
||||
boolean canHandle( ItemStack stack );
|
||||
|
||||
}
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import appeng.api.events.LocatableEventAnnounce;
|
||||
|
||||
|
||||
/**
|
||||
* A registration record for the {@link ILocatableRegistry} use the {@link LocatableEventAnnounce} event on the Forge
|
||||
* Event bus to update the registry.
|
||||
|
@ -36,5 +38,4 @@ public interface ILocatable
|
|||
* @return the serial for a locatable object
|
||||
*/
|
||||
long getLocatableSerial();
|
||||
|
||||
}
|
|
@ -23,25 +23,27 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
public interface IMatterCannonAmmoRegistry
|
||||
{
|
||||
|
||||
/**
|
||||
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
|
||||
*
|
||||
*
|
||||
* @param ammo new ammo
|
||||
* @param weight atomic weight
|
||||
*/
|
||||
void registerAmmo(ItemStack ammo, double weight);
|
||||
void registerAmmo( ItemStack ammo, double weight );
|
||||
|
||||
/**
|
||||
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
|
||||
*
|
||||
* @param is ammo
|
||||
*
|
||||
* @return 0 or a valid penetration value.
|
||||
*/
|
||||
float getPenetration(ItemStack is);
|
||||
|
||||
float getPenetration( ItemStack is );
|
||||
}
|
||||
|
|
|
@ -23,21 +23,25 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface INetworkEncodable {
|
||||
|
||||
public interface INetworkEncodable
|
||||
{
|
||||
|
||||
/**
|
||||
* Used to get the current key from the item.
|
||||
*
|
||||
* @param item item
|
||||
*
|
||||
* @return string key of item
|
||||
*/
|
||||
String getEncryptionKey(ItemStack item);
|
||||
String getEncryptionKey( ItemStack item );
|
||||
|
||||
/**
|
||||
* Encode the wireless frequency via the Controller.
|
||||
*
|
||||
*
|
||||
* @param item
|
||||
* the wireless terminal.
|
||||
* @param encKey
|
||||
|
@ -45,6 +49,5 @@ public interface INetworkEncodable {
|
|||
* @param name
|
||||
* null for now.
|
||||
*/
|
||||
void setEncryptionKey(ItemStack item, String encKey, String name);
|
||||
|
||||
void setEncryptionKey( ItemStack item, String encKey, String name );
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
import appeng.api.config.TunnelType;
|
||||
|
||||
|
||||
/**
|
||||
* A Registry for how p2p Tunnels are attuned
|
||||
*/
|
||||
|
@ -37,7 +38,7 @@ public interface IP2PTunnelRegistry
|
|||
/**
|
||||
* Allows third parties to register items from their mod as potential
|
||||
* attunements for AE's P2P Tunnels
|
||||
*
|
||||
*
|
||||
* @param trigger
|
||||
* - the item which triggers attunement
|
||||
* @param type
|
||||
|
@ -49,8 +50,8 @@ public interface IP2PTunnelRegistry
|
|||
* returns null if no attunement can be found.
|
||||
*
|
||||
* @param trigger attunement trigger
|
||||
*
|
||||
* @return null if no attunement can be found or attunement
|
||||
*/
|
||||
TunnelType getTunnelTypeByItem(ItemStack trigger);
|
||||
|
||||
TunnelType getTunnelTypeByItem( ItemStack trigger );
|
||||
}
|
|
@ -23,10 +23,12 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
|
||||
/**
|
||||
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
|
||||
* gives a common place to look up and get IDs for the security framework.
|
||||
|
@ -36,20 +38,22 @@ public interface IPlayerRegistry
|
|||
|
||||
/**
|
||||
* @param gameProfile user game profile
|
||||
*
|
||||
* @return user id of a username.
|
||||
*/
|
||||
int getID(GameProfile gameProfile);
|
||||
int getID( GameProfile gameProfile );
|
||||
|
||||
/**
|
||||
* @param player player
|
||||
*
|
||||
* @return user id of a player entity.
|
||||
*/
|
||||
int getID(EntityPlayer player);
|
||||
int getID( EntityPlayer player );
|
||||
|
||||
/**
|
||||
* @param playerID to be found player id
|
||||
*
|
||||
* @return PlayerEntity, or null if the player could not be found.
|
||||
*/
|
||||
EntityPlayer findPlayer(int playerID);
|
||||
|
||||
EntityPlayer findPlayer( int playerID );
|
||||
}
|
||||
|
|
|
@ -23,37 +23,40 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IRecipeHandler;
|
||||
import appeng.api.recipes.ISubItemResolver;
|
||||
|
||||
|
||||
public interface IRecipeHandlerRegistry
|
||||
{
|
||||
|
||||
/**
|
||||
* Add a new Recipe Handler to the parser.
|
||||
*
|
||||
*
|
||||
* MUST BE CALLED IN PRE-INIT
|
||||
*
|
||||
*
|
||||
* @param name name of crafthandler
|
||||
* @param handler class of crafthandler
|
||||
*/
|
||||
void addNewCraftHandler(String name, Class<? extends ICraftHandler> handler);
|
||||
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
||||
|
||||
/**
|
||||
* Add a new resolver to the parser.
|
||||
*
|
||||
*
|
||||
* MUST BE CALLED IN PRE-INIT
|
||||
*
|
||||
* @param sir sub item resolver
|
||||
*/
|
||||
void addNewSubItemResolver(ISubItemResolver sir);
|
||||
void addNewSubItemResolver( ISubItemResolver sir );
|
||||
|
||||
/**
|
||||
* @param name name of crafting handler
|
||||
*
|
||||
* @return A recipe handler by name, returns null on failure.
|
||||
*/
|
||||
ICraftHandler getCraftHandlerFor(String name);
|
||||
ICraftHandler getCraftHandlerFor( String name );
|
||||
|
||||
/**
|
||||
* @return a new recipe handler, which can be used to parse, and read recipe files.
|
||||
|
@ -64,9 +67,9 @@ public interface IRecipeHandlerRegistry
|
|||
* resolve sub items by name.
|
||||
*
|
||||
* @param nameSpace namespace of item
|
||||
* @param itemName full name of item
|
||||
* @param itemName full name of item
|
||||
*
|
||||
* @return ResolverResult or ResolverResultSet
|
||||
*/
|
||||
Object resolveItem(String nameSpace, String itemName);
|
||||
|
||||
Object resolveItem( String nameSpace, String itemName );
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import appeng.api.movable.IMovableRegistry;
|
||||
import appeng.api.networking.IGridCacheRegistry;
|
||||
import appeng.api.storage.ICellRegistry;
|
||||
import appeng.api.storage.IExternalStorageRegistry;
|
||||
|
||||
|
||||
public interface IRegistryContainer
|
||||
{
|
||||
|
||||
|
|
|
@ -23,11 +23,12 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* A Registry of any special comparison handlers for AE To use.
|
||||
*
|
||||
*/
|
||||
public interface ISpecialComparisonRegistry
|
||||
{
|
||||
|
@ -36,9 +37,10 @@ public interface ISpecialComparisonRegistry
|
|||
* return TheHandler or null.
|
||||
*
|
||||
* @param stack item
|
||||
*
|
||||
* @return a handler it found for a specific item
|
||||
*/
|
||||
IItemComparison getSpecialComparison(ItemStack stack);
|
||||
IItemComparison getSpecialComparison( ItemStack stack );
|
||||
|
||||
/**
|
||||
* Register a new special comparison function with AE.
|
||||
|
@ -46,5 +48,4 @@ public interface ISpecialComparisonRegistry
|
|||
* @param prov comparison provider
|
||||
*/
|
||||
void addComparisonProvider( IItemComparisonProvider prov );
|
||||
|
||||
}
|
|
@ -23,10 +23,13 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.util.IConfigManager;
|
||||
|
||||
|
||||
/**
|
||||
* A handler for a wireless terminal.
|
||||
*/
|
||||
|
@ -35,35 +38,37 @@ public interface IWirelessTermHandler extends INetworkEncodable
|
|||
|
||||
/**
|
||||
* @param is wireless terminal
|
||||
*
|
||||
* @return true, if usePower, hasPower, etc... can be called for the provided item
|
||||
*/
|
||||
boolean canHandle(ItemStack is);
|
||||
boolean canHandle( ItemStack is );
|
||||
|
||||
/**
|
||||
* use an amount of power, in AE units
|
||||
*
|
||||
*
|
||||
* @param amount
|
||||
* is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
|
||||
* hasPower
|
||||
* @param is wireless terminal
|
||||
* @return true if wireless terminal uses power
|
||||
*/
|
||||
boolean usePower(EntityPlayer player, double amount, ItemStack is);
|
||||
boolean usePower( EntityPlayer player, double amount, ItemStack is );
|
||||
|
||||
/**
|
||||
* gets the power status of the item.
|
||||
*
|
||||
* @param is wireless terminal
|
||||
*
|
||||
* @return returns true if there is any power left.
|
||||
*/
|
||||
boolean hasPower(EntityPlayer player, double amount, ItemStack is);
|
||||
boolean hasPower( EntityPlayer player, double amount, ItemStack is );
|
||||
|
||||
/**
|
||||
* Return the config manager for the wireless terminal.
|
||||
*
|
||||
* @param is wireless terminal
|
||||
*
|
||||
* @return config manager of wireless terminal
|
||||
*/
|
||||
IConfigManager getConfigManager(ItemStack is);
|
||||
|
||||
IConfigManager getConfigManager( ItemStack is );
|
||||
}
|
|
@ -23,10 +23,12 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
/**
|
||||
* Registration record for a Custom Cell handler.
|
||||
*/
|
||||
|
@ -38,25 +40,26 @@ public interface IWirelessTermRegistry
|
|||
*
|
||||
* @param handler wireless handler
|
||||
*/
|
||||
void registerWirelessHandler(IWirelessTermHandler handler);
|
||||
void registerWirelessHandler( IWirelessTermHandler handler );
|
||||
|
||||
/**
|
||||
* @param is item which might have a handler
|
||||
*
|
||||
* @return true if there is a handler for this item
|
||||
*/
|
||||
boolean isWirelessTerminal(ItemStack is);
|
||||
boolean isWirelessTerminal( ItemStack is );
|
||||
|
||||
/**
|
||||
* @param is item with handler
|
||||
*
|
||||
* @return a register handler for the item in question, or null if there
|
||||
* isn't one
|
||||
* isn't one
|
||||
*/
|
||||
IWirelessTermHandler getWirelessTerminalHandler(ItemStack is);
|
||||
IWirelessTermHandler getWirelessTerminalHandler( ItemStack is );
|
||||
|
||||
/**
|
||||
* opens the wireless terminal gui, the wireless terminal item, must be in
|
||||
* the active slot on the tool bar.
|
||||
*/
|
||||
void openWirelessTerminalGui(ItemStack item, World w, EntityPlayer player);
|
||||
|
||||
void openWirelessTerminalGui( ItemStack item, World w, EntityPlayer player );
|
||||
}
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
|
||||
|
||||
public interface IWorldGen
|
||||
{
|
||||
|
||||
|
@ -40,6 +42,5 @@ public interface IWorldGen
|
|||
|
||||
void disableWorldGenForDimension( WorldGenType type, int dimID );
|
||||
|
||||
boolean isWorldGenEnabled(WorldGenType type, World w);
|
||||
|
||||
boolean isWorldGenEnabled( WorldGenType type, World w );
|
||||
}
|
||||
|
|
|
@ -23,11 +23,14 @@
|
|||
|
||||
package appeng.api.implementations;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on {@link Item}
|
||||
*/
|
||||
|
@ -38,8 +41,9 @@ public interface ICraftingPatternItem
|
|||
* Access Details about a pattern
|
||||
*
|
||||
* @param is pattern
|
||||
* @param w crafting world
|
||||
* @param w crafting world
|
||||
*
|
||||
* @return details of pattern
|
||||
*/
|
||||
ICraftingPatternDetails getPatternForItem(ItemStack is, World w);
|
||||
ICraftingPatternDetails getPatternForItem( ItemStack is, World w );
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.implementations;
|
||||
|
||||
|
||||
/**
|
||||
* This is intended for use on the client side to provide details to WAILA.
|
||||
*/
|
||||
|
@ -38,5 +39,4 @@ public interface IPowerChannelState
|
|||
* @return true if the part/tile isActive
|
||||
*/
|
||||
boolean isActive();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
|
||||
package appeng.api.implementations;
|
||||
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
|
||||
|
||||
public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory
|
||||
{
|
||||
|
@ -34,7 +37,7 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
|
|||
/**
|
||||
* determine how many of an upgrade are installed.
|
||||
*/
|
||||
int getInstalledUpgrades(Upgrades u);
|
||||
int getInstalledUpgrades( Upgrades u );
|
||||
|
||||
/**
|
||||
* the tile...
|
||||
|
@ -42,5 +45,4 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
|
|||
* @return tile entity
|
||||
*/
|
||||
TileEntity getTile();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.implementations;
|
||||
|
||||
|
||||
/**
|
||||
* Defines the result of performing a transition from the world into a storage
|
||||
* cell, if its possible, and what the energy usage is.
|
||||
|
@ -32,7 +33,8 @@ public class TransitionResult
|
|||
public final boolean success;
|
||||
public final double energyUsage;
|
||||
|
||||
public TransitionResult(boolean _success, double power) {
|
||||
public TransitionResult( boolean _success, double power )
|
||||
{
|
||||
this.success = _success;
|
||||
this.energyUsage = power;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on Item objects, to return objects used to manage, and interact
|
||||
* with the contents.
|
||||
|
@ -33,6 +35,5 @@ import net.minecraft.world.World;
|
|||
public interface IGuiItem
|
||||
{
|
||||
|
||||
IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z);
|
||||
|
||||
IGuiItemObject getGuiObject( ItemStack is, World world, int x, int y, int z );
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
public interface IGuiItemObject
|
||||
{
|
||||
|
||||
|
|
|
@ -23,9 +23,12 @@
|
|||
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
|
||||
/**
|
||||
* Obtained via {@link IGuiItem} getGuiObject
|
||||
*/
|
||||
|
@ -33,5 +36,4 @@ public interface INetworkTool extends IInventory, IGuiItemObject
|
|||
{
|
||||
|
||||
IGridHost getGridHost(); // null for most purposes.
|
||||
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Obtained via {@link IGuiItem} getGuiObject
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.networking.energy.IAEPowerStorage;
|
||||
|
||||
|
||||
/**
|
||||
* Basically the same as {@link IAEPowerStorage}, but for items.
|
||||
*/
|
||||
|
@ -48,6 +49,7 @@ public interface IAEItemPowerStorage
|
|||
* return it.
|
||||
*
|
||||
* @param amt to be extracted power from device
|
||||
*
|
||||
* @return what it could extract
|
||||
*/
|
||||
double extractAEPower( ItemStack is, double amt );
|
||||
|
@ -69,5 +71,4 @@ public interface IAEItemPowerStorage
|
|||
* @return access restriction of network
|
||||
*/
|
||||
AccessRestriction getPowerFlow( ItemStack is );
|
||||
|
||||
}
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on AE's wrench(s) as a substitute for if BC's API is not
|
||||
* available.
|
||||
|
@ -37,12 +39,11 @@ public interface IAEWrench
|
|||
* Check if the wrench can be used.
|
||||
*
|
||||
* @param player wrenching player
|
||||
* @param x x pos of wrenched block
|
||||
* @param y y pos of wrenched block
|
||||
* @param z z pos of wrenched block
|
||||
* @param x x pos of wrenched block
|
||||
* @param y y pos of wrenched block
|
||||
* @param z z pos of wrenched block
|
||||
*
|
||||
* @return true if wrench can be used
|
||||
*/
|
||||
boolean canWrench(ItemStack wrench, EntityPlayer player, int x, int y, int z);
|
||||
|
||||
boolean canWrench( ItemStack wrench, EntityPlayer player, int x, int y, int z );
|
||||
}
|
||||
|
|
|
@ -23,13 +23,17 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.features.IPlayerRegistry;
|
||||
import appeng.api.networking.security.ISecurityRegistry;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public interface IBiometricCard
|
||||
{
|
||||
|
@ -37,50 +41,51 @@ public interface IBiometricCard
|
|||
/**
|
||||
* Set the {@link GameProfile} to null, to clear it.
|
||||
*/
|
||||
void setProfile(ItemStack itemStack, GameProfile username);
|
||||
void setProfile( ItemStack itemStack, GameProfile username );
|
||||
|
||||
/**
|
||||
* @return {@link GameProfile} of the player encoded on this card, or a blank string.
|
||||
*/
|
||||
GameProfile getProfile(ItemStack is);
|
||||
GameProfile getProfile( ItemStack is );
|
||||
|
||||
/**
|
||||
* @param itemStack card
|
||||
*
|
||||
* @return the full list of permissions encoded on the card.
|
||||
*/
|
||||
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
|
||||
EnumSet<SecurityPermissions> getPermissions( ItemStack itemStack );
|
||||
|
||||
/**
|
||||
* Check if a permission is encoded on the card.
|
||||
*
|
||||
* @param permission card
|
||||
*
|
||||
* @return true if this permission is set on the card.
|
||||
*/
|
||||
boolean hasPermission(ItemStack is, SecurityPermissions permission);
|
||||
boolean hasPermission( ItemStack is, SecurityPermissions permission );
|
||||
|
||||
/**
|
||||
* remove a permission from the item stack.
|
||||
*
|
||||
*
|
||||
* @param itemStack card
|
||||
* @param permission to be removed permission
|
||||
*/
|
||||
void removePermission(ItemStack itemStack, SecurityPermissions permission);
|
||||
void removePermission( ItemStack itemStack, SecurityPermissions permission );
|
||||
|
||||
/**
|
||||
* add a permission to the item stack.
|
||||
*
|
||||
*
|
||||
* @param itemStack card
|
||||
* @param permission to be added permission
|
||||
*/
|
||||
void addPermission(ItemStack itemStack, SecurityPermissions permission);
|
||||
void addPermission( ItemStack itemStack, SecurityPermissions permission );
|
||||
|
||||
/**
|
||||
* lets you handle submission of security values on the card for custom behavior.
|
||||
*
|
||||
* @param registry security registry
|
||||
* @param pr player registry
|
||||
* @param is card
|
||||
* @param pr player registry
|
||||
* @param is card
|
||||
*/
|
||||
void registerPermissions(ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is);
|
||||
|
||||
void registerPermissions( ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is );
|
||||
}
|
||||
|
|
|
@ -23,15 +23,16 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
public interface IGrowableCrystal
|
||||
{
|
||||
|
||||
ItemStack triggerGrowth(ItemStack is);
|
||||
|
||||
float getMultiplier(Block blk, Material mat);
|
||||
ItemStack triggerGrowth( ItemStack is );
|
||||
|
||||
float getMultiplier( Block blk, Material mat );
|
||||
}
|
||||
|
|
|
@ -23,10 +23,12 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Lets you specify the name of the group of items this falls under.
|
||||
*/
|
||||
|
@ -37,8 +39,8 @@ public interface IItemGroup
|
|||
* returning null, is the same as not implementing the interface at all.
|
||||
*
|
||||
* @param is item
|
||||
*
|
||||
* @return an unlocalized string to use for the items group name.
|
||||
*/
|
||||
String getUnlocalizedGroupName(Set<ItemStack> otherItems, ItemStack is);
|
||||
|
||||
String getUnlocalizedGroupName( Set<ItemStack> otherItems, ItemStack is );
|
||||
}
|
||||
|
|
|
@ -23,13 +23,15 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
|
||||
/**
|
||||
* Memory Card API
|
||||
*
|
||||
*
|
||||
* AE's Memory Card Item Class implements this interface.
|
||||
*/
|
||||
public interface IMemoryCard
|
||||
|
@ -38,7 +40,7 @@ public interface IMemoryCard
|
|||
/**
|
||||
* Configures the data stored on the memory card, the SettingsName, will be
|
||||
* localized when displayed.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @param SettingsName
|
||||
* unlocalized string that represents the tile entity.
|
||||
|
@ -47,7 +49,7 @@ public interface IMemoryCard
|
|||
* unlocalized string displayed after the settings name, optional
|
||||
* but can be used to add details to the card for later.
|
||||
*/
|
||||
void setMemoryCardContents(ItemStack is, String SettingsName, NBTTagCompound data);
|
||||
void setMemoryCardContents( ItemStack is, String SettingsName, NBTTagCompound data );
|
||||
|
||||
/**
|
||||
* returns the settings name provided by a previous call to
|
||||
|
@ -55,25 +57,26 @@ public interface IMemoryCard
|
|||
* previous call to setMemoryCardContents.
|
||||
*
|
||||
* @param is item
|
||||
*
|
||||
* @return setting name
|
||||
*/
|
||||
String getSettingsName(ItemStack is);
|
||||
String getSettingsName( ItemStack is );
|
||||
|
||||
/**
|
||||
* @param is item
|
||||
*
|
||||
* @return the NBT Data previously saved by setMemoryCardContents, or an
|
||||
* empty NBTCompound
|
||||
* empty NBTCompound
|
||||
*/
|
||||
NBTTagCompound getData(ItemStack is);
|
||||
NBTTagCompound getData( ItemStack is );
|
||||
|
||||
/**
|
||||
* notify the user of a outcome related to the memory card.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* that used the card.
|
||||
* @param msg
|
||||
* which message to send.
|
||||
*/
|
||||
void notifyUser(EntityPlayer player, MemoryCardMessages msg);
|
||||
|
||||
void notifyUser( EntityPlayer player, MemoryCardMessages msg );
|
||||
}
|
||||
|
|
|
@ -23,12 +23,15 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.TransitionResult;
|
||||
import appeng.api.util.WorldCoord;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on a {@link Item}
|
||||
*/
|
||||
|
@ -37,56 +40,62 @@ public interface ISpatialStorageCell
|
|||
|
||||
/**
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return true if this item is a spatial storage cell
|
||||
*/
|
||||
boolean isSpatialStorage(ItemStack is);
|
||||
boolean isSpatialStorage( ItemStack is );
|
||||
|
||||
/**
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return the maximum size of the spatial storage cell along any given axis
|
||||
*/
|
||||
int getMaxStoredDim(ItemStack is);
|
||||
int getMaxStoredDim( ItemStack is );
|
||||
|
||||
/**
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return the world for this cell
|
||||
*/
|
||||
World getWorld(ItemStack is);
|
||||
World getWorld( ItemStack is );
|
||||
|
||||
/**
|
||||
* get the currently stored size.
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return size of spatial
|
||||
*/
|
||||
WorldCoord getStoredSize(ItemStack is);
|
||||
WorldCoord getStoredSize( ItemStack is );
|
||||
|
||||
/**
|
||||
* Minimum coordinates in its world for the storage cell.
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return minimum coordinate of dimension
|
||||
*/
|
||||
WorldCoord getMin(ItemStack is);
|
||||
WorldCoord getMin( ItemStack is );
|
||||
|
||||
/**
|
||||
* Maximum coordinates in its world for the storage cell.
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
*
|
||||
* @return maximum coordinate of dimension
|
||||
*/
|
||||
WorldCoord getMax(ItemStack is);
|
||||
WorldCoord getMax( ItemStack is );
|
||||
|
||||
/**
|
||||
* Perform a spatial swap with the contents of the cell, and the world.
|
||||
*
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
* @param w world of spatial
|
||||
* @param min min coord
|
||||
* @param max max coord
|
||||
* @param doTransition transition
|
||||
*
|
||||
* @return result of transition
|
||||
*/
|
||||
TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition);
|
||||
|
||||
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition );
|
||||
}
|
|
@ -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.
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on a {@link Item}
|
||||
*/
|
||||
|
@ -38,16 +40,17 @@ public interface IStorageComponent
|
|||
* the condenser.
|
||||
*
|
||||
* @param is item
|
||||
*
|
||||
* @return number of bytes
|
||||
*/
|
||||
int getBytes(ItemStack is);
|
||||
int getBytes( ItemStack is );
|
||||
|
||||
/**
|
||||
* Just true or false for the item stack.
|
||||
*
|
||||
* @param is item
|
||||
*
|
||||
* @return true if item is a storage component
|
||||
*/
|
||||
boolean isStorageComponent(ItemStack is);
|
||||
|
||||
boolean isStorageComponent( ItemStack is );
|
||||
}
|
||||
|
|
|
@ -23,16 +23,19 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.Upgrades;
|
||||
|
||||
|
||||
public interface IUpgradeModule
|
||||
{
|
||||
|
||||
/**
|
||||
* @param itemstack item with potential upgrades
|
||||
*
|
||||
* @return null, or a valid upgrade type.
|
||||
*/
|
||||
Upgrades getType(ItemStack itemstack);
|
||||
|
||||
Upgrades getType( ItemStack itemstack );
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
|
||||
/**
|
||||
* Status Results for use with {@link IMemoryCard}
|
||||
*/
|
||||
|
|
|
@ -23,16 +23,19 @@
|
|||
|
||||
package appeng.api.implementations.parts;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.parts.BusSupport;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
/**
|
||||
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in
|
||||
|
@ -60,25 +63,26 @@ public interface IPartCable extends IPart, IGridHost
|
|||
* Change the color of the cable, this should cost a small amount of dye, or something.
|
||||
*
|
||||
* @param newColor new color
|
||||
*
|
||||
* @return if the color change was successful.
|
||||
*/
|
||||
boolean changeColor(AEColor newColor, EntityPlayer who);
|
||||
boolean changeColor( AEColor newColor, EntityPlayer who );
|
||||
|
||||
/**
|
||||
* Change sides on the cables node.
|
||||
*
|
||||
*
|
||||
* Called by AE, do not invoke.
|
||||
*
|
||||
* @param sides sides of cable
|
||||
*/
|
||||
void setValidSides(EnumSet<ForgeDirection> sides);
|
||||
void setValidSides( EnumSet<ForgeDirection> sides );
|
||||
|
||||
/**
|
||||
* used to tests if a cable connects to neighbors visually.
|
||||
*
|
||||
* @param side neighbor side
|
||||
*
|
||||
* @return true if this side is currently connects to an external block.
|
||||
*/
|
||||
boolean isConnected(ForgeDirection side);
|
||||
|
||||
boolean isConnected( ForgeDirection side );
|
||||
}
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
package appeng.api.implementations.parts;
|
||||
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.parts.IPart;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented by all screen like parts provided by AE.
|
||||
*/
|
||||
|
@ -34,8 +36,7 @@ public interface IPartMonitor extends IPart, IGridHost
|
|||
|
||||
/**
|
||||
* @return if the device is online you should check this before providing
|
||||
* any other information.
|
||||
* any other information.
|
||||
*/
|
||||
boolean isPowered();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
package appeng.api.implementations.parts;
|
||||
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.INetworkToolAgent;
|
||||
|
||||
|
||||
/**
|
||||
* The Storage monitor is a {@link IPart} located on the sides of a IPartHost
|
||||
*/
|
||||
|
@ -36,8 +38,8 @@ public interface IPartStorageMonitor extends IPartMonitor, IPart, IGridHost, INe
|
|||
|
||||
/**
|
||||
* @return the item being displayed on the storage monitor, in AEStack Form, can be either a IAEItemStack or an
|
||||
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
|
||||
* FluidStack/ItemStack acquired from it.
|
||||
* IAEFluidStack the quantity is important remember to use getStackSize() on the IAEStack, and not on the
|
||||
* FluidStack/ItemStack acquired from it.
|
||||
*/
|
||||
IAEStack<?> getDisplayed();
|
||||
|
||||
|
@ -45,5 +47,4 @@ public interface IPartStorageMonitor extends IPartMonitor, IPart, IGridHost, INe
|
|||
* @return the current locked state of the Storage Monitor
|
||||
*/
|
||||
boolean isLocked();
|
||||
|
||||
}
|
|
@ -23,15 +23,17 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
|
||||
public interface IColorableTile
|
||||
{
|
||||
|
||||
AEColor getColor();
|
||||
|
||||
boolean recolourBlock(ForgeDirection side, AEColor colour, EntityPlayer who);
|
||||
|
||||
boolean recolourBlock( ForgeDirection side, AEColor colour, EntityPlayer who );
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
|
||||
public interface ICraftingMachine
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
public interface ICrystalGrowthAccelerator
|
||||
{
|
||||
|
||||
boolean isPowered();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
|
||||
|
||||
public interface IMEChest extends IChestOrDrive, ITileStorageMonitorable, IEnergySource
|
||||
{
|
||||
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
|
||||
public interface ISegmentedInventory
|
||||
{
|
||||
|
||||
|
@ -33,8 +35,8 @@ public interface ISegmentedInventory
|
|||
* them a real inventories will result in duplication.
|
||||
*
|
||||
* @param name inventory name
|
||||
*
|
||||
* @return inventory with inventory name
|
||||
*/
|
||||
IInventory getInventoryByName(String name);
|
||||
|
||||
IInventory getInventoryByName( String name );
|
||||
}
|
||||
|
|
|
@ -23,16 +23,18 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
|
||||
|
||||
/**
|
||||
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
|
||||
*/
|
||||
public interface ITileStorageMonitorable
|
||||
{
|
||||
|
||||
IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src);
|
||||
|
||||
IStorageMonitorable getMonitorable( ForgeDirection side, BaseActionSource src );
|
||||
}
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
|
||||
public interface IViewCellStorage
|
||||
{
|
||||
|
||||
|
@ -34,5 +36,4 @@ public interface IViewCellStorage
|
|||
* @return inventory with at least 5 slot
|
||||
*/
|
||||
IInventory getViewCellStorage();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,10 +23,12 @@
|
|||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
|
||||
|
||||
public interface IWirelessAccessPoint extends IActionHost
|
||||
{
|
||||
|
||||
|
@ -49,5 +51,4 @@ public interface IWirelessAccessPoint extends IActionHost
|
|||
* @return grid of linked WAP
|
||||
*/
|
||||
IGrid getGrid();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.movable;
|
||||
|
||||
|
||||
/**
|
||||
* You can implement this, or use the IMovableRegistry to white list your tile,
|
||||
* please see the registry for more information.
|
||||
|
@ -42,5 +43,4 @@ public interface IMovableTile
|
|||
* notification that your block was moved, called after validate.
|
||||
*/
|
||||
void doneMoving();
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
/**
|
||||
* Various flags to determine network node behavior.
|
||||
*/
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
public enum GridNotification
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
package appeng.api.networking;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
/**
|
||||
* A registry of grid caches to extend grid functionality.
|
||||
*/
|
||||
|
@ -36,7 +38,7 @@ public interface IGridCacheRegistry
|
|||
*
|
||||
* @param iface grid cache class
|
||||
*/
|
||||
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
|
||||
void registerGridCache( Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation );
|
||||
|
||||
/**
|
||||
* requests a new INSTANCE of a grid cache for use, used internally
|
||||
|
@ -45,6 +47,5 @@ public interface IGridCacheRegistry
|
|||
*
|
||||
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
|
||||
*/
|
||||
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid grid);
|
||||
|
||||
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance( IGrid grid );
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue