Code format
This commit is contained in:
@@ -349,7 +349,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
final Class<? extends AEBaseTile> clazz = this.getClass();
|
||||
final Map<TileEventType, List<AETileEventHandler>> storedHandlers = HANDLERS.get( clazz );
|
||||
|
||||
if ( storedHandlers == null )
|
||||
if( storedHandlers == null )
|
||||
{
|
||||
final Map<TileEventType, List<AETileEventHandler>> newStoredHandlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
|
||||
|
||||
@@ -373,7 +373,8 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
private List<AETileEventHandler> getHandlers( Map<TileEventType, List<AETileEventHandler>> eventToHandlers, TileEventType event ) {
|
||||
private List<AETileEventHandler> getHandlers( Map<TileEventType, List<AETileEventHandler>> eventToHandlers, TileEventType event )
|
||||
{
|
||||
final List<AETileEventHandler> oldHandlers = eventToHandlers.get( event );
|
||||
|
||||
if( oldHandlers == null )
|
||||
@@ -434,7 +435,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
/**
|
||||
* depending on the from, different settings will be accepted, don't call this with null
|
||||
*
|
||||
* @param from source of settings
|
||||
* @param from source of settings
|
||||
* @param compound compound of source
|
||||
*/
|
||||
public void uploadSettings( SettingsFrom from, NBTTagCompound compound )
|
||||
@@ -473,10 +474,10 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
/**
|
||||
* returns the contents of the tile entity, into the world, defaults to dropping everything in the inventory.
|
||||
*
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param drops drops of tile entity
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -96,7 +96,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
|
||||
if( this.cell.getStackInSlot( 0 ).getItem() instanceof ICellWorkbenchItem )
|
||||
{
|
||||
return ( (ICellWorkbenchItem) this.cell.getStackInSlot( 0 ).getItem() );
|
||||
return( (ICellWorkbenchItem) this.cell.getStackInSlot( 0 ).getItem() );
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -398,10 +398,10 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
{
|
||||
|
||||
boolean matchA = ( plateA == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateA, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( plateB == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateB, recipe.getBottomOptional().orNull() ) );
|
||||
( plateB == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateB, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
boolean matchB = ( plateB == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateB, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( plateA == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateA, recipe.getBottomOptional().orNull() ) );
|
||||
( plateA == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateA, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
if( matchA || matchB )
|
||||
{
|
||||
|
||||
@@ -289,7 +289,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
this.isOn = this.burnTime > 0;
|
||||
this.markForUpdate();
|
||||
|
||||
if ( this.hasWorldObj() )
|
||||
if( this.hasWorldObj() )
|
||||
{
|
||||
Platform.notifyBlocksOfNeighbors( this.worldObj, this.xCoord, this.yCoord, this.zCoord );
|
||||
}
|
||||
|
||||
@@ -279,7 +279,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
public boolean isBlocked( ForgeDirection side )
|
||||
{
|
||||
return !this.ImmibisMicroblocks_isSideOpen( side.ordinal() );
|
||||
} @Override
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean visual )
|
||||
{
|
||||
return this.cb.getSelectedBoundingBoxesFromPool( false, true, e, visual );
|
||||
@@ -334,7 +336,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
this.getWorldObj().setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.AIR_BLOCK );
|
||||
} @Override
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||
{
|
||||
for( AxisAlignedBB bx : this.getSelectedBoundingBoxesFromPool( w, x, y, z, e, false ) )
|
||||
@@ -374,7 +378,4 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
return this.cb.recolourBlock( side, colour, who );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ import appeng.transformer.annotations.Integration.Interface;
|
||||
import appeng.transformer.annotations.Integration.InterfaceList;
|
||||
import appeng.transformer.annotations.Integration.Method;
|
||||
|
||||
@InterfaceList( value = { @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Interfaces.Transducerable") } )
|
||||
|
||||
@InterfaceList( value = { @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Interfaces.Transducerable" ) } )
|
||||
public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable
|
||||
{
|
||||
|
||||
@@ -176,7 +177,6 @@ public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerRecei
|
||||
out = String.format( "Receiving %d W @ %d rad/s.", power, omega );
|
||||
}
|
||||
|
||||
|
||||
ArrayList<String> messages = new ArrayList<String>( 1 );
|
||||
messages.add( out );
|
||||
return messages;
|
||||
|
||||
@@ -18,66 +18,57 @@
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
|
||||
/*
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import universalelectricity.core.block.IElectrical;
|
||||
import universalelectricity.core.electricity.ElectricityPack;
|
||||
import appeng.api.config.PowerUnits;
|
||||
|
||||
public abstract class UniversalElectricity extends ThermalExpansion implements IElectrical
|
||||
{
|
||||
|
||||
@Override
|
||||
public final boolean canConnect(ForgeDirection direction)
|
||||
{
|
||||
return internalCanAcceptPower && getPowerSides().contains( direction );
|
||||
}
|
||||
|
||||
@Override
|
||||
public final float receiveElectricity(ForgeDirection from, ElectricityPack receive, boolean doReceive)
|
||||
{
|
||||
float accepted = 0;
|
||||
double receivedPower = receive.getWatts();
|
||||
|
||||
if ( doReceive )
|
||||
{
|
||||
accepted = (float) (receivedPower - injectExternalPower( PowerUnits.KJ, receivedPower ));
|
||||
}
|
||||
else
|
||||
{
|
||||
double whatIWant = getExternalPowerDemand( PowerUnits.KJ );
|
||||
if ( whatIWant > receivedPower )
|
||||
accepted = (float) receivedPower;
|
||||
else
|
||||
accepted = (float) whatIWant;
|
||||
}
|
||||
|
||||
return accepted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final float getRequest(ForgeDirection direction)
|
||||
{
|
||||
return (float) getExternalPowerDemand( PowerUnits.KJ );
|
||||
}
|
||||
|
||||
@Override
|
||||
public final float getVoltage()
|
||||
{
|
||||
return 120;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final ElectricityPack provideElectricity(ForgeDirection from, ElectricityPack request, boolean doProvide)
|
||||
{
|
||||
return null; // cannot be dis-charged
|
||||
}
|
||||
|
||||
@Override
|
||||
public final float getProvide(ForgeDirection direction)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
* import net.minecraftforge.common.util.ForgeDirection;
|
||||
* import universalelectricity.core.block.IElectrical;
|
||||
* import universalelectricity.core.electricity.ElectricityPack;
|
||||
* import appeng.api.config.PowerUnits;
|
||||
* public abstract class UniversalElectricity extends ThermalExpansion implements IElectrical
|
||||
* {
|
||||
* @Override
|
||||
* public final boolean canConnect(ForgeDirection direction)
|
||||
* {
|
||||
* return internalCanAcceptPower && getPowerSides().contains( direction );
|
||||
* }
|
||||
* @Override
|
||||
* public final float receiveElectricity(ForgeDirection from, ElectricityPack receive, boolean doReceive)
|
||||
* {
|
||||
* float accepted = 0;
|
||||
* double receivedPower = receive.getWatts();
|
||||
* if ( doReceive )
|
||||
* {
|
||||
* accepted = (float) (receivedPower - injectExternalPower( PowerUnits.KJ, receivedPower ));
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* double whatIWant = getExternalPowerDemand( PowerUnits.KJ );
|
||||
* if ( whatIWant > receivedPower )
|
||||
* accepted = (float) receivedPower;
|
||||
* else
|
||||
* accepted = (float) whatIWant;
|
||||
* }
|
||||
* return accepted;
|
||||
* }
|
||||
* @Override
|
||||
* public final float getRequest(ForgeDirection direction)
|
||||
* {
|
||||
* return (float) getExternalPowerDemand( PowerUnits.KJ );
|
||||
* }
|
||||
* @Override
|
||||
* public final float getVoltage()
|
||||
* {
|
||||
* return 120;
|
||||
* }
|
||||
* @Override
|
||||
* public final ElectricityPack provideElectricity(ForgeDirection from, ElectricityPack request, boolean doProvide)
|
||||
* {
|
||||
* return null; // cannot be dis-charged
|
||||
* }
|
||||
* @Override
|
||||
* public final float getProvide(ForgeDirection direction)
|
||||
* {
|
||||
* return 0;
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@@ -179,7 +179,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable
|
||||
@Override
|
||||
public boolean isItemValidForSlot( int i, ItemStack itemstack )
|
||||
{
|
||||
return ( i == 0 && this.isSpatialCell( itemstack ) );
|
||||
return( i == 0 && this.isSpatialCell( itemstack ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -866,7 +866,6 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
private static final long serialVersionUID = 7995805326136526631L;
|
||||
}
|
||||
|
||||
|
||||
class ChestNetNotifier<T extends IAEStack<T>> implements IMEMonitorHandlerReceiver<T>
|
||||
{
|
||||
|
||||
@@ -919,7 +918,6 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ChestMonitorHandler<T extends IAEStack> extends MEMonitorHandler<T>
|
||||
{
|
||||
|
||||
|
||||
@@ -555,10 +555,10 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
/**
|
||||
* Adds the items in the upgrade slots to the drop list.
|
||||
*
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param w world
|
||||
* @param x x pos of tile entity
|
||||
* @param y y pos of tile entity
|
||||
* @param z z pos of tile entity
|
||||
* @param drops drops of tile entity
|
||||
*/
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user