Merge pull request #1181 from thatsIch/e-basic-reformat

Basic reformat, hit once, hope never again
This commit is contained in:
thatsIch
2015-04-03 15:15:42 +02:00
886 changed files with 31400 additions and 30990 deletions
@@ -30,7 +30,8 @@ public enum AccessRestriction
private final int permissionBit; private final int permissionBit;
AccessRestriction( int v ) { AccessRestriction( int v )
{
this.permissionBit = v; this.permissionBit = v;
} }
@@ -44,16 +45,6 @@ public enum AccessRestriction
return this.getPermByBit( this.permissionBit & ar.permissionBit ); return this.getPermByBit( this.permissionBit & ar.permissionBit );
} }
public AccessRestriction addPermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit | ar.permissionBit );
}
public AccessRestriction removePermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
}
private AccessRestriction getPermByBit( int bit ) private AccessRestriction getPermByBit( int bit )
{ {
switch( bit ) switch( bit )
@@ -69,4 +60,14 @@ public enum AccessRestriction
return READ_WRITE; return READ_WRITE;
} }
} }
public AccessRestriction addPermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit | ar.permissionBit );
}
public AccessRestriction removePermissions( AccessRestriction ar )
{
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
}
} }
@@ -32,7 +32,8 @@ public enum FuzzyMode
final public float breakPoint; final public float breakPoint;
final public float percentage; final public float percentage;
FuzzyMode( float p ) { FuzzyMode( float p )
{
this.percentage = p; this.percentage = p;
this.breakPoint = p / 100.0f; this.breakPoint = p / 100.0f;
} }
@@ -32,19 +32,19 @@ public enum PowerUnits
RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux RF( "gui.appliedenergistics2.units.thermalexpansion" ), // ThermalExpansion - Redstone Flux
MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules MK( "gui.appliedenergistics2.units.mekanism" ); // Mekanism - Joules
PowerUnits( String un ) { /**
this.unlocalizedName = un; * unlocalized name for the power unit.
} */
final public String unlocalizedName;
/** /**
* please do not edit this value, it is set when AE loads its config files. * please do not edit this value, it is set when AE loads its config files.
*/ */
public double conversionRatio = 1.0; public double conversionRatio = 1.0;
/** PowerUnits( String un )
* unlocalized name for the power unit. {
*/ this.unlocalizedName = un;
final public String unlocalizedName; }
/** /**
* do power conversion using AE's conversion rates. * do power conversion using AE's conversion rates.
+5 -5
View File
@@ -57,11 +57,6 @@ public enum Settings
private final EnumSet values; private final EnumSet values;
public EnumSet getPossibleValues()
{
return this.values;
}
Settings( EnumSet set ) Settings( EnumSet set )
{ {
if( set == null || set.isEmpty() ) if( set == null || set.isEmpty() )
@@ -69,4 +64,9 @@ public enum Settings
this.values = set; this.values = set;
} }
public EnumSet getPossibleValues()
{
return this.values;
}
} }
+14 -14
View File
@@ -87,6 +87,20 @@ public enum Upgrades
} }
} }
/**
* 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 )
{
this.supportedMax.put( stack, maxSupported );
}
}
/** /**
* Registers a specific amount of this upgrade into a specific machine * Registers a specific amount of this upgrade into a specific machine
* *
@@ -109,20 +123,6 @@ public enum Upgrades
} }
} }
/**
* 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 )
{
this.supportedMax.put( stack, maxSupported );
}
}
public int getTier() public int getTier()
{ {
return this.tier; return this.tier;
@@ -20,6 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package appeng.api.definitions; package appeng.api.definitions;
@@ -14,6 +14,7 @@ public interface IComparableDefinition
* Compare {@link ItemStack} with this * Compare {@link ItemStack} with this
* *
* @param comparableStack compared item * @param comparableStack compared item
*
* @return true if the item stack is a matching item. * @return true if the item stack is a matching item.
*/ */
boolean isSameAs( ItemStack comparableStack ); boolean isSameAs( ItemStack comparableStack );
@@ -20,6 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package appeng.api.definitions; package appeng.api.definitions;
@@ -20,6 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package appeng.api.definitions; package appeng.api.definitions;
@@ -20,6 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package appeng.api.definitions; package appeng.api.definitions;
@@ -37,13 +37,6 @@ import appeng.api.features.ILocatable;
public class LocatableEventAnnounce extends Event public class LocatableEventAnnounce extends Event
{ {
public enum LocatableEvent
{
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}
final public ILocatable target; final public ILocatable target;
final public LocatableEvent change; final public LocatableEvent change;
@@ -52,4 +45,10 @@ public class LocatableEventAnnounce extends Event
this.target = o; this.target = o;
this.change = ev; this.change = ev;
} }
public enum LocatableEvent
{
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
}
} }
@@ -54,6 +54,13 @@ public interface IGrinderEntry
*/ */
ItemStack getOutput(); ItemStack getOutput();
/**
* allows you to change the output.
*
* @param output output item
*/
void setOutput( ItemStack output );
/** /**
* gets the current output * gets the current output
* *
@@ -68,13 +75,6 @@ public interface IGrinderEntry
*/ */
ItemStack getSecondOptionalOutput(); ItemStack getSecondOptionalOutput();
/**
* allows you to change the output.
*
* @param output output item
*/
void setOutput( ItemStack output );
/** /**
* stack, and 0.0-1.0 chance that it will be generated. * stack, and 0.0-1.0 chance that it will be generated.
* *
@@ -42,12 +42,9 @@ public interface INetworkEncodable
/** /**
* Encode the wireless frequency via the Controller. * Encode the wireless frequency via the Controller.
* *
* @param item * @param item the wireless terminal.
* the wireless terminal. * @param encKey the wireless encryption key.
* @param encKey * @param name null for now.
* the wireless encryption key.
* @param name
* null for now.
*/ */
void setEncryptionKey( ItemStack item, String encKey, String name ); void setEncryptionKey( ItemStack item, String encKey, String name );
} }
@@ -39,10 +39,8 @@ public interface IP2PTunnelRegistry
* Allows third parties to register items from their mod as potential * Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels * attunements for AE's P2P Tunnels
* *
* @param trigger * @param trigger - the item which triggers attunement
* - the item which triggers attunement * @param type - the type of tunnel
* @param type
* - the type of tunnel
*/ */
void addNewAttunement( ItemStack trigger, TunnelType type ); void addNewAttunement( ItemStack trigger, TunnelType type );
@@ -46,10 +46,10 @@ public interface IWirelessTermHandler extends INetworkEncodable
/** /**
* use an amount of power, in AE units * use an amount of power, in AE units
* *
* @param amount * @param amount is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower * hasPower
* @param is wireless terminal * @param is wireless terminal
*
* @return true if wireless terminal uses power * @return true if wireless terminal uses power
*/ */
boolean usePower( EntityPlayer player, double amount, ItemStack is ); boolean usePower( EntityPlayer player, double amount, ItemStack is );
@@ -31,11 +31,6 @@ import net.minecraft.world.WorldProvider;
public interface IWorldGen public interface IWorldGen
{ {
enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Meteorites
}
void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider ); void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider );
void enableWorldGenForDimension( WorldGenType type, int dimID ); void enableWorldGenForDimension( WorldGenType type, int dimID );
@@ -43,4 +38,9 @@ public interface IWorldGen
void disableWorldGenForDimension( WorldGenType type, int dimID ); void disableWorldGenForDimension( WorldGenType type, int dimID );
boolean isWorldGenEnabled( WorldGenType type, World w ); boolean isWorldGenEnabled( WorldGenType type, World w );
enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Meteorites
}
} }
@@ -42,10 +42,8 @@ public interface IMemoryCard
* localized when displayed. * localized when displayed.
* *
* @param is item * @param is item
* @param SettingsName * @param SettingsName unlocalized string that represents the tile entity.
* unlocalized string that represents the tile entity. * @param data may contain a String called "tooltip" which is is a
* @param data
* may contain a String called "tooltip" which is is a
* unlocalized string displayed after the settings name, optional * unlocalized string displayed after the settings name, optional
* but can be used to add details to the card for later. * but can be used to add details to the card for later.
*/ */
@@ -73,10 +71,8 @@ public interface IMemoryCard
/** /**
* notify the user of a outcome related to the memory card. * notify the user of a outcome related to the memory card.
* *
* @param player * @param player that used the card.
* that used the card. * @param msg which message to send.
* @param msg
* which message to send.
*/ */
void notifyUser( EntityPlayer player, MemoryCardMessages msg ); void notifyUser( EntityPlayer player, MemoryCardMessages msg );
} }
@@ -23,10 +23,12 @@
package appeng.api.implementations.tiles; package appeng.api.implementations.tiles;
import appeng.api.networking.IGridHost; import appeng.api.networking.IGridHost;
import appeng.api.storage.ICellContainer; import appeng.api.storage.ICellContainer;
import appeng.api.util.IOrientable; import appeng.api.util.IOrientable;
public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
{ {
@@ -45,6 +47,7 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
* 3 - red * 3 - red
* *
* @param slot slot index * @param slot slot index
*
* @return status of the slot, one of the above indices. * @return status of the slot, one of the above indices.
*/ */
int getCellStatus( int slot ); int getCellStatus( int slot );
@@ -56,8 +59,8 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
/** /**
* @param slot slot index * @param slot slot index
*
* @return is the cell currently blinking to show activity. * @return is the cell currently blinking to show activity.
*/ */
boolean isCellBlinking( int slot ); boolean isCellBlinking( int slot );
} }
@@ -29,6 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.crafting.ICraftingPatternDetails; import appeng.api.networking.crafting.ICraftingPatternDetails;
public interface ICraftingMachine public interface ICraftingMachine
{ {
@@ -50,5 +51,4 @@ public interface ICraftingMachine
* @return true, if pushPattern can complete, if its false push will always be false. * @return true, if pushPattern can complete, if its false push will always be false.
*/ */
boolean acceptsPlans(); boolean acceptsPlans();
} }
@@ -23,8 +23,10 @@
package appeng.api.implementations.tiles; package appeng.api.implementations.tiles;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
/** /**
* Crank/Crankable API, * Crank/Crankable API,
* *
@@ -54,5 +56,4 @@ public interface ICrankable
* @return true if the crank can attach on the given side. * @return true if the crank can attach on the given side.
*/ */
boolean canCrankAttach( ForgeDirection directionToCrank ); boolean canCrankAttach( ForgeDirection directionToCrank );
} }
@@ -23,6 +23,7 @@
package appeng.api.integration; package appeng.api.integration;
/** /**
* An interface to get access to the individual settings for AE's Internal Bee * An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler. * Comparison handler.
@@ -39,5 +40,4 @@ public interface IBeeComparison
* @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it. * @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it.
*/ */
Object getIndividual(); Object getIndividual();
} }
@@ -23,9 +23,11 @@
package appeng.api.movable; package appeng.api.movable;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
public interface IMovableHandler public interface IMovableHandler
{ {
@@ -35,6 +37,7 @@ public interface IMovableHandler
* *
* @param myClass tile entity class * @param myClass tile entity class
* @param tile tile entity * @param tile tile entity
*
* @return true if it can handle moving * @return true if it can handle moving
*/ */
boolean canHandle( Class<? extends TileEntity> myClass, TileEntity tile ); boolean canHandle( Class<? extends TileEntity> myClass, TileEntity tile );
@@ -63,5 +66,4 @@ public interface IMovableHandler
* @param z z coord of tile * @param z z coord of tile
*/ */
void moveTile( TileEntity tile, World world, int x, int y, int z ); void moveTile( TileEntity tile, World world, int x, int y, int z );
} }
@@ -23,9 +23,11 @@
package appeng.api.movable; package appeng.api.movable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
/** /**
* Used to determine if a tile is marked as movable, a block will be considered movable, if... * Used to determine if a tile is marked as movable, a block will be considered movable, if...
* *
@@ -78,6 +80,7 @@ public interface IMovableRegistry
/** /**
* @param te to be moved tile entity * @param te to be moved tile entity
*
* @return true if the tile has accepted your request to move it * @return true if the tile has accepted your request to move it
*/ */
boolean askToMove( TileEntity te ); boolean askToMove( TileEntity te );
@@ -102,6 +105,7 @@ public interface IMovableRegistry
* only valid after askToMove(...) = true * only valid after askToMove(...) = true
* *
* @param te tile entity * @param te tile entity
*
* @return moving handler of tile entity * @return moving handler of tile entity
*/ */
IMovableHandler getHandler( TileEntity te ); IMovableHandler getHandler( TileEntity te );
@@ -113,8 +117,8 @@ public interface IMovableRegistry
/** /**
* @param blk block * @param blk block
*
* @return true if this block is blacklisted * @return true if this block is blacklisted
*/ */
boolean isBlacklisted( Block blk ); boolean isBlacklisted( Block blk );
} }
@@ -23,9 +23,11 @@
package appeng.api.networking; package appeng.api.networking;
import appeng.api.networking.events.MENetworkEvent; import appeng.api.networking.events.MENetworkEvent;
import appeng.api.util.IReadOnlyCollection; import appeng.api.util.IReadOnlyCollection;
/** /**
* Gives you access to Grid based information. * Gives you access to Grid based information.
* *
@@ -38,6 +40,7 @@ public interface IGrid
* Get Access to various grid modules * Get Access to various grid modules
* *
* @param iface face * @param iface face
*
* @return the IGridCache you requested. * @return the IGridCache you requested.
*/ */
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface ); <C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
@@ -45,8 +48,8 @@ public interface IGrid
/** /**
* Post an event into the network event bus. * Post an event into the network event bus.
* *
* @param ev * @param ev - event to post
* - event to post *
* @return returns ev back to original poster * @return returns ev back to original poster
*/ */
MENetworkEvent postEvent( MENetworkEvent ev ); MENetworkEvent postEvent( MENetworkEvent ev );
@@ -54,8 +57,8 @@ public interface IGrid
/** /**
* Post an event into the network event bus, but direct it at a single node. * Post an event into the network event bus, but direct it at a single node.
* *
* @param ev * @param ev event to post
* event to post *
* @return returns ev back to original poster * @return returns ev back to original poster
*/ */
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev ); MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
@@ -72,6 +75,7 @@ public interface IGrid
* Get machines on the network. * Get machines on the network.
* *
* @param gridHostClass class of the grid host * @param gridHostClass class of the grid host
*
* @return IMachineSet of all nodes belonging to hosts of specified class. * @return IMachineSet of all nodes belonging to hosts of specified class.
*/ */
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass ); IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
@@ -90,5 +94,4 @@ public interface IGrid
* @return the node considered the pivot point of the grid. * @return the node considered the pivot point of the grid.
*/ */
IGridNode getPivot(); IGridNode getPivot();
} }
@@ -33,6 +33,7 @@ import appeng.api.parts.IPart;
import appeng.api.util.AEColor; import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord; import appeng.api.util.DimensionalCoord;
/** /**
* An Implementation is required to create your node for IGridHost * An Implementation is required to create your node for IGridHost
* *
@@ -23,14 +23,13 @@
package appeng.api.networking; package appeng.api.networking;
/** /**
*
* Allows you to create a network wise service, AE2 uses these for providing * Allows you to create a network wise service, AE2 uses these for providing
* item, spatial, and tunnel services. * item, spatial, and tunnel services.
* *
* Any Class that implements this, should have a public default constructor that * Any Class that implements this, should have a public default constructor that
* takes a single argument of type IGrid. * takes a single argument of type IGrid.
*
*/ */
public interface IGridCache public interface IGridCache
{ {
@@ -38,7 +37,6 @@ public interface IGridCache
/** /**
* Called each tick for the network, allows you to have active network wide * Called each tick for the network, allows you to have active network wide
* behaviors. * behaviors.
*
*/ */
void onUpdateTick(); void onUpdateTick();
@@ -90,5 +88,4 @@ public interface IGridCache
* @param destinationStorage storage * @param destinationStorage storage
*/ */
void populateGridStorage( IGridStorage destinationStorage ); void populateGridStorage( IGridStorage destinationStorage );
} }
@@ -23,8 +23,10 @@
package appeng.api.networking; package appeng.api.networking;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
/** /**
* Access to AE's internal grid connections. * Access to AE's internal grid connections.
* *
@@ -40,6 +42,7 @@ public interface IGridConnection
* lets you get the opposing node of the connection by passing your own node. * lets you get the opposing node of the connection by passing your own node.
* *
* @param gridNode current grid node * @param gridNode current grid node
*
* @return the IGridNode which represents the opposite side of the connection. * @return the IGridNode which represents the opposite side of the connection.
*/ */
IGridNode getOtherSide( IGridNode gridNode ); IGridNode getOtherSide( IGridNode gridNode );
@@ -48,6 +51,7 @@ public interface IGridConnection
* determine the direction of the connection based on your node. * determine the direction of the connection based on your node.
* *
* @param gridNode current grid node * @param gridNode current grid node
*
* @return the direction of the connection, only valid for in world connections. * @return the direction of the connection, only valid for in world connections.
*/ */
ForgeDirection getDirection( IGridNode gridNode ); ForgeDirection getDirection( IGridNode gridNode );
@@ -77,5 +81,4 @@ public interface IGridConnection
* @return how many channels pass over this connections. * @return how many channels pass over this connections.
*/ */
int getUsedChannels(); int getUsedChannels();
} }
@@ -23,15 +23,14 @@
package appeng.api.networking; package appeng.api.networking;
public interface IGridConnectionVisitor extends IGridVisitor public interface IGridConnectionVisitor extends IGridVisitor
{ {
/** /**
* Called for each connection on the network. * Called for each connection on the network.
* *
* @param n * @param n the connection.
* the connection.
*/ */
void visitConnection( IGridConnection n ); void visitConnection( IGridConnection n );
} }
@@ -30,11 +30,10 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart; import appeng.api.parts.IPart;
import appeng.api.util.AECableType; import appeng.api.util.AECableType;
/** /**
*
* Implement to create a networked {@link TileEntity} or {@link IPart} must * Implement to create a networked {@link TileEntity} or {@link IPart} must
* be implemented for a part, or tile entity to become part of a grid. * be implemented for a part, or tile entity to become part of a grid.
*
*/ */
public interface IGridHost public interface IGridHost
{ {
@@ -44,9 +43,9 @@ public interface IGridHost
* by returning a valid node later and calling updateState, you can join the * by returning a valid node later and calling updateState, you can join the
* Grid when your block is ready. * Grid when your block is ready.
* *
* @param dir * @param dir feel free to ignore this, most blocks will use the same node
* feel free to ignore this, most blocks will use the same node
* for every side. * for every side.
*
* @return a new IGridNode, create these with * @return a new IGridNode, create these with
* AEApi.INSTANCE().createGridNode( MyIGridBlock ) * AEApi.INSTANCE().createGridNode( MyIGridBlock )
*/ */
@@ -64,5 +63,4 @@ public interface IGridHost
* break this host, its violating security rules, just break your block, or part. * break this host, its violating security rules, just break your block, or part.
*/ */
void securityBreak(); void securityBreak();
} }
@@ -33,14 +33,13 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.IAppEngApi; import appeng.api.IAppEngApi;
import appeng.api.util.IReadOnlyCollection; import appeng.api.util.IReadOnlyCollection;
/** /**
*
* Gives you a view into your Nodes connections and information. * Gives you a view into your Nodes connections and information.
* *
* updateState, getGrid, destroy are required to implement a proper IGridHost. * updateState, getGrid, destroy are required to implement a proper IGridHost.
* *
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode * Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
*
*/ */
public interface IGridNode public interface IGridNode
{ {
@@ -61,7 +60,6 @@ public interface IGridNode
* *
* If your entity is not in the world, or if you IGridHost returns a different node for the same side you will * If your entity is not in the world, or if you IGridHost returns a different node for the same side you will
* likely crash the game. * likely crash the game.
*
*/ */
void updateState(); void updateState();
@@ -91,7 +89,6 @@ public interface IGridNode
World getWorld(); World getWorld();
/** /**
*
* @return a set of the connected sides, UNKNOWN represents an invisible connection * @return a set of the connected sides, UNKNOWN represents an invisible connection
*/ */
EnumSet<ForgeDirection> getConnectedSides(); EnumSet<ForgeDirection> getConnectedSides();
@@ -146,10 +143,16 @@ public interface IGridNode
* see if this node has a certain flag * see if this node has a certain flag
* *
* @param flag flags * @param flag flags
*
* @return true if has flag * @return true if has flag
*/ */
boolean hasFlag( GridFlags flag ); boolean hasFlag( GridFlags flag );
/**
* @return the ownerID this represents the person who placed the node.
*/
int getPlayerID();
/** /**
* tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the * tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the
* security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is saved with the Node NBT. * security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is saved with the Node NBT.
@@ -157,10 +160,4 @@ public interface IGridNode
* @param playerID new player id * @param playerID new player id
*/ */
void setPlayerID( int playerID ); void setPlayerID( int playerID );
/**
* @return the ownerID this represents the person who placed the node.
*/
int getPlayerID();
} }
@@ -23,6 +23,7 @@
package appeng.api.networking; package appeng.api.networking;
/** /**
* Simple Visitor pattern access to network nodes. * Simple Visitor pattern access to network nodes.
*/ */
@@ -34,11 +35,9 @@ public interface IGridVisitor
* *
* By returning false your informing the host to stop visiting nodes beyond the current node. * By returning false your informing the host to stop visiting nodes beyond the current node.
* *
* @param n * @param n the current node.
* the current node.
* *
* @return true to continue visiting nodes beyond this node. * @return true to continue visiting nodes beyond this node.
*/ */
boolean visitNode( IGridNode n ); boolean visitNode( IGridNode n );
} }
@@ -23,15 +23,14 @@
package appeng.api.networking.crafting; package appeng.api.networking.crafting;
public interface ICraftingCallback public interface ICraftingCallback
{ {
/** /**
* this call back is synchronized with the world you passed. * this call back is synchronized with the world you passed.
* *
* @param job * @param job - final job
* - final job
*/ */
void calculationComplete( ICraftingJob job ); void calculationComplete( ICraftingJob job );
} }
@@ -36,6 +36,7 @@ import appeng.api.networking.IGridCache;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
public interface ICraftingGrid extends IGridCache public interface ICraftingGrid extends IGridCache
{ {
@@ -44,6 +45,7 @@ public interface ICraftingGrid extends IGridCache
* @param world crafting world * @param world crafting world
* @param slot slot index * @param slot slot index
* @param details pattern details * @param details pattern details
*
* @return a collection of crafting patterns for the item in question. * @return a collection of crafting patterns for the item in question.
*/ */
ImmutableCollection<ICraftingPatternDetails> getCraftingFor( IAEItemStack whatToCraft, ICraftingPatternDetails details, int slot, World world ); ImmutableCollection<ICraftingPatternDetails> getCraftingFor( IAEItemStack whatToCraft, ICraftingPatternDetails details, int slot, World world );
@@ -66,19 +68,12 @@ public interface ICraftingGrid extends IGridCache
/** /**
* Submit the job to the Crafting system for processing. * Submit the job to the Crafting system for processing.
* *
* @param job * @param job - the crafting job from beginCraftingJob
* - the crafting job from beginCraftingJob * @param requestingMachine - a machine if its being requested via automation, may be null.
* @param requestingMachine * @param target - can be null
* - a machine if its being requested via automation, may be null. * @param prioritizePower - if cpu is null, this determine if the system should prioritize power, or if it should find the lower
* @param target
* - can be null
*
* @param prioritizePower
* - if cpu is null, this determine if the system should prioritize power, or if it should find the lower
* end cpus, automatic processes generally should pick lower end cpus. * end cpus, automatic processes generally should pick lower end cpus.
* * @param src - the action source to use when starting the job, this will be used for extracting items, should
* @param src
* - the action source to use when starting the job, this will be used for extracting items, should
* usually be the same as the one provided to beginCraftingJob. * usually be the same as the one provided to beginCraftingJob.
* *
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you send requestingMachine you need to * @return null ( if failed ) or an {@link ICraftingLink} other wise, if you send requestingMachine you need to
@@ -95,6 +90,7 @@ public interface ICraftingGrid extends IGridCache
/** /**
* @param what to be requested item * @param what to be requested item
*
* @return true if the item can be requested via a crafting emitter. * @return true if the item can be requested via a crafting emitter.
*/ */
boolean canEmitFor( IAEItemStack what ); boolean canEmitFor( IAEItemStack what );
@@ -103,8 +99,8 @@ public interface ICraftingGrid extends IGridCache
* is this item being crafted? * is this item being crafted?
* *
* @param aeStackInSlot item being crafted * @param aeStackInSlot item being crafted
*
* @return true if it is being crafting * @return true if it is being crafting
*/ */
boolean isRequesting( IAEItemStack aeStackInSlot ); boolean isRequesting( IAEItemStack aeStackInSlot );
} }
@@ -31,6 +31,7 @@ import net.minecraft.world.World;
import appeng.api.implementations.ICraftingPatternItem; import appeng.api.implementations.ICraftingPatternItem;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
/** /**
* do not implement provided by {@link ICraftingPatternItem} * do not implement provided by {@link ICraftingPatternItem}
* *
@@ -88,21 +89,22 @@ public interface ICraftingPatternDetails
* *
* @param craftingInv inventory * @param craftingInv inventory
* @param world crafting world * @param world crafting world
*
* @return the crafted ( work bench ) item. * @return the crafted ( work bench ) item.
*/ */
ItemStack getOutput( InventoryCrafting craftingInv, World world ); ItemStack getOutput( InventoryCrafting craftingInv, World world );
/**
* Set the priority the of this pattern.
*
* @param priority priority of pattern
*/
void setPriority(int priority);
/** /**
* Get the priority of this pattern * Get the priority of this pattern
* *
* @return the priority of this pattern * @return the priority of this pattern
*/ */
int getPriority(); int getPriority();
/**
* Set the priority the of this pattern.
*
* @param priority priority of pattern
*/
void setPriority( int priority );
} }
@@ -30,6 +30,7 @@ import appeng.api.config.Actionable;
import appeng.api.networking.security.IActionHost; import appeng.api.networking.security.IActionHost;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
public interface ICraftingRequester extends IActionHost public interface ICraftingRequester extends IActionHost
{ {
@@ -47,6 +48,7 @@ public interface ICraftingRequester extends IActionHost
* *
* @param items item * @param items item
* @param mode action mode * @param mode action mode
*
* @return unwanted item * @return unwanted item
*/ */
IAEItemStack injectCraftedItems( ICraftingLink link, IAEItemStack items, Actionable mode ); IAEItemStack injectCraftedItems( ICraftingLink link, IAEItemStack items, Actionable mode );
@@ -57,5 +59,4 @@ public interface ICraftingRequester extends IActionHost
* after this call the crafting link is "dead" and should be discarded. * after this call the crafting link is "dead" and should be discarded.
*/ */
void jobStateChange( ICraftingLink link ); void jobStateChange( ICraftingLink link );
} }
@@ -23,9 +23,11 @@
package appeng.api.networking.energy; package appeng.api.networking.energy;
import appeng.api.config.AccessRestriction; import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
/** /**
* Used to access information about AE's various power accepting blocks for monitoring purposes. * Used to access information about AE's various power accepting blocks for monitoring purposes.
*/ */
@@ -66,5 +68,4 @@ public interface IAEPowerStorage extends IEnergySource
* @return access restriction what the network can do * @return access restriction what the network can do
*/ */
AccessRestriction getPowerFlow(); AccessRestriction getPowerFlow();
} }
@@ -23,10 +23,12 @@
package appeng.api.networking.energy; package appeng.api.networking.energy;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.networking.IGridCache; import appeng.api.networking.IGridCache;
import appeng.api.networking.events.MENetworkPowerStatusChange; import appeng.api.networking.events.MENetworkPowerStatusChange;
/** /**
* AE's Power system. * AE's Power system.
*/ */
@@ -72,10 +74,9 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the * Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the
* reasons why keeping overflow to a minimum is important. * reasons why keeping overflow to a minimum is important.
* *
* @param amt * @param amt power to inject into the network
* power to inject into the network * @param mode should the action be simulated or performed?
* @param mode *
* should the action be simulated or performed?
* @return the amount of power that the network has OVER the limit. * @return the amount of power that the network has OVER the limit.
*/ */
double injectPower( double amt, Actionable mode ); double injectPower( double amt, Actionable mode );
@@ -101,5 +102,4 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* @return Amount of power required to charge the grid, in AE. * @return Amount of power required to charge the grid, in AE.
*/ */
double getEnergyDemand( double maxRequired ); double getEnergyDemand( double maxRequired );
} }
@@ -23,9 +23,11 @@
package appeng.api.networking.energy; package appeng.api.networking.energy;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier; import appeng.api.config.PowerMultiplier;
public interface IEnergySource public interface IEnergySource
{ {
@@ -34,8 +36,8 @@ public interface IEnergySource
* *
* @param amt extracted power * @param amt extracted power
* @param mode should the action be simulated or performed? * @param mode should the action be simulated or performed?
*
* @return returns extracted power. * @return returns extracted power.
*/ */
double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier ); double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
} }
@@ -23,8 +23,10 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
/** /**
* Posted by the network when the booting status of the network goes up * Posted by the network when the booting status of the network goes up
* or down, the change is reflected via {@link IGridNode}.isActive() * or down, the change is reflected via {@link IGridNode}.isActive()
@@ -23,6 +23,7 @@
package appeng.api.networking.events; package appeng.api.networking.events;
/** /**
* Posted by storage devices to inform AE to refresh its storage structure. * Posted by storage devices to inform AE to refresh its storage structure.
* *
@@ -23,8 +23,10 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.IGridHost; import appeng.api.networking.IGridHost;
/** /**
* Posted to the {@link IGridHost} when the channels on the node connections are altered. * Posted to the {@link IGridHost} when the channels on the node connections are altered.
* *
@@ -23,8 +23,10 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.IGrid; import appeng.api.networking.IGrid;
/** /**
* Part of AE's Event Bus. * Part of AE's Event Bus.
* *
@@ -23,8 +23,10 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
/** /**
* Implementers of a IGridBlock must post this event when your getIdlePowerUsage * Implementers of a IGridBlock must post this event when your getIdlePowerUsage
* starts returning a new value, if you do not post this event the network will * starts returning a new value, if you do not post this event the network will
@@ -37,8 +39,8 @@ public class MENetworkPowerIdleChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkPowerIdleChange(IGridNode nodeThatChanged) { public MENetworkPowerIdleChange( IGridNode nodeThatChanged )
{
this.node = nodeThatChanged; this.node = nodeThatChanged;
} }
} }
@@ -23,9 +23,11 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
import appeng.api.networking.energy.IEnergyGrid; import appeng.api.networking.energy.IEnergyGrid;
/** /**
* Posted by the network when the power status of the network goes up or down, * Posted by the network when the power status of the network goes up or down,
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via * the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
@@ -23,8 +23,10 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.networking.energy.IAEPowerStorage; import appeng.api.networking.energy.IAEPowerStorage;
/** /**
* informs the network, that a {@link IAEPowerStorage} block that had either run, * informs the network, that a {@link IAEPowerStorage} block that had either run,
* out of power, or was full, is no longer in that state. * out of power, or was full, is no longer in that state.
@@ -37,6 +39,15 @@ import appeng.api.networking.energy.IAEPowerStorage;
public class MENetworkPowerStorage extends MENetworkEvent public class MENetworkPowerStorage extends MENetworkEvent
{ {
public final IAEPowerStorage storage;
public final PowerEventType type;
public MENetworkPowerStorage( IAEPowerStorage t, PowerEventType y )
{
this.storage = t;
this.type = y;
}
public enum PowerEventType public enum PowerEventType
{ {
/** /**
@@ -49,13 +60,4 @@ public class MENetworkPowerStorage extends MENetworkEvent
*/ */
PROVIDE_POWER PROVIDE_POWER
} }
public final IAEPowerStorage storage;
public final PowerEventType type;
public MENetworkPowerStorage(IAEPowerStorage t, PowerEventType y) {
this.storage = t;
this.type = y;
}
} }
@@ -20,6 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * 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. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package appeng.api.networking.events; package appeng.api.networking.events;
@@ -23,9 +23,11 @@
package appeng.api.networking.events; package appeng.api.networking.events;
import appeng.api.storage.IMEMonitor; import appeng.api.storage.IMEMonitor;
import appeng.api.storage.StorageChannel; import appeng.api.storage.StorageChannel;
/** /**
* posted by the network when the networks Storage Changes, you can use the currentItems list to check levels, and * posted by the network when the networks Storage Changes, you can use the currentItems list to check levels, and
* update status. * update status.
@@ -40,9 +42,9 @@ public class MENetworkStorageEvent extends MENetworkEvent
public final IMEMonitor monitor; public final IMEMonitor monitor;
public final StorageChannel channel; public final StorageChannel channel;
public MENetworkStorageEvent(IMEMonitor o, StorageChannel chan) { public MENetworkStorageEvent( IMEMonitor o, StorageChannel chan )
{
this.monitor = o; this.monitor = o;
this.channel = chan; this.channel = chan;
} }
} }
@@ -29,6 +29,7 @@ import net.minecraft.entity.player.EntityPlayer;
import appeng.api.config.SecurityPermissions; import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGridCache; import appeng.api.networking.IGridCache;
public interface ISecurityGrid extends IGridCache public interface ISecurityGrid extends IGridCache
{ {
@@ -61,5 +62,4 @@ public interface ISecurityGrid extends IGridCache
* @return PlayerID of the admin, or owner, this is the person who placed the security block. * @return PlayerID of the admin, or owner, this is the person who placed the security block.
*/ */
int getOwner(); int getOwner();
} }
@@ -28,6 +28,7 @@ import java.util.EnumSet;
import appeng.api.config.SecurityPermissions; import appeng.api.config.SecurityPermissions;
/** /**
* Used by vanilla Security Terminal to post biometric data into the security cache. * Used by vanilla Security Terminal to post biometric data into the security cache.
*/ */
@@ -41,5 +42,4 @@ public interface ISecurityRegistry
* @param permissions permissions of player * @param permissions permissions of player
*/ */
void addPlayer( int PlayerID, EnumSet<SecurityPermissions> permissions ); void addPlayer( int PlayerID, EnumSet<SecurityPermissions> permissions );
} }
@@ -29,14 +29,14 @@ public class MachineSource extends BaseActionSource
public final IActionHost via; public final IActionHost via;
public MachineSource( IActionHost v )
{
this.via = v;
}
@Override @Override
public boolean isMachine() public boolean isMachine()
{ {
return true; return true;
} }
public MachineSource( IActionHost v )
{
this.via = v;
}
} }
@@ -33,15 +33,15 @@ public class PlayerSource extends BaseActionSource
public final EntityPlayer player; public final EntityPlayer player;
public final IActionHost via; public final IActionHost via;
@Override
public boolean isPlayer()
{
return true;
}
public PlayerSource( EntityPlayer p, IActionHost v ) public PlayerSource( EntityPlayer p, IActionHost v )
{ {
this.player = p; this.player = p;
this.via = v; this.via = v;
} }
@Override
public boolean isPlayer()
{
return true;
}
} }
@@ -23,11 +23,13 @@
package appeng.api.networking.storage; package appeng.api.networking.storage;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.StorageChannel; import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
public interface IStackWatcherHost public interface IStackWatcherHost
{ {
@@ -49,5 +51,4 @@ public interface IStackWatcherHost
* @param chan storage channel * @param chan storage channel
*/ */
void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan ); void onStackChange( IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan );
} }
@@ -23,6 +23,7 @@
package appeng.api.networking.storage; package appeng.api.networking.storage;
import appeng.api.networking.IGridCache; import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost; import appeng.api.networking.IGridHost;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
@@ -32,6 +33,7 @@ import appeng.api.storage.IStorageMonitorable;
import appeng.api.storage.StorageChannel; import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
/** /**
* Common base class for item / fluid storage caches. * Common base class for item / fluid storage caches.
*/ */
@@ -64,5 +66,4 @@ public interface IStorageGrid extends IGridCache, IStorageMonitorable
* remove a provider added with addCellContainer * remove a provider added with addCellContainer
*/ */
void unregisterCellProvider( ICellProvider cc ); void unregisterCellProvider( ICellProvider cc );
} }
@@ -23,8 +23,10 @@
package appeng.api.networking.ticking; package appeng.api.networking.ticking;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
/** /**
* Implement on IGridHosts which want to use AE's Network Ticking Feature. * Implement on IGridHosts which want to use AE's Network Ticking Feature.
*/ */
@@ -53,7 +55,6 @@ public interface IGridTickable
* reset it. * reset it.
* *
* @return null or a valid new TickingRequest * @return null or a valid new TickingRequest
*
*/ */
TickingRequest getTickingRequest( IGridNode node ); TickingRequest getTickingRequest( IGridNode node );
@@ -66,14 +67,11 @@ public interface IGridTickable
* *
* Note: this is never called if you return null from getTickingRequest. * Note: this is never called if you return null from getTickingRequest.
* *
* @param TicksSinceLastCall * @param TicksSinceLastCall the number of world ticks that were skipped since your last
* the number of world ticks that were skipped since your last
* tick, you can use this to adjust speed of processing or adjust * tick, you can use this to adjust speed of processing or adjust
* your tick rate. * your tick rate.
* *
* @return tick rate adjustment. * @return tick rate adjustment.
*
*/ */
TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall ); TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall );
} }
@@ -23,13 +23,13 @@
package appeng.api.networking.ticking; package appeng.api.networking.ticking;
import appeng.api.networking.IGridCache; import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
/** /**
*
* The network tick manager. * The network tick manager.
*
*/ */
public interface ITickManager extends IGridCache public interface ITickManager extends IGridCache
{ {
@@ -45,7 +45,6 @@ public interface ITickManager extends IGridCache
boolean alertDevice( IGridNode node ); boolean alertDevice( IGridNode node );
/** /**
*
* disables ticking for your device. * disables ticking for your device.
* *
* @param node gridnode * @param node gridnode
@@ -55,7 +54,6 @@ public interface ITickManager extends IGridCache
boolean sleepDevice( IGridNode node ); boolean sleepDevice( IGridNode node );
/** /**
*
* enables ticking for your device, undoes a sleepDevice call. * enables ticking for your device, undoes a sleepDevice call.
* *
* @param node gridnode * @param node gridnode
@@ -63,5 +61,4 @@ public interface ITickManager extends IGridCache
* @return if the call was successful. * @return if the call was successful.
*/ */
boolean wakeDevice( IGridNode node ); boolean wakeDevice( IGridNode node );
} }
@@ -23,10 +23,9 @@
package appeng.api.networking.ticking; package appeng.api.networking.ticking;
/** /**
*
* Describes how your tiles ticking is executed. * Describes how your tiles ticking is executed.
*
*/ */
public class TickingRequest public class TickingRequest
{ {
@@ -37,7 +36,6 @@ public class TickingRequest
* Valid Values are : 1+ * Valid Values are : 1+
* *
* Suggested is 5-20 * Suggested is 5-20
*
*/ */
public final int minTickRate; public final int minTickRate;
@@ -48,30 +46,25 @@ public class TickingRequest
* Valid Values are 1+ * Valid Values are 1+
* *
* Suggested is 20-40 * Suggested is 20-40
*
*/ */
public final int maxTickRate; public final int maxTickRate;
/** /**
*
* Determines the current expected state of your node, if your node expects * Determines the current expected state of your node, if your node expects
* to be sleeping, then return true. * to be sleeping, then return true.
*
*/ */
public final boolean isSleeping; public final boolean isSleeping;
/** /**
*
* True only if you call {@link ITickManager}.alertDevice( IGridNode ); * True only if you call {@link ITickManager}.alertDevice( IGridNode );
*
*/ */
public final boolean canBeAlerted; public final boolean canBeAlerted;
public TickingRequest(int min, int max, boolean sleep, boolean alertable) { public TickingRequest( int min, int max, boolean sleep, boolean alertable )
{
this.minTickRate = min; this.minTickRate = min;
this.maxTickRate = max; this.maxTickRate = max;
this.isSleeping = sleep; this.isSleeping = sleep;
this.canBeAlerted = alertable; this.canBeAlerted = alertable;
} }
} }
@@ -31,6 +31,7 @@ import io.netty.buffer.ByteBuf;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
/** /**
* Used Internally. * Used Internally.
* *
@@ -72,7 +73,9 @@ public interface IFacadeContainer
* read from stream * read from stream
* *
* @param data to be read data * @param data to be read data
*
* @return true if it was readable * @return true if it was readable
*
* @throws IOException * @throws IOException
*/ */
boolean readFromStream( ByteBuf data ) throws IOException; boolean readFromStream( ByteBuf data ) throws IOException;
@@ -88,6 +91,7 @@ public interface IFacadeContainer
* write to stream * write to stream
* *
* @param data to be written data * @param data to be written data
*
* @throws IOException * @throws IOException
*/ */
void writeToStream( ByteBuf data ) throws IOException; void writeToStream( ByteBuf data ) throws IOException;
@@ -96,5 +100,4 @@ public interface IFacadeContainer
* @return true if there are no facades. * @return true if there are no facades.
*/ */
boolean isEmpty(); boolean isEmpty();
} }
@@ -34,6 +34,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
/** /**
* Used Internally. * Used Internally.
* *
@@ -98,5 +99,4 @@ public interface IFacadePart
void setThinFacades( boolean useThinFacades ); void setThinFacades( boolean useThinFacades );
boolean isTransparent(); boolean isTransparent();
} }
@@ -23,8 +23,10 @@
package appeng.api.parts; package appeng.api.parts;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
public interface IPartCollisionHelper public interface IPartCollisionHelper
{ {
@@ -61,5 +63,4 @@ public interface IPartCollisionHelper
* @return true if this test is to get the BB Collision information. * @return true if this test is to get the BB Collision information.
*/ */
boolean isBBCollision(); boolean isBBCollision();
} }
@@ -23,10 +23,12 @@
package appeng.api.parts; package appeng.api.parts;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
public interface IPartHelper public interface IPartHelper
{ {
@@ -73,6 +75,7 @@ public interface IPartHelper
* @param side side which the part should be on * @param side side which the part should be on
* @param player player placing part * @param player player placing part
* @param world part in world * @param world part in world
*
* @return true if placing was successful * @return true if placing was successful
*/ */
boolean placeBus( ItemStack is, int x, int y, int z, int side, EntityPlayer player, World world ); boolean placeBus( ItemStack is, int x, int y, int z, int side, EntityPlayer player, World world );
+7 -2
View File
@@ -35,6 +35,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.AEColor; import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord; import appeng.api.util.DimensionalCoord;
/** /**
* Implemented on AE's TileEntity or AE's FMP Part. * Implemented on AE's TileEntity or AE's FMP Part.
* *
@@ -54,6 +55,7 @@ public interface IPartHost
* *
* @param part to be added part * @param part to be added part
* @param side part placed onto side * @param side part placed onto side
*
* @return returns false if the part cannot be added. * @return returns false if the part cannot be added.
*/ */
boolean canAddPart( ItemStack part, ForgeDirection side ); boolean canAddPart( ItemStack part, ForgeDirection side );
@@ -64,6 +66,7 @@ public interface IPartHost
* @param is new part * @param is new part
* @param side onto side * @param side onto side
* @param owner with owning player * @param owner with owning player
*
* @return null if the item failed to add, the side it was placed on other wise ( may different for cables, * @return null if the item failed to add, the side it was placed on other wise ( may different for cables,
* {@link ForgeDirection}.UNKNOWN ) * {@link ForgeDirection}.UNKNOWN )
*/ */
@@ -73,6 +76,7 @@ public interface IPartHost
* Get part by side ( center is {@link ForgeDirection}.UNKNOWN ) * Get part by side ( center is {@link ForgeDirection}.UNKNOWN )
* *
* @param side side of part * @param side side of part
*
* @return the part located on the specified side, or null if there is no part. * @return the part located on the specified side, or null if there is no part.
*/ */
IPart getPart( ForgeDirection side ); IPart getPart( ForgeDirection side );
@@ -84,8 +88,7 @@ public interface IPartHost
* if you want to drop the part you must request it prior to removing it. * if you want to drop the part you must request it prior to removing it.
* *
* @param side side of part * @param side side of part
* @param suppressUpdate * @param suppressUpdate - used if you need to replace a part's INSTANCE, without really removing it first.
* - used if you need to replace a part's INSTANCE, without really removing it first.
*/ */
void removePart( ForgeDirection side, boolean suppressUpdate ); void removePart( ForgeDirection side, boolean suppressUpdate );
@@ -126,6 +129,7 @@ public interface IPartHost
* finds the part located at the position ( pos must be relative, not global ) * finds the part located at the position ( pos must be relative, not global )
* *
* @param pos part position * @param pos part position
*
* @return a new SelectedPart, this is never null. * @return a new SelectedPart, this is never null.
*/ */
SelectedPart selectPart( Vec3 pos ); SelectedPart selectPart( Vec3 pos );
@@ -144,6 +148,7 @@ public interface IPartHost
* get the redstone state of host on this side, this value is cached internally. * get the redstone state of host on this side, this value is cached internally.
* *
* @param side side of part * @param side side of part
*
* @return true of the part host is receiving redstone from an external source. * @return true of the part host is receiving redstone from an external source.
*/ */
boolean hasRedstone( ForgeDirection side ); boolean hasRedstone( ForgeDirection side );
+2 -2
View File
@@ -26,8 +26,9 @@ package appeng.api.parts;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
//@formatter:off //@formatter:off
/** /**
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack * This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
* *
@@ -51,7 +52,6 @@ import net.minecraft.item.ItemStack;
* } * }
* </code> * </code>
* </pre> * </pre>
*
*/ */
public interface IPartItem public interface IPartItem
{ {
@@ -34,6 +34,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
public interface IPartRenderHelper public interface IPartRenderHelper
{ {
@@ -199,5 +200,4 @@ public interface IPartRenderHelper
* @param complementOf sides to render * @param complementOf sides to render
*/ */
void setFacesToRender( EnumSet<ForgeDirection> complementOf ); void setFacesToRender( EnumSet<ForgeDirection> complementOf );
} }
+2 -1
View File
@@ -29,6 +29,7 @@ import java.util.Set;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
/** /**
* All Layers must extends this, this get part implementation is provided to interface with the parts, however a real * All Layers must extends this, this get part implementation is provided to interface with the parts, however a real
* implementation will be used at runtime. * implementation will be used at runtime.
@@ -42,6 +43,7 @@ public abstract class LayerBase extends TileEntity // implements IPartHost
* This Method looks silly, that is because its not used at runtime, a real implementation will be used instead. * This Method looks silly, that is because its not used at runtime, a real implementation will be used instead.
* *
* @param side side of part * @param side side of part
*
* @return the part for the requested side. * @return the part for the requested side.
*/ */
public IPart getPart( ForgeDirection side ) public IPart getPart( ForgeDirection side )
@@ -75,5 +77,4 @@ public abstract class LayerBase extends TileEntity // implements IPartHost
{ {
// something! // something!
} }
} }
@@ -30,6 +30,7 @@ import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RecipeError; import appeng.api.exceptions.RecipeError;
import appeng.api.exceptions.RegistrationError; import appeng.api.exceptions.RegistrationError;
public interface ICraftHandler public interface ICraftHandler
{ {
@@ -38,6 +39,7 @@ public interface ICraftHandler
* *
* @param input parsed inputs * @param input parsed inputs
* @param output parsed outputs * @param output parsed outputs
*
* @throws RecipeError * @throws RecipeError
*/ */
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError; void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
@@ -49,5 +51,4 @@ public interface ICraftHandler
* @throws MissingIngredientError * @throws MissingIngredientError
*/ */
void register() throws RegistrationError, MissingIngredientError; void register() throws RegistrationError, MissingIngredientError;
} }
@@ -29,7 +29,9 @@ import net.minecraft.item.ItemStack;
import appeng.api.exceptions.MissingIngredientError; import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RegistrationError; import appeng.api.exceptions.RegistrationError;
public interface IIngredient {
public interface IIngredient
{
/** /**
* Acquire a single input stack for the current recipe, if more then one ItemStack is possible a * Acquire a single input stack for the current recipe, if more then one ItemStack is possible a
@@ -47,6 +49,7 @@ public interface IIngredient {
* multiple inputs per slot. * multiple inputs per slot.
* *
* @return an array of ItemStacks for the recipe handler. * @return an array of ItemStacks for the recipe handler.
*
* @throws RegistrationError * @throws RegistrationError
* @throws MissingIngredientError * @throws MissingIngredientError
*/ */
@@ -81,9 +84,9 @@ public interface IIngredient {
/** /**
* Bakes the lists in for faster runtime look-ups. * Bakes the lists in for faster runtime look-ups.
*
* @throws MissingIngredientError * @throws MissingIngredientError
* @throws RegistrationError * @throws RegistrationError
*/ */
void bake() throws RegistrationError, MissingIngredientError; void bake() throws RegistrationError, MissingIngredientError;
} }
@@ -33,6 +33,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.implementations.tiles.IChestOrDrive; import appeng.api.implementations.tiles.IChestOrDrive;
/** /**
* Registration record for {@link ICellRegistry} * Registration record for {@link ICellRegistry}
*/ */
@@ -44,6 +45,7 @@ public interface ICellHandler
* request a handler ) * request a handler )
* *
* @param is to be checked item * @param is to be checked item
*
* @return return true, if getCellHandler will not return null. * @return return true, if getCellHandler will not return null.
*/ */
boolean isCell( ItemStack is ); boolean isCell( ItemStack is );
@@ -51,13 +53,10 @@ public interface ICellHandler
/** /**
* If you cannot handle the provided item, return null * If you cannot handle the provided item, return null
* *
* @param is * @param is a storage cell item.
* a storage cell item. * @param host anytime the contents of your storage cell changes it should use this to request a save, please
* @param host
* anytime the contents of your storage cell changes it should use this to request a save, please
* note, this value can be null. * note, this value can be null.
* @param channel * @param channel the storage channel requested.
* the storage channel requested.
* *
* @return a new IMEHandler for the provided item * @return a new IMEHandler for the provided item
*/ */
@@ -88,7 +87,6 @@ public interface ICellHandler
IIcon getTopTexture_Dark(); IIcon getTopTexture_Dark();
/** /**
*
* Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item * Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item
* is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open * is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open
* your gui and display the cell to the user. * your gui and display the cell to the user.
@@ -122,5 +120,4 @@ public interface ICellHandler
* @return the ae/t to drain for this storage cell inside a chest/drive. * @return the ae/t to drain for this storage cell inside a chest/drive.
*/ */
double cellIdleDrain( ItemStack is, IMEInventory handler ); double cellIdleDrain( ItemStack is, IMEInventory handler );
} }
@@ -23,8 +23,10 @@
package appeng.api.storage; package appeng.api.storage;
import java.util.List; import java.util.List;
/** /**
* Allows you to provide cells via non IGridHosts directly to the storage system, drives, and similar features should go * Allows you to provide cells via non IGridHosts directly to the storage system, drives, and similar features should go
* though {@link ICellContainer} and be automatically handled by the storage system. * though {@link ICellContainer} and be automatically handled by the storage system.
@@ -48,5 +50,4 @@ public interface ICellProvider
* Positive and negative are supported * Positive and negative are supported
*/ */
int getPriority(); int getPriority();
} }
@@ -28,6 +28,7 @@ import net.minecraft.item.ItemStack;
import appeng.api.IAppEngApi; import appeng.api.IAppEngApi;
/** /**
* Storage Cell Registry, used for specially implemented cells, if you just want to make a item act like a cell, or new * Storage Cell Registry, used for specially implemented cells, if you just want to make a item act like a cell, or new
* cell with different bytes, then you should probably consider IStorageCell instead its considerably simpler. * cell with different bytes, then you should probably consider IStorageCell instead its considerably simpler.
@@ -48,6 +49,7 @@ public interface ICellRegistry
* return true, if you can get a InventoryHandler for the item passed. * return true, if you can get a InventoryHandler for the item passed.
* *
* @param is to be checked item * @param is to be checked item
*
* @return true if the provided item, can be handled by a handler in AE, ( AE May choose to skip this and just get * @return true if the provided item, can be handled by a handler in AE, ( AE May choose to skip this and just get
* the handler instead. ) * the handler instead. )
*/ */
@@ -57,6 +59,7 @@ public interface ICellRegistry
* get the handler, for the requested type. * get the handler, for the requested type.
* *
* @param is to be checked item * @param is to be checked item
*
* @return the handler registered for this item type. * @return the handler registered for this item type.
*/ */
ICellHandler getHandler( ItemStack is ); ICellHandler getHandler( ItemStack is );
@@ -71,5 +74,4 @@ public interface ICellRegistry
* @return new IMEInventoryHandler, or null if there isn't one. * @return new IMEInventoryHandler, or null if there isn't one.
*/ */
IMEInventoryHandler getCellInventory( ItemStack is, ISaveProvider host, StorageChannel chan ); IMEInventoryHandler getCellInventory( ItemStack is, ISaveProvider host, StorageChannel chan );
} }
@@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
import appeng.api.config.FuzzyMode; import appeng.api.config.FuzzyMode;
public interface ICellWorkbenchItem public interface ICellWorkbenchItem
{ {
@@ -36,6 +37,7 @@ public interface ICellWorkbenchItem
* if this return false, the item will not be treated as a cell, and cannot be inserted into the work bench. * if this return false, the item will not be treated as a cell, and cannot be inserted into the work bench.
* *
* @param is item * @param is item
*
* @return true if the item should be editable in the cell workbench. * @return true if the item should be editable in the cell workbench.
*/ */
boolean isEditable( ItemStack is ); boolean isEditable( ItemStack is );
@@ -66,5 +68,4 @@ public interface ICellWorkbenchItem
* sets the setting on the cell. * sets the setting on the cell.
*/ */
void setFuzzyMode( ItemStack is, FuzzyMode fzMode ); void setFuzzyMode( ItemStack is, FuzzyMode fzMode );
} }
@@ -29,6 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
/** /**
* A Registration Record for {@link IExternalStorageRegistry} * A Registration Record for {@link IExternalStorageRegistry}
*/ */
@@ -41,6 +42,7 @@ public interface IExternalStorageHandler
* *
* @param te to be handled tile entity * @param te to be handled tile entity
* @param mySrc source * @param mySrc source
*
* @return true, if it can get a handler via getInventory * @return true, if it can get a handler via getInventory
*/ */
boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc ); boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc );
@@ -55,8 +57,8 @@ public interface IExternalStorageHandler
* @param d direction * @param d direction
* @param channel channel * @param channel channel
* @param src source * @param src source
*
* @return The Handler for the inventory * @return The Handler for the inventory
*/ */
IMEInventory getInventory( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src ); IMEInventory getInventory( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src );
} }
@@ -30,6 +30,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.IAppEngApi; import appeng.api.IAppEngApi;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
/** /**
* A Registry of External Storage handlers. * A Registry of External Storage handlers.
* *
@@ -50,8 +51,8 @@ public interface IExternalStorageRegistry
* @param opposite direction * @param opposite direction
* @param channel channel * @param channel channel
* @param mySrc source * @param mySrc source
*
* @return the handler for a given tile / forge direction * @return the handler for a given tile / forge direction
*/ */
IExternalStorageHandler getHandler( TileEntity te, ForgeDirection opposite, StorageChannel channel, BaseActionSource mySrc ); IExternalStorageHandler getHandler( TileEntity te, ForgeDirection opposite, StorageChannel channel, BaseActionSource mySrc );
} }
@@ -23,11 +23,13 @@
package appeng.api.storage; package appeng.api.storage;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.networking.security.BaseActionSource; import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
/** /**
* AE's Equivalent to IInventory, used to reading contents, and manipulating contents of ME Inventories. * AE's Equivalent to IInventory, used to reading contents, and manipulating contents of ME Inventories.
* *
@@ -47,6 +49,7 @@ public interface IMEInventory<StackType extends IAEStack>
* @param input item to add. * @param input item to add.
* @param type action type * @param type action type
* @param src action source * @param src action source
*
* @return returns the number of items not added. * @return returns the number of items not added.
*/ */
StackType injectItems( StackType input, Actionable type, BaseActionSource src ); StackType injectItems( StackType input, Actionable type, BaseActionSource src );
@@ -54,10 +57,9 @@ public interface IMEInventory<StackType extends IAEStack>
/** /**
* Extract the specified item from the ME Inventory * Extract the specified item from the ME Inventory
* *
* @param request * @param request item to request ( with stack size. )
* item to request ( with stack size. ) * @param mode simulate, or perform action?
* @param mode *
* simulate, or perform action?
* @return returns the number of items extracted, null * @return returns the number of items extracted, null
*/ */
StackType extractItems( StackType request, Actionable mode, BaseActionSource src ); StackType extractItems( StackType request, Actionable mode, BaseActionSource src );
@@ -65,8 +67,8 @@ public interface IMEInventory<StackType extends IAEStack>
/** /**
* request a full report of all available items, storage. * request a full report of all available items, storage.
* *
* @param out * @param out the IItemList the results will be written too
* the IItemList the results will be written too *
* @return returns same list that was passed in, is passed out * @return returns same list that was passed in, is passed out
*/ */
IItemList<StackType> getAvailableItems( IItemList<StackType> out ); IItemList<StackType> getAvailableItems( IItemList<StackType> out );
@@ -75,5 +77,4 @@ public interface IMEInventory<StackType extends IAEStack>
* @return the type of channel your handler should be part of * @return the type of channel your handler should be part of
*/ */
StorageChannel getChannel(); StorageChannel getChannel();
} }
@@ -23,9 +23,11 @@
package appeng.api.storage; package appeng.api.storage;
import appeng.api.config.AccessRestriction; import appeng.api.config.AccessRestriction;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
/** /**
* Thin logic layer that can be swapped with different IMEInventory implementations, used to handle features related to * Thin logic layer that can be swapped with different IMEInventory implementations, used to handle features related to
* storage, that are Separate from the storage medium itself. * storage, that are Separate from the storage medium itself.
@@ -46,8 +48,8 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this * determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
* inventory prior to any non-prioritized inventories. * inventory prior to any non-prioritized inventories.
* *
* @param input * @param input - item that might be added
* - item that might be added *
* @return if its prioritized * @return if its prioritized
*/ */
boolean isPrioritized( StackType input ); boolean isPrioritized( StackType input );
@@ -55,8 +57,8 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
/** /**
* determine if an item can be accepted and stored. * determine if an item can be accepted and stored.
* *
* @param input * @param input - item that might be added
* - item that might be added *
* @return if the item can be added * @return if the item can be added
*/ */
boolean canAccept( StackType input ); boolean canAccept( StackType input );
@@ -82,8 +84,8 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* belongs, however in some cases you can save processor time, or require that the second, or first pass is simply * belongs, however in some cases you can save processor time, or require that the second, or first pass is simply
* ignored, this allows you to do that. * ignored, this allows you to do that.
* *
* @param i * @param i - pass number ( 1 or 2 )
* - pass number ( 1 or 2 ) *
* @return true, if this inventory is valid for this pass. * @return true, if this inventory is valid for this pass.
*/ */
boolean validForPass( int i ); boolean validForPass( int i );
@@ -40,6 +40,7 @@ import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
public interface IStorageHelper public interface IStorageHelper
{ {
@@ -47,21 +48,20 @@ public interface IStorageHelper
* load a crafting link from nbt data. * load a crafting link from nbt data.
* *
* @param data to be loaded data * @param data to be loaded data
*
* @return crafting link * @return crafting link
*/ */
ICraftingLink loadCraftingLink( NBTTagCompound data, ICraftingRequester req ); ICraftingLink loadCraftingLink( NBTTagCompound data, ICraftingRequester req );
/** /**
* @param is * @param is An ItemStack
* An ItemStack
* *
* @return a new INSTANCE of {@link IAEItemStack} from a MC {@link ItemStack} * @return a new INSTANCE of {@link IAEItemStack} from a MC {@link ItemStack}
*/ */
IAEItemStack createItemStack( ItemStack is ); IAEItemStack createItemStack( ItemStack is );
/** /**
* @param is * @param is A FluidStack
* A FluidStack
* *
* @return a new INSTANCE of {@link IAEFluidStack} from a Forge {@link FluidStack} * @return a new INSTANCE of {@link IAEFluidStack} from a Forge {@link FluidStack}
*/ */
@@ -81,7 +81,9 @@ public interface IStorageHelper
* Read a AE Item Stack from a byte stream, returns a AE item stack or null. * Read a AE Item Stack from a byte stream, returns a AE item stack or null.
* *
* @param input to be loaded data * @param input to be loaded data
*
* @return item based of data * @return item based of data
*
* @throws IOException if file could not be read * @throws IOException if file could not be read
*/ */
IAEItemStack readItemFromPacket( ByteBuf input ) throws IOException; IAEItemStack readItemFromPacket( ByteBuf input ) throws IOException;
@@ -90,7 +92,9 @@ public interface IStorageHelper
* Read a AE Fluid Stack from a byte stream, returns a AE fluid stack or null. * Read a AE Fluid Stack from a byte stream, returns a AE fluid stack or null.
* *
* @param input to be loaded data * @param input to be loaded data
*
* @return fluid based on data * @return fluid based on data
*
* @throws IOException if file could not be written * @throws IOException if file could not be written
*/ */
IAEFluidStack readFluidFromPacket( ByteBuf input ) throws IOException; IAEFluidStack readFluidFromPacket( ByteBuf input ) throws IOException;
@@ -102,6 +106,7 @@ public interface IStorageHelper
* @param cell cell of requested items * @param cell cell of requested items
* @param request requested items * @param request requested items
* @param src action source * @param src action source
*
* @return items that successfully extracted. * @return items that successfully extracted.
*/ */
IAEItemStack poweredExtraction( IEnergySource energy, IMEInventory<IAEItemStack> cell, IAEItemStack request, BaseActionSource src ); IAEItemStack poweredExtraction( IEnergySource energy, IMEInventory<IAEItemStack> cell, IAEItemStack request, BaseActionSource src );
@@ -113,8 +118,8 @@ public interface IStorageHelper
* @param cell injected cell * @param cell injected cell
* @param input to be injected items * @param input to be injected items
* @param src action source * @param src action source
*
* @return items that failed to insert. * @return items that failed to insert.
*/ */
IAEItemStack poweredInsert( IEnergySource energy, IMEInventory<IAEItemStack> cell, IAEItemStack input, BaseActionSource src ); IAEItemStack poweredInsert( IEnergySource energy, IMEInventory<IAEItemStack> cell, IAEItemStack input, BaseActionSource src );
} }
@@ -23,10 +23,12 @@
package appeng.api.storage; package appeng.api.storage;
import appeng.api.implementations.tiles.ITileStorageMonitorable; import appeng.api.implementations.tiles.ITileStorageMonitorable;
import appeng.api.storage.data.IAEFluidStack; import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
/** /**
* represents the internal behavior of a {@link ITileStorageMonitorable} use it to get this value for a tile, or part. * represents the internal behavior of a {@link ITileStorageMonitorable} use it to get this value for a tile, or part.
* *
@@ -44,5 +46,4 @@ public interface IStorageMonitorable
* Access the fluid inventory for the monitorable storage. * Access the fluid inventory for the monitorable storage.
*/ */
IMEMonitor<IAEFluidStack> getFluidInventory(); IMEMonitor<IAEFluidStack> getFluidInventory();
} }
@@ -36,6 +36,7 @@ import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
/** /**
* Common implementation of a simple class that monitors injection/extraction of a inventory to send events to a list of * Common implementation of a simple class that monitors injection/extraction of a inventory to send events to a list of
* listeners. * listeners.
@@ -51,57 +52,14 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
protected boolean hasChanged = true; protected boolean hasChanged = true;
protected IMEInventoryHandler<StackType> getHandler() public MEMonitorHandler( IMEInventoryHandler<StackType> t )
{ {
return this.internalHandler;
}
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
{
return this.listeners.entrySet().iterator();
}
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src)
{
this.notifyListenersOfChange( changes, src );
}
protected void notifyListenersOfChange(Iterable<StackType> diff, BaseActionSource src)
{
this.hasChanged = true;// need to update the cache.
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
while (i.hasNext())
{
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
if ( receiver.isValid( o.getValue() ) )
receiver.postChange( this, diff, src );
else
i.remove();
}
}
private StackType monitorDifference(IAEStack original, StackType leftOvers, boolean extraction, BaseActionSource src)
{
StackType diff = (StackType) original.copy();
if ( extraction )
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
else if ( leftOvers != null )
diff.decStackSize( leftOvers.getStackSize() );
if ( diff.getStackSize() != 0 )
this.postChangesToListeners( ImmutableList.of( diff ), src );
return leftOvers;
}
public MEMonitorHandler(IMEInventoryHandler<StackType> t) {
this.internalHandler = t; this.internalHandler = t;
this.cachedList = (IItemList<StackType>) t.getChannel().createList(); this.cachedList = (IItemList<StackType>) t.getChannel().createList();
} }
public MEMonitorHandler(IMEInventoryHandler<StackType> t, StorageChannel chan) { public MEMonitorHandler( IMEInventoryHandler<StackType> t, StorageChannel chan )
{
this.internalHandler = t; this.internalHandler = t;
this.cachedList = (IItemList<StackType>) chan.createList(); this.cachedList = (IItemList<StackType>) chan.createList();
} }
@@ -126,6 +84,51 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
return this.monitorDifference( input.copy(), this.getHandler().injectItems( input, mode, src ), false, src ); return this.monitorDifference( input.copy(), this.getHandler().injectItems( input, mode, src ), false, src );
} }
protected IMEInventoryHandler<StackType> getHandler()
{
return this.internalHandler;
}
private StackType monitorDifference( IAEStack original, StackType leftOvers, boolean extraction, BaseActionSource src )
{
StackType diff = (StackType) original.copy();
if( extraction )
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
else if( leftOvers != null )
diff.decStackSize( leftOvers.getStackSize() );
if( diff.getStackSize() != 0 )
this.postChangesToListeners( ImmutableList.of( diff ), src );
return leftOvers;
}
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src )
{
this.notifyListenersOfChange( changes, src );
}
protected void notifyListenersOfChange( Iterable<StackType> diff, BaseActionSource src )
{
this.hasChanged = true;// need to update the cache.
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
while( i.hasNext() )
{
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
if( receiver.isValid( o.getValue() ) )
receiver.postChange( this, diff, src );
else
i.remove();
}
}
protected Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> getListeners()
{
return this.listeners.entrySet().iterator();
}
@Override @Override
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src ) public StackType extractItems( StackType request, Actionable mode, BaseActionSource src )
{ {
@@ -135,6 +138,16 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
} }
@Override @Override
public StorageChannel getChannel()
{
return this.getHandler().getChannel();
}
@Override
public AccessRestriction getAccess()
{
return this.getHandler().getAccess();
} @Override
public IItemList<StackType> getStorageList() public IItemList<StackType> getStorageList()
{ {
if( this.hasChanged ) if( this.hasChanged )
@@ -147,24 +160,6 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
return this.cachedList; return this.cachedList;
} }
@Override
public IItemList<StackType> getAvailableItems(IItemList out)
{
return this.getHandler().getAvailableItems( out );
}
@Override
public StorageChannel getChannel()
{
return this.getHandler().getChannel();
}
@Override
public AccessRestriction getAccess()
{
return this.getHandler().getAccess();
}
@Override @Override
public boolean isPrioritized( StackType input ) public boolean isPrioritized( StackType input )
{ {
@@ -175,6 +170,10 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
public boolean canAccept( StackType input ) public boolean canAccept( StackType input )
{ {
return this.getHandler().canAccept( input ); return this.getHandler().canAccept( input );
} @Override
public IItemList<StackType> getAvailableItems( IItemList out )
{
return this.getHandler().getAvailableItems( out );
} }
@Override @Override
@@ -195,4 +194,7 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
return this.getHandler().validForPass( i ); return this.getHandler().validForPass( i );
} }
} }
@@ -23,9 +23,11 @@
package appeng.api.storage.data; package appeng.api.storage.data;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
/** /**
* An alternate version of FluidStack for AE to keep tabs on things easier, and * An alternate version of FluidStack for AE to keep tabs on things easier, and
* to support larger storage. stackSizes of getFluidStack will be capped. * to support larger storage. stackSizes of getFluidStack will be capped.
@@ -36,7 +38,6 @@ import net.minecraftforge.fluids.FluidStack;
* Don't Implement. * Don't Implement.
* *
* Construct with Util.createFluidStack( FluidStack ) * Construct with Util.createFluidStack( FluidStack )
*
*/ */
public interface IAEFluidStack extends IAEStack<IAEFluidStack> public interface IAEFluidStack extends IAEStack<IAEFluidStack>
{ {
@@ -48,6 +49,14 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack>
*/ */
FluidStack getFluidStack(); FluidStack getFluidStack();
/**
* Combines two IAEItemStacks via addition.
*
* @param option , to add to the current one.
*/
@Override
void add( IAEFluidStack option );
/** /**
* create a AE Fluid clone. * create a AE Fluid clone.
* *
@@ -56,20 +65,10 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack>
@Override @Override
IAEFluidStack copy(); IAEFluidStack copy();
/**
* Combines two IAEItemStacks via addition.
*
* @param option
* , to add to the current one.
*/
@Override
void add(IAEFluidStack option);
/** /**
* quick way to get access to the Forge Fluid Definition. * quick way to get access to the Forge Fluid Definition.
* *
* @return fluid definition * @return fluid definition
*/ */
Fluid getFluid(); Fluid getFluid();
} }
@@ -23,9 +23,11 @@
package appeng.api.storage.data; package appeng.api.storage.data;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
/** /**
* An alternate version of ItemStack for AE to keep tabs on things easier, and to support larger storage. stackSizes of * An alternate version of ItemStack for AE to keep tabs on things easier, and to support larger storage. stackSizes of
* getItemStack will be capped. * getItemStack will be capped.
@@ -46,14 +48,6 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
*/ */
ItemStack getItemStack(); ItemStack getItemStack();
/**
* create a AE Item clone
*
* @return the copy
*/
@Override
IAEItemStack copy();
/** /**
* is there NBT Data for this item? * is there NBT Data for this item?
* *
@@ -64,12 +58,19 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
/** /**
* Combines two IAEItemStacks via addition. * Combines two IAEItemStacks via addition.
* *
* @param option * @param option to add to the current one.
* to add to the current one.
*/ */
@Override @Override
void add( IAEItemStack option ); void add( IAEItemStack option );
/**
* create a AE Item clone
*
* @return the copy
*/
@Override
IAEItemStack copy();
/** /**
* quick way to get access to the MC Item Definition. * quick way to get access to the MC Item Definition.
* *
@@ -91,6 +92,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
* compare the item/damage/nbt of the stack. * compare the item/damage/nbt of the stack.
* *
* @param otherStack to be compared item * @param otherStack to be compared item
*
* @return true if it is the same type (same item, damage, nbt) * @return true if it is the same type (same item, damage, nbt)
*/ */
boolean isSameType( IAEItemStack otherStack ); boolean isSameType( IAEItemStack otherStack );
@@ -99,6 +101,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
* compare the item/damage/nbt of the stack. * compare the item/damage/nbt of the stack.
* *
* @param stored to be compared item * @param stored to be compared item
*
* @return true if it is the same type (same item, damage, nbt) * @return true if it is the same type (same item, damage, nbt)
*/ */
boolean isSameType( ItemStack stored ); boolean isSameType( ItemStack stored );
@@ -33,6 +33,7 @@ import net.minecraft.nbt.NBTTagCompound;
import appeng.api.config.FuzzyMode; import appeng.api.config.FuzzyMode;
import appeng.api.storage.StorageChannel; import appeng.api.storage.StorageChannel;
public interface IAEStack<StackType extends IAEStack> public interface IAEStack<StackType extends IAEStack>
{ {
@@ -53,8 +54,7 @@ public interface IAEStack<StackType extends IAEStack>
/** /**
* changes the number of items in the stack. * changes the number of items in the stack.
* *
* @param stackSize * @param stackSize , ItemStack.stackSize = N
* , ItemStack.stackSize = N
*/ */
StackType setStackSize( long stackSize ); StackType setStackSize( long stackSize );
@@ -141,6 +141,7 @@ public interface IAEStack<StackType extends IAEStack>
* IAEFluidStack, FluidStack * IAEFluidStack, FluidStack
* *
* @param obj compared object * @param obj compared object
*
* @return true if they are the same. * @return true if they are the same.
*/ */
@Override @Override
@@ -153,6 +154,7 @@ public interface IAEStack<StackType extends IAEStack>
* *
* @param st stacks * @param st stacks
* @param mode used fuzzy mode * @param mode used fuzzy mode
*
* @return true if two stacks are equal based on AE Fuzzy Comparison. * @return true if two stacks are equal based on AE Fuzzy Comparison.
*/ */
boolean fuzzyComparison( Object st, FuzzyMode mode ); boolean fuzzyComparison( Object st, FuzzyMode mode );
@@ -161,6 +163,7 @@ public interface IAEStack<StackType extends IAEStack>
* Slower for disk saving, but smaller/more efficient for packets. * Slower for disk saving, but smaller/more efficient for packets.
* *
* @param data to be written data * @param data to be written data
*
* @throws IOException * @throws IOException
*/ */
void writeToPacket( ByteBuf data ) throws IOException; void writeToPacket( ByteBuf data ) throws IOException;
@@ -200,5 +203,4 @@ public interface IAEStack<StackType extends IAEStack>
* @return ITEM or FLUID * @return ITEM or FLUID
*/ */
StorageChannel getChannel(); StorageChannel getChannel();
} }
@@ -28,6 +28,7 @@ import net.minecraft.nbt.NBTTagCompound;
import appeng.api.features.IItemComparison; import appeng.api.features.IItemComparison;
/** /**
* Don't cast this... either compare with it, or copy it. * Don't cast this... either compare with it, or copy it.
* *
@@ -45,6 +46,7 @@ public interface IAETagCompound
* compare to other NBTTagCompounds or IAETagCompounds * compare to other NBTTagCompounds or IAETagCompounds
* *
* @param a compared object * @param a compared object
*
* @return true, if they are the same. * @return true, if they are the same.
*/ */
@Override @Override
@@ -54,5 +56,4 @@ public interface IAETagCompound
* @return the special comparison for this tag * @return the special comparison for this tag
*/ */
IItemComparison getSpecialComparison(); IItemComparison getSpecialComparison();
} }
@@ -28,6 +28,7 @@ import java.util.Collection;
import appeng.api.config.FuzzyMode; import appeng.api.config.FuzzyMode;
/** /**
* Represents a list of items in AE. * Represents a list of items in AE.
* *
@@ -47,6 +48,7 @@ public interface IItemContainer<StackType extends IAEStack>
/** /**
* @param i compared item * @param i compared item
*
* @return a stack equivalent to the stack passed in, but with the correct stack size information, or null if its * @return a stack equivalent to the stack passed in, but with the correct stack size information, or null if its
* not present * not present
*/ */
@@ -54,6 +56,7 @@ public interface IItemContainer<StackType extends IAEStack>
/** /**
* @param input compared item * @param input compared item
*
* @return a list of relevant fuzzy matched stacks * @return a list of relevant fuzzy matched stacks
*/ */
Collection<StackType> findFuzzy( StackType input, FuzzyMode fuzzy ); Collection<StackType> findFuzzy( StackType input, FuzzyMode fuzzy );
@@ -62,5 +65,4 @@ public interface IItemContainer<StackType extends IAEStack>
* @return true if there are no items in the list * @return true if there are no items in the list
*/ */
boolean isEmpty(); boolean isEmpty();
} }
@@ -23,8 +23,10 @@
package appeng.api.storage.data; package appeng.api.storage.data;
import java.util.Iterator; import java.util.Iterator;
/** /**
* Represents a list of items in AE. * Represents a list of items in AE.
* *
@@ -78,5 +80,4 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
* resets stack sizes to 0. * resets stack sizes to 0.
*/ */
void resetStatus(); void resetStatus();
} }
+2 -1
View File
@@ -94,7 +94,8 @@ public enum AEColor
*/ */
final public int whiteVariant; final public int whiteVariant;
AEColor(String unlocalizedName, int blackHex, int medHex, int whiteHex) { AEColor( String unlocalizedName, int blackHex, int medHex, int whiteHex )
{
this.unlocalizedName = unlocalizedName; this.unlocalizedName = unlocalizedName;
this.blackVariant = blackHex; this.blackVariant = blackHex;
this.mediumVariant = medHex; this.mediumVariant = medHex;
@@ -64,9 +64,10 @@ public class DimensionalCoord extends WorldCoord
return new DimensionalCoord( this ); return new DimensionalCoord( this );
} }
public boolean isEqual( DimensionalCoord c ) @Override
public int hashCode()
{ {
return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w; return super.hashCode() ^ this.dimId;
} }
@Override @Override
@@ -75,15 +76,9 @@ public class DimensionalCoord extends WorldCoord
return obj instanceof DimensionalCoord && this.isEqual( (DimensionalCoord) obj ); return obj instanceof DimensionalCoord && this.isEqual( (DimensionalCoord) obj );
} }
@Override public boolean isEqual( DimensionalCoord c )
public int hashCode()
{ {
return super.hashCode() ^ this.dimId; return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w;
}
public boolean isInWorld( World world )
{
return this.w == world;
} }
@Override @Override
@@ -92,6 +87,11 @@ public class DimensionalCoord extends WorldCoord
return "dimension=" + this.dimId + ", " + super.toString(); return "dimension=" + this.dimId + ", " + super.toString();
} }
public boolean isInWorld( World world )
{
return this.w == world;
}
public World getWorld() public World getWorld()
{ {
return this.w; return this.w;
@@ -58,6 +58,7 @@ public interface IConfigManager
* Get Value of a particular setting * Get Value of a particular setting
* *
* @param settingName name of setting * @param settingName name of setting
*
* @return value of setting * @return value of setting
*/ */
Enum<?> getSetting( Settings settingName ); Enum<?> getSetting( Settings settingName );
@@ -67,6 +68,7 @@ public interface IConfigManager
* *
* @param settingName to be changed setting * @param settingName to be changed setting
* @param newValue new value for setting * @param newValue new value for setting
*
* @return changed setting * @return changed setting
*/ */
Enum<?> putSetting( Settings settingName, Enum<?> newValue ); Enum<?> putSetting( Settings settingName, Enum<?> newValue );
@@ -84,5 +86,4 @@ public interface IConfigManager
* @param src to be read nbt tag * @param src to be read nbt tag
*/ */
void readFromNBT( NBTTagCompound src ); void readFromNBT( NBTTagCompound src );
} }
@@ -23,8 +23,10 @@
package appeng.api.util; package appeng.api.util;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
/** /**
* Nearly all of AE's Tile Entities implement IOrientable. * Nearly all of AE's Tile Entities implement IOrientable.
* *
@@ -52,9 +54,9 @@ public interface IOrientable
/** /**
* Update the orientation * Update the orientation
*
* @param Forward new forward direction * @param Forward new forward direction
* @param Up new upwards direction * @param Up new upwards direction
*/ */
void setOrientation( ForgeDirection Forward, ForgeDirection Up ); void setOrientation( ForgeDirection Forward, ForgeDirection Up );
} }
+23 -23
View File
@@ -39,12 +39,16 @@ public class WorldCoord
public int y; public int y;
public int z; public int z;
public WorldCoord add( ForgeDirection direction, int length ) public WorldCoord( TileEntity s )
{ {
this.x += direction.offsetX * length; this( s.xCoord, s.yCoord, s.zCoord );
this.y += direction.offsetY * length; }
this.z += direction.offsetZ * length;
return this; public WorldCoord( int _x, int _y, int _z )
{
this.x = _x;
this.y = _y;
this.z = _z;
} }
public WorldCoord subtract( ForgeDirection direction, int length ) public WorldCoord subtract( ForgeDirection direction, int length )
@@ -87,18 +91,6 @@ public class WorldCoord
return this; return this;
} }
public WorldCoord( int _x, int _y, int _z )
{
this.x = _x;
this.y = _y;
this.z = _z;
}
public WorldCoord( TileEntity s )
{
this( s.xCoord, s.yCoord, s.zCoord );
}
/** /**
* Will Return NULL if it's at some diagonal! * Will Return NULL if it's at some diagonal!
*/ */
@@ -138,11 +130,25 @@ public class WorldCoord
return this.x == c.x && this.y == c.y && this.z == c.z; return this.x == c.x && this.y == c.y && this.z == c.z;
} }
public WorldCoord add( ForgeDirection direction, int length )
{
this.x += direction.offsetX * length;
this.y += direction.offsetY * length;
this.z += direction.offsetZ * length;
return this;
}
public WorldCoord copy() public WorldCoord copy()
{ {
return new WorldCoord( this.x, this.y, this.z ); return new WorldCoord( this.x, this.y, this.z );
} }
@Override
public int hashCode()
{
return ( this.y << 24 ) ^ this.x ^ this.z;
}
@Override @Override
public boolean equals( Object obj ) public boolean equals( Object obj )
{ {
@@ -154,10 +160,4 @@ public class WorldCoord
{ {
return "x=" + this.x + ", y=" + this.y + ", z=" + this.z; return "x=" + this.x + ", y=" + this.y + ", z=" + this.z;
} }
@Override
public int hashCode()
{
return ( this.y << 24 ) ^ this.x ^ this.z;
}
} }
+14 -13
View File
@@ -18,6 +18,7 @@
package appeng.block; package appeng.block;
import java.util.List; import java.util.List;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@@ -42,6 +43,7 @@ import appeng.me.helpers.IGridProxyable;
import appeng.tile.AEBaseTile; import appeng.tile.AEBaseTile;
import appeng.util.Platform; import appeng.util.Platform;
public class AEBaseItemBlock extends ItemBlock public class AEBaseItemBlock extends ItemBlock
{ {
@@ -65,12 +67,6 @@ public class AEBaseItemBlock extends ItemBlock
return 0; return 0;
} }
@Override
public String getUnlocalizedName(ItemStack is)
{
return this.blockType.getUnlocalizedName( is );
}
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
@@ -85,6 +81,18 @@ public class AEBaseItemBlock extends ItemBlock
this.blockType.addInformation( itemStack, player, toolTip, advancedToolTips ); this.blockType.addInformation( itemStack, player, toolTip, advancedToolTips );
} }
@Override
public boolean isBookEnchantable( ItemStack itemstack1, ItemStack itemstack2 )
{
return false;
}
@Override
public String getUnlocalizedName( ItemStack is )
{
return this.blockType.getUnlocalizedName( is );
}
@Override @Override
public boolean placeBlockAt( ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata ) public boolean placeBlockAt( ItemStack stack, EntityPlayer player, World w, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata )
{ {
@@ -194,11 +202,4 @@ public class AEBaseItemBlock extends ItemBlock
} }
return false; return false;
} }
@Override
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2)
{
return false;
}
} }
@@ -38,10 +38,12 @@ import appeng.core.Api;
import appeng.core.localization.GuiText; import appeng.core.localization.GuiText;
import appeng.util.Platform; import appeng.util.Platform;
public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEItemPowerStorage public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEItemPowerStorage
{ {
public AEBaseItemBlockChargeable(Block id) { public AEBaseItemBlockChargeable( Block id )
{
super( id ); super( id );
} }
@@ -60,9 +62,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
double percent = internalCurrentPower / internalMaxPower; double percent = internalCurrentPower / internalMaxPower;
toolTip.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) toolTip.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
+ Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
} }
private double getMaxEnergyCapacity() private double getMaxEnergyCapacity()
@@ -84,18 +84,6 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
return 0; return 0;
} }
private double getInternal(ItemStack is)
{
NBTTagCompound nbt = Platform.openNbtData( is );
return nbt.getDouble( "internalCurrentPower" );
}
private void setInternal(ItemStack is, double amt)
{
NBTTagCompound nbt = Platform.openNbtData( is );
nbt.setDouble( "internalCurrentPower", amt );
}
@Override @Override
public double injectAEPower( ItemStack is, double amt ) public double injectAEPower( ItemStack is, double amt )
{ {
@@ -114,6 +102,18 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
return 0; return 0;
} }
private double getInternal( ItemStack is )
{
NBTTagCompound nbt = Platform.openNbtData( is );
return nbt.getDouble( "internalCurrentPower" );
}
private void setInternal( ItemStack is, double amt )
{
NBTTagCompound nbt = Platform.openNbtData( is );
nbt.setDouble( "internalCurrentPower", amt );
}
@Override @Override
public double extractAEPower( ItemStack is, double amt ) public double extractAEPower( ItemStack is, double amt )
{ {
@@ -147,5 +147,4 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
{ {
return AccessRestriction.WRITE; return AccessRestriction.WRITE;
} }
} }
@@ -21,11 +21,11 @@ package appeng.block;
import java.util.EnumSet; import java.util.EnumSet;
import com.google.common.base.Optional;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs; import net.minecraft.block.BlockStairs;
import com.google.common.base.Optional;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
import appeng.core.features.IAEFeature; import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler; import appeng.core.features.IFeatureHandler;
@@ -48,6 +48,12 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
this.setTileEntity( TileCraftingMonitorTile.class ); this.setTileEntity( TileCraftingMonitorTile.class );
} }
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCraftingCPUMonitor.class;
}
@Override @Override
public IIcon getIcon( int direction, int metadata ) public IIcon getIcon( int direction, int metadata )
{ {
@@ -69,12 +75,6 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
} }
} }
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCraftingCPUMonitor.class;
}
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
@@ -18,6 +18,7 @@
package appeng.block.crafting; package appeng.block.crafting;
import java.util.List; import java.util.List;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
@@ -31,6 +32,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import appeng.client.texture.ExtraBlockTextures; import appeng.client.texture.ExtraBlockTextures;
import appeng.tile.crafting.TileCraftingStorageTile; import appeng.tile.crafting.TileCraftingStorageTile;
public class BlockCraftingStorage extends BlockCraftingUnit public class BlockCraftingStorage extends BlockCraftingUnit
{ {
public BlockCraftingStorage() public BlockCraftingStorage()
@@ -46,21 +48,6 @@ public class BlockCraftingStorage extends BlockCraftingUnit
return ItemCraftingStorage.class; return ItemCraftingStorage.class;
} }
@Override
public String getUnlocalizedName(ItemStack is)
{
if ( is.getItemDamage() == 1 )
return "tile.appliedenergistics2.BlockCraftingStorage4k";
if ( is.getItemDamage() == 2 )
return "tile.appliedenergistics2.BlockCraftingStorage16k";
if ( is.getItemDamage() == 3 )
return "tile.appliedenergistics2.BlockCraftingStorage64k";
return this.getItemUnlocalizedName( is );
}
@Override @Override
public IIcon getIcon( int direction, int metadata ) public IIcon getIcon( int direction, int metadata )
{ {
@@ -97,4 +84,19 @@ public class BlockCraftingStorage extends BlockCraftingUnit
itemStacks.add( new ItemStack( this, 1, 2 ) ); itemStacks.add( new ItemStack( this, 1, 2 ) );
itemStacks.add( new ItemStack( this, 1, 3 ) ); itemStacks.add( new ItemStack( this, 1, 3 ) );
} }
@Override
public String getUnlocalizedName( ItemStack is )
{
if( is.getItemDamage() == 1 )
return "tile.appliedenergistics2.BlockCraftingStorage4k";
if( is.getItemDamage() == 2 )
return "tile.appliedenergistics2.BlockCraftingStorage16k";
if( is.getItemDamage() == 3 )
return "tile.appliedenergistics2.BlockCraftingStorage64k";
return this.getItemUnlocalizedName( is );
}
} }
@@ -18,6 +18,7 @@
package appeng.block.crafting; package appeng.block.crafting;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
@@ -43,10 +44,18 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.crafting.TileCraftingTile; import appeng.tile.crafting.TileCraftingTile;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockCraftingUnit extends AEBaseBlock public class BlockCraftingUnit extends AEBaseBlock
{ {
public static final int FLAG_FORMED = 8; public static final int FLAG_FORMED = 8;
public BlockCraftingUnit()
{
this( BlockCraftingUnit.class );
this.setTileEntity( TileCraftingTile.class );
}
public BlockCraftingUnit( Class<? extends BlockCraftingUnit> childClass ) public BlockCraftingUnit( Class<? extends BlockCraftingUnit> childClass )
{ {
super( childClass, Material.iron ); super( childClass, Material.iron );
@@ -55,62 +64,10 @@ public class BlockCraftingUnit extends AEBaseBlock
this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) ); this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
} }
public BlockCraftingUnit()
{
this( BlockCraftingUnit.class );
this.setTileEntity( TileCraftingTile.class );
}
@Override @Override
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ) protected Class<? extends BaseBlockRender> getRenderer()
{ {
TileCraftingTile tg = this.getTileEntity( w, x, y, z ); return RenderBlockCraftingCPU.class;
if ( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{
if ( Platform.isClient() )
return true;
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
return true;
}
return false;
}
@Override
public int getDamageValue(World w, int x, int y, int z)
{
int meta = w.getBlockMetadata( x, y, z );
return this.damageDropped( meta );
}
@Override
public int damageDropped(int meta)
{
return meta & 3;
}
@Override
public String getUnlocalizedName(ItemStack is)
{
if ( is.getItemDamage() == 1 )
return "tile.appliedenergistics2.BlockCraftingAccelerator";
return this.getItemUnlocalizedName( is );
}
protected String getItemUnlocalizedName(ItemStack is)
{
return super.getUnlocalizedName( is );
}
@Override
public void setRenderStateByMeta(int itemDamage)
{
IIcon front = this.getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage );
IIcon other = this.getIcon( ForgeDirection.NORTH.ordinal(), itemDamage );
this.getRendererInstance().setTemporaryRenderIcons( other, other, front, other, other, other );
} }
@Override @Override
@@ -131,9 +88,35 @@ public class BlockCraftingUnit extends AEBaseBlock
} }
@Override @Override
protected Class<? extends BaseBlockRender> getRenderer() public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
{ {
return RenderBlockCraftingCPU.class; TileCraftingTile tg = this.getTileEntity( w, x, y, z );
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{
if( Platform.isClient() )
return true;
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
return true;
}
return false;
}
@Override
@SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
{
itemStacks.add( new ItemStack( this, 1, 0 ) );
itemStacks.add( new ItemStack( this, 1, 1 ) );
}
@Override
public void setRenderStateByMeta( int itemDamage )
{
IIcon front = this.getIcon( ForgeDirection.SOUTH.ordinal(), itemDamage );
IIcon other = this.getIcon( ForgeDirection.NORTH.ordinal(), itemDamage );
this.getRendererInstance().setTemporaryRenderIcons( other, other, front, other, other, other );
} }
@Override @Override
@@ -146,6 +129,20 @@ public class BlockCraftingUnit extends AEBaseBlock
super.breakBlock( w, x, y, z, a, b ); super.breakBlock( w, x, y, z, a, b );
} }
@Override
public String getUnlocalizedName( ItemStack is )
{
if( is.getItemDamage() == 1 )
return "tile.appliedenergistics2.BlockCraftingAccelerator";
return this.getItemUnlocalizedName( is );
}
protected String getItemUnlocalizedName( ItemStack is )
{
return super.getUnlocalizedName( is );
}
@Override @Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block junk ) public void onNeighborBlockChange( World w, int x, int y, int z, Block junk )
{ {
@@ -155,10 +152,15 @@ public class BlockCraftingUnit extends AEBaseBlock
} }
@Override @Override
@SideOnly(Side.CLIENT) public int damageDropped( int meta )
public void getCheckedSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> itemStacks)
{ {
itemStacks.add( new ItemStack( this, 1, 0 ) ); return meta & 3;
itemStacks.add( new ItemStack( this, 1, 1 ) ); }
@Override
public int getDamageValue( World w, int x, int y, int z )
{
int meta = w.getBlockMetadata( x, y, z );
return this.damageDropped( meta );
} }
} }
@@ -18,6 +18,7 @@
package appeng.block.crafting; package appeng.block.crafting;
import java.util.EnumSet; import java.util.EnumSet;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@@ -36,10 +37,14 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.crafting.TileMolecularAssembler; import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockMolecularAssembler extends AEBaseBlock public class BlockMolecularAssembler extends AEBaseBlock
{ {
public BlockMolecularAssembler() { public static boolean booleanAlphaPass = false;
public BlockMolecularAssembler()
{
super( BlockMolecularAssembler.class, Material.iron ); super( BlockMolecularAssembler.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) ); this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
this.setTileEntity( TileMolecularAssembler.class ); this.setTileEntity( TileMolecularAssembler.class );
@@ -47,7 +52,11 @@ public class BlockMolecularAssembler extends AEBaseBlock
this.lightOpacity = 1; this.lightOpacity = 1;
} }
public static boolean booleanAlphaPass = false; @Override
public int getRenderBlockPass()
{
return 1;
}
@Override @Override
public boolean canRenderInPass( int pass ) public boolean canRenderInPass( int pass )
@@ -56,12 +65,6 @@ public class BlockMolecularAssembler extends AEBaseBlock
return pass == 0 || pass == 1; return pass == 0 || pass == 1;
} }
@Override
public int getRenderBlockPass()
{
return 1;
}
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public Class<? extends BaseBlockRender> getRenderer() public Class<? extends BaseBlockRender> getRenderer()
@@ -18,6 +18,7 @@
package appeng.block.crafting; package appeng.block.crafting;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -26,17 +27,13 @@ import appeng.block.AEBaseItemBlock;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import appeng.core.features.AEFeature; import appeng.core.features.AEFeature;
public class ItemCraftingStorage extends AEBaseItemBlock public class ItemCraftingStorage extends AEBaseItemBlock
{ {
public ItemCraftingStorage(Block id) { public ItemCraftingStorage( Block id )
super( id );
}
@Override
public boolean hasContainerItem(ItemStack stack)
{ {
return AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting ); super( id );
} }
@Override @Override
@@ -49,4 +46,10 @@ public class ItemCraftingStorage extends AEBaseItemBlock
return null; return null;
} }
@Override
public boolean hasContainerItem( ItemStack stack )
{
return AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting );
}
} }
@@ -18,6 +18,7 @@
package appeng.block.grindstone; package appeng.block.grindstone;
import java.util.EnumSet; import java.util.EnumSet;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@@ -39,10 +40,12 @@ import appeng.core.stats.Stats;
import appeng.tile.AEBaseTile; import appeng.tile.AEBaseTile;
import appeng.tile.grindstone.TileCrank; import appeng.tile.grindstone.TileCrank;
public class BlockCrank extends AEBaseBlock public class BlockCrank extends AEBaseBlock
{ {
public BlockCrank() { public BlockCrank()
{
super( BlockCrank.class, Material.wood ); super( BlockCrank.class, Material.wood );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) ); this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
this.setTileEntity( TileCrank.class ); this.setTileEntity( TileCrank.class );
@@ -51,6 +54,12 @@ public class BlockCrank extends AEBaseBlock
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
} }
@Override
public Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCrank.class;
}
@Override @Override
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ ) public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{ {
@@ -72,42 +81,6 @@ public class BlockCrank extends AEBaseBlock
return true; return true;
} }
@Override
public Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCrank.class;
}
private boolean isCrankable( World world, int x, int y, int z, ForgeDirection offset )
{
TileEntity te = world.getTileEntity( x + offset.offsetX, y + offset.offsetY, z + offset.offsetZ );
return te instanceof ICrankable && ( ( ICrankable ) te ).canCrankAttach( offset.getOpposite() );
}
private ForgeDirection findCrankable( World world, int x, int y, int z )
{
for ( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
if ( this.isCrankable( world, x, y, z, dir ) )
{
return dir;
}
return ForgeDirection.UNKNOWN;
}
@Override
public boolean canPlaceBlockAt( World world, int x, int y, int z )
{
return this.findCrankable( world , x, y, z ) != ForgeDirection.UNKNOWN;
}
@Override
public boolean isValidOrientation( World world, int x, int y, int z, ForgeDirection forward, ForgeDirection up )
{
TileEntity te = world.getTileEntity( x, y, z );
return !(te instanceof TileCrank) || this.isCrankable( world, x, y, z, up.getOpposite() );
}
private void dropCrank( World world, int x, int y, int z ) private void dropCrank( World world, int x, int y, int z )
{ {
world.func_147480_a( x, y, z, true ); // w.destroyBlock( x, y, z, true ); world.func_147480_a( x, y, z, true ); // w.destroyBlock( x, y, z, true );
@@ -134,6 +107,30 @@ public class BlockCrank extends AEBaseBlock
} }
} }
@Override
public boolean isValidOrientation( World world, int x, int y, int z, ForgeDirection forward, ForgeDirection up )
{
TileEntity te = world.getTileEntity( x, y, z );
return !( te instanceof TileCrank ) || this.isCrankable( world, x, y, z, up.getOpposite() );
}
private ForgeDirection findCrankable( World world, int x, int y, int z )
{
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
if( this.isCrankable( world, x, y, z, dir ) )
{
return dir;
}
return ForgeDirection.UNKNOWN;
}
private boolean isCrankable( World world, int x, int y, int z, ForgeDirection offset )
{
TileEntity te = world.getTileEntity( x + offset.offsetX, y + offset.offsetY, z + offset.offsetZ );
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
}
@Override @Override
public void onNeighborBlockChange( World world, int x, int y, int z, Block block ) public void onNeighborBlockChange( World world, int x, int y, int z, Block block )
{ {
@@ -151,4 +148,9 @@ public class BlockCrank extends AEBaseBlock
} }
} }
@Override
public boolean canPlaceBlockAt( World world, int x, int y, int z )
{
return this.findCrankable( world, x, y, z ) != ForgeDirection.UNKNOWN;
}
} }
@@ -18,6 +18,7 @@
package appeng.block.grindstone; package appeng.block.grindstone;
import java.util.EnumSet; import java.util.EnumSet;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@@ -31,10 +32,12 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.grindstone.TileGrinder; import appeng.tile.grindstone.TileGrinder;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockGrinder extends AEBaseBlock public class BlockGrinder extends AEBaseBlock
{ {
public BlockGrinder() { public BlockGrinder()
{
super( BlockGrinder.class, Material.rock ); super( BlockGrinder.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) ); this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
this.setTileEntity( TileGrinder.class ); this.setTileEntity( TileGrinder.class );
@@ -52,5 +55,4 @@ public class BlockGrinder extends AEBaseBlock
} }
return false; return false;
} }
} }
@@ -18,6 +18,7 @@
package appeng.block.misc; package appeng.block.misc;
import java.util.EnumSet; import java.util.EnumSet;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@@ -31,10 +32,12 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileCellWorkbench; import appeng.tile.misc.TileCellWorkbench;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockCellWorkbench extends AEBaseBlock public class BlockCellWorkbench extends AEBaseBlock
{ {
public BlockCellWorkbench() { public BlockCellWorkbench()
{
super( BlockCellWorkbench.class, Material.iron ); super( BlockCellWorkbench.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.StorageCells ) ); this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
this.setTileEntity( TileCellWorkbench.class ); this.setTileEntity( TileCellWorkbench.class );
@@ -55,5 +58,4 @@ public class BlockCellWorkbench extends AEBaseBlock
} }
return false; return false;
} }
} }
@@ -48,10 +48,12 @@ import appeng.tile.AEBaseTile;
import appeng.tile.misc.TileCharger; import appeng.tile.misc.TileCharger;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockCharger extends AEBaseBlock implements ICustomCollision public class BlockCharger extends AEBaseBlock implements ICustomCollision
{ {
public BlockCharger() { public BlockCharger()
{
super( BlockCharger.class, Material.iron ); super( BlockCharger.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) ); this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileCharger.class ); this.setTileEntity( TileCharger.class );
@@ -59,6 +61,12 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
} }
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCharger.class;
}
@Override @Override
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ ) public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{ {
@@ -77,12 +85,6 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
return true; return true;
} }
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderBlockCharger.class;
}
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void randomDisplayTick( World w, int x, int y, int z, Random r ) public void randomDisplayTick( World w, int x, int y, int z, Random r )

Some files were not shown because too many files have changed in this diff Show More