final variables and parameters

This commit is contained in:
thatsIch 2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions

View file

@ -51,15 +51,15 @@ public enum AEApi
HELD_API = (IAppEngApi) apiField.get( apiClass ); HELD_API = (IAppEngApi) apiField.get( apiClass );
} }
catch( ClassNotFoundException e ) catch( final ClassNotFoundException e )
{ {
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared." ); throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FQN + " class, without it being declared." );
} }
catch( NoSuchFieldException e ) catch( final NoSuchFieldException e )
{ {
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without it being declared." ); throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without it being declared." );
} }
catch( IllegalAccessException e ) catch( final IllegalAccessException e )
{ {
throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without enough access permissions." ); throw new CoreInaccessibleException( "AE2 API tried to access the " + CORE_API_FIELD + " field in " + CORE_API_FQN + " without enough access permissions." );
} }

View file

@ -30,22 +30,22 @@ public enum AccessRestriction
private final int permissionBit; private final int permissionBit;
AccessRestriction( int v ) AccessRestriction( final int v )
{ {
this.permissionBit = v; this.permissionBit = v;
} }
public boolean hasPermission( AccessRestriction ar ) public boolean hasPermission( final AccessRestriction ar )
{ {
return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit; return ( this.permissionBit & ar.permissionBit ) == ar.permissionBit;
} }
public AccessRestriction restrictPermissions( AccessRestriction ar ) public AccessRestriction restrictPermissions( final AccessRestriction ar )
{ {
return this.getPermByBit( this.permissionBit & ar.permissionBit ); return this.getPermByBit( this.permissionBit & ar.permissionBit );
} }
private AccessRestriction getPermByBit( int bit ) private AccessRestriction getPermByBit( final int bit )
{ {
switch( bit ) switch( bit )
{ {
@ -61,12 +61,12 @@ public enum AccessRestriction
} }
} }
public AccessRestriction addPermissions( AccessRestriction ar ) public AccessRestriction addPermissions( final AccessRestriction ar )
{ {
return this.getPermByBit( this.permissionBit | ar.permissionBit ); return this.getPermByBit( this.permissionBit | ar.permissionBit );
} }
public AccessRestriction removePermissions( AccessRestriction ar ) public AccessRestriction removePermissions( final AccessRestriction ar )
{ {
return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) ); return this.getPermByBit( this.permissionBit & ( ~ar.permissionBit ) );
} }

View file

@ -32,13 +32,13 @@ public enum FuzzyMode
public final float breakPoint; public final float breakPoint;
public final float percentage; public final float percentage;
FuzzyMode( float p ) FuzzyMode( final float p )
{ {
this.percentage = p; this.percentage = p;
this.breakPoint = p / 100.0f; this.breakPoint = p / 100.0f;
} }
public int calculateBreakPoint( int maxDamage ) public int calculateBreakPoint( final int maxDamage )
{ {
return (int) ( ( this.percentage * maxDamage ) / 100.0f ); return (int) ( ( this.percentage * maxDamage ) / 100.0f );
} }

View file

@ -33,12 +33,12 @@ public enum PowerMultiplier
*/ */
public double multiplier = 1.0; public double multiplier = 1.0;
public double multiply( double in ) public double multiply( final double in )
{ {
return in * this.multiplier; return in * this.multiplier;
} }
public double divide( double in ) public double divide( final double in )
{ {
return in / this.multiplier; return in / this.multiplier;
} }

View file

@ -41,7 +41,7 @@ public enum PowerUnits
*/ */
public double conversionRatio = 1.0; public double conversionRatio = 1.0;
PowerUnits( String un ) PowerUnits( final String un )
{ {
this.unlocalizedName = un; this.unlocalizedName = un;
} }
@ -58,7 +58,7 @@ public enum PowerUnits
* *
* @return value converted to target units, from this units. * @return value converted to target units, from this units.
*/ */
public double convertTo( PowerUnits target, double value ) public double convertTo( final PowerUnits target, final double value )
{ {
return ( value * this.conversionRatio ) / target.conversionRatio; return ( value * this.conversionRatio ) / target.conversionRatio;
} }

View file

@ -61,7 +61,7 @@ public enum Settings
private final EnumSet<? extends Enum<?>> values; private final EnumSet<? extends Enum<?>> values;
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions ) Settings( @Nonnull final EnumSet<? extends Enum<?>> possibleOptions )
{ {
if( possibleOptions.isEmpty() ) if( possibleOptions.isEmpty() )
{ {

View file

@ -49,7 +49,7 @@ public enum Upgrades
private final int tier; private final int tier;
private final Map<ItemStack, Integer> supportedMax = new HashMap<>(); private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
Upgrades( int tier ) Upgrades( final int tier )
{ {
this.tier = tier; this.tier = tier;
} }
@ -68,10 +68,10 @@ public enum Upgrades
* @param item machine in which this upgrade can be installed * @param item machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed * @param maxSupported amount how many upgrades can be installed
*/ */
public void registerItem( IItemDefinition item, int maxSupported ) public void registerItem( final IItemDefinition item, final int maxSupported )
{ {
final Optional<ItemStack> maybeStack = item.maybeStack( 1 ); final Optional<ItemStack> maybeStack = item.maybeStack( 1 );
for( ItemStack stack : maybeStack.asSet() ) for( final ItemStack stack : maybeStack.asSet() )
{ {
this.registerItem( stack, maxSupported ); this.registerItem( stack, maxSupported );
} }
@ -83,7 +83,7 @@ public enum Upgrades
* @param stack machine in which this upgrade can be installed * @param stack machine in which this upgrade can be installed
* @param maxSupported amount how many upgrades can be installed * @param maxSupported amount how many upgrades can be installed
*/ */
public void registerItem( ItemStack stack, int maxSupported ) public void registerItem( final ItemStack stack, final int maxSupported )
{ {
if( stack != null ) if( stack != null )
{ {

View file

@ -39,7 +39,7 @@ public class LocatableEventAnnounce extends Event
public final ILocatable target; public final ILocatable target;
public final LocatableEvent change; public final LocatableEvent change;
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev ) public LocatableEventAnnounce( final ILocatable o, final LocatableEvent ev )
{ {
this.target = o; this.target = o;
this.change = ev; this.change = ev;

View file

@ -29,7 +29,7 @@ public class AppEngException extends Exception
private static final long serialVersionUID = -9051434206368465494L; private static final long serialVersionUID = -9051434206368465494L;
public AppEngException( String t ) public AppEngException( final String t )
{ {
super( t ); super( t );
} }

View file

@ -3,7 +3,7 @@ package appeng.api.exceptions;
public class CoreInaccessibleException extends RuntimeException public class CoreInaccessibleException extends RuntimeException
{ {
public CoreInaccessibleException( String message ) public CoreInaccessibleException( final String message )
{ {
super( message ); super( message );
} }

View file

@ -3,7 +3,7 @@ package appeng.api.exceptions;
public class MissingDefinition extends RuntimeException public class MissingDefinition extends RuntimeException
{ {
public MissingDefinition( String message ) public MissingDefinition( final String message )
{ {
super( message ); super( message );
} }

View file

@ -29,7 +29,7 @@ public class MissingIngredientError extends Exception
private static final long serialVersionUID = -998858343831371697L; private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError( String n ) public MissingIngredientError( final String n )
{ {
super( n ); super( n );
} }

View file

@ -29,7 +29,7 @@ public class ModNotInstalled extends Exception
private static final long serialVersionUID = -9052435206368425494L; private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled( String t ) public ModNotInstalled( final String t )
{ {
super( t ); super( t );
} }

View file

@ -29,7 +29,7 @@ public class RecipeError extends Exception
private static final long serialVersionUID = -6602870588617670262L; private static final long serialVersionUID = -6602870588617670262L;
public RecipeError( String n ) public RecipeError( final String n )
{ {
super( n ); super( n );
} }

View file

@ -29,7 +29,7 @@ public class RegistrationError extends Exception
private static final long serialVersionUID = -6602870588617670263L; private static final long serialVersionUID = -6602870588617670263L;
public RegistrationError( String n ) public RegistrationError( final String n )
{ {
super( n ); super( n );
} }

View file

@ -33,7 +33,7 @@ public class TransitionResult
public final boolean success; public final boolean success;
public final double energyUsage; public final double energyUsage;
public TransitionResult( boolean _success, double power ) public TransitionResult( final boolean _success, final double power )
{ {
this.success = _success; this.success = _success;
this.energyUsage = power; this.energyUsage = power;

View file

@ -36,7 +36,7 @@ public class MENetworkChannelChanged extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkChannelChanged( IGridNode n ) public MENetworkChannelChanged( final IGridNode n )
{ {
this.node = n; this.node = n;
} }

View file

@ -32,7 +32,7 @@ public class MENetworkCraftingCpuChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkCraftingCpuChange( IGridNode n ) public MENetworkCraftingCpuChange( final IGridNode n )
{ {
this.node = n; this.node = n;
} }

View file

@ -34,7 +34,7 @@ public class MENetworkCraftingPatternChange extends MENetworkEvent
public final ICraftingProvider provider; public final ICraftingProvider provider;
public final IGridNode node; public final IGridNode node;
public MENetworkCraftingPatternChange( ICraftingProvider p, IGridNode n ) public MENetworkCraftingPatternChange( final ICraftingProvider p, final IGridNode n )
{ {
this.provider = p; this.provider = p;
this.node = n; this.node = n;

View file

@ -71,7 +71,7 @@ public class MENetworkEvent
* *
* @param v current number of visitors * @param v current number of visitors
*/ */
public void setVisitedObjects( int v ) public void setVisitedObjects( final int v )
{ {
this.visited = v; this.visited = v;
} }

View file

@ -39,7 +39,7 @@ public class MENetworkPowerIdleChange extends MENetworkEvent
public final IGridNode node; public final IGridNode node;
public MENetworkPowerIdleChange( IGridNode nodeThatChanged ) public MENetworkPowerIdleChange( final IGridNode nodeThatChanged )
{ {
this.node = nodeThatChanged; this.node = nodeThatChanged;
} }

View file

@ -42,7 +42,7 @@ public class MENetworkPowerStorage extends MENetworkEvent
public final IAEPowerStorage storage; public final IAEPowerStorage storage;
public final PowerEventType type; public final PowerEventType type;
public MENetworkPowerStorage( IAEPowerStorage t, PowerEventType y ) public MENetworkPowerStorage( final IAEPowerStorage t, final PowerEventType y )
{ {
this.storage = t; this.storage = t;
this.type = y; this.type = y;

View file

@ -39,7 +39,7 @@ public class MENetworkSpatialEvent extends MENetworkEvent
* @param SpatialIO ( INSTANCE of the SpatialIO block ) * @param SpatialIO ( INSTANCE of the SpatialIO block )
* @param EnergyUsage ( the amount of energy that the SpatialIO uses) * @param EnergyUsage ( the amount of energy that the SpatialIO uses)
*/ */
public MENetworkSpatialEvent( IGridHost SpatialIO, double EnergyUsage ) public MENetworkSpatialEvent( final IGridHost SpatialIO, final double EnergyUsage )
{ {
this.host = SpatialIO; this.host = SpatialIO;
this.spatialEnergyUsage = EnergyUsage; this.spatialEnergyUsage = EnergyUsage;

View file

@ -42,7 +42,7 @@ 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( final IMEMonitor o, final StorageChannel chan )
{ {
this.monitor = o; this.monitor = o;
this.channel = chan; this.channel = chan;

View file

@ -29,7 +29,7 @@ public class MachineSource extends BaseActionSource
public final IActionHost via; public final IActionHost via;
public MachineSource( IActionHost v ) public MachineSource( final IActionHost v )
{ {
this.via = v; this.via = v;
} }

View file

@ -33,7 +33,7 @@ public class PlayerSource extends BaseActionSource
public final EntityPlayer player; public final EntityPlayer player;
public final IActionHost via; public final IActionHost via;
public PlayerSource( EntityPlayer p, IActionHost v ) public PlayerSource( final EntityPlayer p, final IActionHost v )
{ {
this.player = p; this.player = p;
this.via = v; this.via = v;

View file

@ -60,7 +60,7 @@ public class TickingRequest
*/ */
public final boolean canBeAlerted; public final boolean canBeAlerted;
public TickingRequest( int min, int max, boolean sleep, boolean alertable ) public TickingRequest( final int min, final int max, final boolean sleep, final boolean alertable )
{ {
this.minTickRate = min; this.minTickRate = min;
this.maxTickRate = max; this.maxTickRate = max;

View file

@ -33,7 +33,7 @@ public enum CableRenderMode
public final boolean transparentFacades; public final boolean transparentFacades;
public final boolean opaqueFacades; public final boolean opaqueFacades;
CableRenderMode( boolean hideFacades ) CableRenderMode( final boolean hideFacades )
{ {
this.transparentFacades = hideFacades; this.transparentFacades = hideFacades;
this.opaqueFacades = !hideFacades; this.opaqueFacades = !hideFacades;

View file

@ -47,7 +47,7 @@ public abstract class LayerBase extends TileEntity // implements IPartHost
* *
* @return the part for the requested side. * @return the part for the requested side.
*/ */
public IPart getPart( AEPartLocation side ) public IPart getPart( final AEPartLocation side )
{ {
return null; // place holder. return null; // place holder.
} }
@ -61,7 +61,7 @@ public abstract class LayerBase extends TileEntity // implements IPartHost
* *
* @return the part for the requested side. * @return the part for the requested side.
*/ */
public IPart getPart( EnumFacing side ) public IPart getPart( final EnumFacing side )
{ {
return null; // place holder. return null; // place holder.
} }

View file

@ -55,14 +55,14 @@ public class SelectedPart
this.side = AEPartLocation.INTERNAL; this.side = AEPartLocation.INTERNAL;
} }
public SelectedPart( IPart part, AEPartLocation side ) public SelectedPart( final IPart part, final AEPartLocation side )
{ {
this.part = part; this.part = part;
this.facade = null; this.facade = null;
this.side = side; this.side = side;
} }
public SelectedPart( IFacadePart facade, AEPartLocation side ) public SelectedPart( final IFacadePart facade, final AEPartLocation side )
{ {
this.part = null; this.part = null;
this.facade = facade; this.facade = facade;

View file

@ -34,14 +34,14 @@ public class ResolverResult
public final int damageValue; public final int damageValue;
public final NBTTagCompound compound; public final NBTTagCompound compound;
public ResolverResult( String name, int damage ) public ResolverResult( final String name, final int damage )
{ {
this.itemName = name; this.itemName = name;
this.damageValue = damage; this.damageValue = damage;
this.compound = null; this.compound = null;
} }
public ResolverResult( String name, int damage, NBTTagCompound data ) public ResolverResult( final String name, final int damage, final NBTTagCompound data )
{ {
this.itemName = name; this.itemName = name;
this.damageValue = damage; this.damageValue = damage;

View file

@ -36,7 +36,7 @@ public class ResolverResultSet
public final String name; public final String name;
public final List<ItemStack> results; public final List<ItemStack> results;
public ResolverResultSet( String myName, ItemStack... set ) public ResolverResultSet( final String myName, final ItemStack... set )
{ {
this.results = Arrays.asList( set ); this.results = Arrays.asList( set );
this.name = myName; this.name = myName;

View file

@ -52,32 +52,32 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
protected boolean hasChanged = true; protected boolean hasChanged = true;
public MEMonitorHandler( IMEInventoryHandler<StackType> t ) public MEMonitorHandler( final IMEInventoryHandler<StackType> t )
{ {
this.internalHandler = t; this.internalHandler = t;
this.cachedList = t.getChannel().createList(); this.cachedList = t.getChannel().createList();
} }
public MEMonitorHandler( IMEInventoryHandler<StackType> t, StorageChannel chan ) public MEMonitorHandler( final IMEInventoryHandler<StackType> t, final StorageChannel chan )
{ {
this.internalHandler = t; this.internalHandler = t;
this.cachedList = chan.createList(); this.cachedList = chan.createList();
} }
@Override @Override
public void addListener( IMEMonitorHandlerReceiver<StackType> l, Object verificationToken ) public void addListener( final IMEMonitorHandlerReceiver<StackType> l, final Object verificationToken )
{ {
this.listeners.put( l, verificationToken ); this.listeners.put( l, verificationToken );
} }
@Override @Override
public void removeListener( IMEMonitorHandlerReceiver<StackType> l ) public void removeListener( final IMEMonitorHandlerReceiver<StackType> l )
{ {
this.listeners.remove( l ); this.listeners.remove( l );
} }
@Override @Override
public StackType injectItems( StackType input, Actionable mode, BaseActionSource src ) public StackType injectItems( final StackType input, final Actionable mode, final BaseActionSource src )
{ {
if( mode == Actionable.SIMULATE ) if( mode == Actionable.SIMULATE )
{ {
@ -91,9 +91,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
return this.internalHandler; return this.internalHandler;
} }
private StackType monitorDifference( IAEStack original, StackType leftOvers, boolean extraction, BaseActionSource src ) private StackType monitorDifference( final IAEStack original, final StackType leftOvers, final boolean extraction, final BaseActionSource src )
{ {
StackType diff = (StackType) original.copy(); final StackType diff = (StackType) original.copy();
if( extraction ) if( extraction )
{ {
@ -112,19 +112,19 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
return leftOvers; return leftOvers;
} }
protected void postChangesToListeners( Iterable<StackType> changes, BaseActionSource src ) protected void postChangesToListeners( final Iterable<StackType> changes, final BaseActionSource src )
{ {
this.notifyListenersOfChange( changes, src ); this.notifyListenersOfChange( changes, src );
} }
protected void notifyListenersOfChange( Iterable<StackType> diff, BaseActionSource src ) protected void notifyListenersOfChange( final Iterable<StackType> diff, final BaseActionSource src )
{ {
this.hasChanged = true;// need to update the cache. this.hasChanged = true;// need to update the cache.
Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners(); final Iterator<Entry<IMEMonitorHandlerReceiver<StackType>, Object>> i = this.getListeners();
while( i.hasNext() ) while( i.hasNext() )
{ {
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next(); final Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey(); final IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
if( receiver.isValid( o.getValue() ) ) if( receiver.isValid( o.getValue() ) )
{ {
receiver.postChange( this, diff, src ); receiver.postChange( this, diff, src );
@ -142,7 +142,7 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
} }
@Override @Override
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src ) public StackType extractItems( final StackType request, final Actionable mode, final BaseActionSource src )
{ {
if( mode == Actionable.SIMULATE ) if( mode == Actionable.SIMULATE )
{ {
@ -175,17 +175,17 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
} }
@Override @Override
public boolean isPrioritized( StackType input ) public boolean isPrioritized( final StackType input )
{ {
return this.getHandler().isPrioritized( input ); return this.getHandler().isPrioritized( input );
} }
@Override @Override
public boolean canAccept( StackType input ) public boolean canAccept( final StackType input )
{ {
return this.getHandler().canAccept( input ); return this.getHandler().canAccept( input );
} @Override } @Override
public IItemList<StackType> getAvailableItems( IItemList out ) public IItemList<StackType> getAvailableItems( final IItemList out )
{ {
return this.getHandler().getAvailableItems( out ); return this.getHandler().getAvailableItems( out );
} }
@ -203,7 +203,7 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
} }
@Override @Override
public boolean validForPass( int i ) public boolean validForPass( final int i )
{ {
return this.getHandler().validForPass( i ); return this.getHandler().validForPass( i );
} }

View file

@ -45,7 +45,7 @@ public enum StorageChannel
public final Class<? extends IAEStack> type; public final Class<? extends IAEStack> type;
StorageChannel( Class<? extends IAEStack> t ) StorageChannel( final Class<? extends IAEStack> t )
{ {
this.type = t; this.type = t;
} }

View file

@ -19,7 +19,7 @@ public class AEAxisAlignedBB
return AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ); return AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ );
} }
public AEAxisAlignedBB(double a,double b, double c, double d, double e, double f) public AEAxisAlignedBB( final double a, final double b, final double c, final double d, final double e, final double f)
{ {
minX=a; minX=a;
minY=b; minY=b;
@ -30,18 +30,18 @@ public class AEAxisAlignedBB
} }
public static AEAxisAlignedBB fromBounds( public static AEAxisAlignedBB fromBounds(
double a, final double a,
double b, final double b,
double c, final double c,
double d, final double d,
double e, final double e,
double f ) final double f )
{ {
return new AEAxisAlignedBB(a,b,c,d,e,f); return new AEAxisAlignedBB(a,b,c,d,e,f);
} }
public static AEAxisAlignedBB fromBounds( public static AEAxisAlignedBB fromBounds(
AxisAlignedBB bb ) final AxisAlignedBB bb )
{ {
return new AEAxisAlignedBB( bb.minX, return new AEAxisAlignedBB( bb.minX,
bb.minY, bb.minY,

View file

@ -100,7 +100,7 @@ public enum AEColor
*/ */
public final EnumDyeColor dye; public final EnumDyeColor dye;
AEColor( String unlocalizedName, EnumDyeColor dye, int blackHex, int medHex, int whiteHex ) AEColor( final String unlocalizedName, final EnumDyeColor dye, final int blackHex, final int medHex, final int whiteHex )
{ {
this.unlocalizedName = unlocalizedName; this.unlocalizedName = unlocalizedName;
this.blackVariant = blackHex; this.blackVariant = blackHex;
@ -112,7 +112,7 @@ public enum AEColor
/** /**
* Logic to see which colors match each other.. special handle for Transparent * Logic to see which colors match each other.. special handle for Transparent
*/ */
public boolean matches( AEColor color ) public boolean matches( final AEColor color )
{ {
return this == Transparent || color == Transparent || this == color; return this == Transparent || color == Transparent || this == color;
} }

View file

@ -51,7 +51,7 @@ public enum AEPartLocation
public static final AEPartLocation[] SIDE_LOCATIONS = {DOWN, UP, NORTH, SOUTH, WEST, EAST}; public static final AEPartLocation[] SIDE_LOCATIONS = {DOWN, UP, NORTH, SOUTH, WEST, EAST};
private AEPartLocation(int x, int y, int z) private AEPartLocation( final int x, final int y, final int z)
{ {
xOffset = x; xOffset = x;
yOffset = y; yOffset = y;
@ -61,7 +61,7 @@ public enum AEPartLocation
/** /**
* @return Part Location * @return Part Location
*/ */
public static AEPartLocation fromOrdinal(int id) public static AEPartLocation fromOrdinal( final int id)
{ {
if (id >= 0 && id < SIDE_LOCATIONS.length) if (id >= 0 && id < SIDE_LOCATIONS.length)
return SIDE_LOCATIONS[id]; return SIDE_LOCATIONS[id];
@ -75,7 +75,7 @@ public enum AEPartLocation
* @param side * @param side
* @return proper Part Location for a facing enum. * @return proper Part Location for a facing enum.
*/ */
public static AEPartLocation fromFacing(EnumFacing side) public static AEPartLocation fromFacing( final EnumFacing side)
{ {
if ( side == null ) return INTERNAL; if ( side == null ) return INTERNAL;
return values()[side.ordinal()]; return values()[side.ordinal()];

View file

@ -38,28 +38,28 @@ public class DimensionalCoord extends WorldCoord
private final World w; private final World w;
private final int dimId; private final int dimId;
public DimensionalCoord( DimensionalCoord s ) public DimensionalCoord( final DimensionalCoord s )
{ {
super( s.x, s.y, s.z ); super( s.x, s.y, s.z );
this.w = s.w; this.w = s.w;
this.dimId = s.dimId; this.dimId = s.dimId;
} }
public DimensionalCoord( TileEntity s ) public DimensionalCoord( final TileEntity s )
{ {
super( s ); super( s );
this.w = s.getWorld(); this.w = s.getWorld();
this.dimId = this.w.provider.getDimensionId(); this.dimId = this.w.provider.getDimensionId();
} }
public DimensionalCoord( World _w, int x, int y, int z ) public DimensionalCoord( final World _w, final int x, final int y, final int z )
{ {
super( x,y,z ); super( x,y,z );
this.w = _w; this.w = _w;
this.dimId = _w.provider.getDimensionId(); this.dimId = _w.provider.getDimensionId();
} }
public DimensionalCoord( World _w, BlockPos pos ) public DimensionalCoord( final World _w, final BlockPos pos )
{ {
super( pos ); super( pos );
this.w = _w; this.w = _w;
@ -79,12 +79,12 @@ public class DimensionalCoord extends WorldCoord
} }
@Override @Override
public boolean equals( Object obj ) public boolean equals( final Object obj )
{ {
return obj instanceof DimensionalCoord && this.isEqual( (DimensionalCoord) obj ); return obj instanceof DimensionalCoord && this.isEqual( (DimensionalCoord) obj );
} }
public boolean isEqual( DimensionalCoord c ) public boolean isEqual( final DimensionalCoord c )
{ {
return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w; return this.x == c.x && this.y == c.y && this.z == c.z && c.w == this.w;
} }
@ -95,7 +95,7 @@ public class DimensionalCoord extends WorldCoord
return "dimension=" + this.dimId + ", " + super.toString(); return "dimension=" + this.dimId + ", " + super.toString();
} }
public boolean isInWorld( World world ) public boolean isInWorld( final World world )
{ {
return this.w == world; return this.w == world;
} }

View file

@ -39,12 +39,12 @@ public class WorldCoord
public int y; public int y;
public int z; public int z;
public WorldCoord( TileEntity s ) public WorldCoord( final TileEntity s )
{ {
this( s.getPos() ); this( s.getPos() );
} }
public WorldCoord( int _x, int _y, int _z ) public WorldCoord( final int _x, final int _y, final int _z )
{ {
this.x = _x; this.x = _x;
this.y = _y; this.y = _y;
@ -52,14 +52,14 @@ public class WorldCoord
} }
public WorldCoord( public WorldCoord(
BlockPos pos ) final BlockPos pos )
{ {
x = pos.getX(); x = pos.getX();
y = pos.getY(); y = pos.getY();
z = pos.getZ(); z = pos.getZ();
} }
public WorldCoord subtract( AEPartLocation direction, int length ) public WorldCoord subtract( final AEPartLocation direction, final int length )
{ {
this.x -= direction.xOffset * length; this.x -= direction.xOffset * length;
this.y -= direction.yOffset * length; this.y -= direction.yOffset * length;
@ -67,7 +67,7 @@ public class WorldCoord
return this; return this;
} }
public WorldCoord add( int _x, int _y, int _z ) public WorldCoord add( final int _x, final int _y, final int _z )
{ {
this.x += _x; this.x += _x;
this.y += _y; this.y += _y;
@ -75,7 +75,7 @@ public class WorldCoord
return this; return this;
} }
public WorldCoord subtract( int _x, int _y, int _z ) public WorldCoord subtract( final int _x, final int _y, final int _z )
{ {
this.x -= _x; this.x -= _x;
this.y -= _y; this.y -= _y;
@ -83,7 +83,7 @@ public class WorldCoord
return this; return this;
} }
public WorldCoord multiple( int _x, int _y, int _z ) public WorldCoord multiple( final int _x, final int _y, final int _z )
{ {
this.x *= _x; this.x *= _x;
this.y *= _y; this.y *= _y;
@ -91,7 +91,7 @@ public class WorldCoord
return this; return this;
} }
public WorldCoord divide( int _x, int _y, int _z ) public WorldCoord divide( final int _x, final int _y, final int _z )
{ {
this.x /= _x; this.x /= _x;
this.y /= _y; this.y /= _y;
@ -102,15 +102,15 @@ public class WorldCoord
/** /**
* Will Return NULL if it's at some diagonal! * Will Return NULL if it's at some diagonal!
*/ */
public AEPartLocation directionTo( WorldCoord loc ) public AEPartLocation directionTo( final WorldCoord loc )
{ {
int ox = this.x - loc.x; final int ox = this.x - loc.x;
int oy = this.y - loc.y; final int oy = this.y - loc.y;
int oz = this.z - loc.z; final int oz = this.z - loc.z;
int xlen = Math.abs( ox ); final int xlen = Math.abs( ox );
int ylen = Math.abs( oy ); final int ylen = Math.abs( oy );
int zlen = Math.abs( oz ); final int zlen = Math.abs( oz );
if( loc.isEqual( this.copy().add( AEPartLocation.EAST, xlen ) ) ) if( loc.isEqual( this.copy().add( AEPartLocation.EAST, xlen ) ) )
{ {
@ -145,12 +145,12 @@ public class WorldCoord
return null; return null;
} }
public boolean isEqual( WorldCoord c ) public boolean isEqual( final WorldCoord c )
{ {
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( AEPartLocation direction, int length ) public WorldCoord add( final AEPartLocation direction, final int length )
{ {
this.x += direction.xOffset * length; this.x += direction.xOffset * length;
this.y += direction.yOffset * length; this.y += direction.yOffset * length;
@ -170,7 +170,7 @@ public class WorldCoord
} }
@Override @Override
public boolean equals( Object obj ) public boolean equals( final Object obj )
{ {
return obj instanceof WorldCoord && this.isEqual( (WorldCoord) obj ); return obj instanceof WorldCoord && this.isEqual( (WorldCoord) obj );
} }

View file

@ -93,7 +93,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return isOpaque && isFullSize; return isOpaque && isFullSize;
} }
protected AEBaseBlock( Material mat ) protected AEBaseBlock( final Material mat )
{ {
this( mat, Optional.<String>absent() ); this( mat, Optional.<String>absent() );
this.setLightOpacity( 255 ); this.setLightOpacity( 255 );
@ -102,7 +102,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
this.setHarvestLevel( "pickaxe", 0 ); this.setHarvestLevel( "pickaxe", 0 );
} }
protected AEBaseBlock( Material mat, Optional<String> subName ) protected AEBaseBlock( final Material mat, final Optional<String> subName )
{ {
super( mat ); super( mat );
@ -144,9 +144,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
final public IBlockState getExtendedState( final public IBlockState getExtendedState(
IBlockState state, final IBlockState state,
IBlockAccess world, final IBlockAccess world,
BlockPos pos ) final BlockPos pos )
{ {
return ((IExtendedBlockState)super.getExtendedState( state, world, pos ) ).withProperty( AE_BLOCK_POS, pos ).withProperty( AE_BLOCK_ACCESS, world ); return ((IExtendedBlockState)super.getExtendedState( state, world, pos ) ).withProperty( AE_BLOCK_POS, pos ).withProperty( AE_BLOCK_ACCESS, world );
} }
@ -166,18 +166,18 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
try try
{ {
Class<? extends BaseBlockRender> re = this.getRenderer(); final Class<? extends BaseBlockRender> re = this.getRenderer();
if ( re == null ) return null; // use 1.8 models. if ( re == null ) return null; // use 1.8 models.
final BaseBlockRender renderer = re.newInstance(); final BaseBlockRender renderer = re.newInstance();
this.renderInfo = new BlockRenderInfo( renderer ); this.renderInfo = new BlockRenderInfo( renderer );
return this.renderInfo; return this.renderInfo;
} }
catch( InstantiationException e ) catch( final InstantiationException e )
{ {
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e ); throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e );
} }
catch( IllegalAccessException e ) catch( final IllegalAccessException e )
{ {
throw new IllegalStateException( "Failed to create a new instance of " + this.getRenderer() + " because of permissions.", e ); throw new IllegalStateException( "Failed to create a new instance of " + this.getRenderer() + " because of permissions.", e );
} }
@ -185,9 +185,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
public int colorMultiplier( public int colorMultiplier(
IBlockAccess worldIn, final IBlockAccess worldIn,
BlockPos pos, final BlockPos pos,
int colorTint ) final int colorTint )
{ {
return colorTint; return colorTint;
} }
@ -198,7 +198,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return BaseBlockRender.class; return BaseBlockRender.class;
} }
protected void setFeature( EnumSet<AEFeature> f ) protected void setFeature( final EnumSet<AEFeature> f )
{ {
final AEBlockFeatureHandler featureHandler = new AEBlockFeatureHandler( f, this, this.featureSubName ); final AEBlockFeatureHandler featureHandler = new AEBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler ); this.setHandler( featureHandler );
@ -210,7 +210,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return this.handler; return this.handler;
} }
protected final void setHandler( IFeatureHandler handler ) protected final void setHandler( final IFeatureHandler handler )
{ {
this.handler = handler; this.handler = handler;
} }
@ -232,7 +232,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return this.isFullSize && this.isOpaque; return this.isFullSize && this.isOpaque;
} }
protected ICustomCollision getCustomCollision( World w, BlockPos pos ) protected ICustomCollision getCustomCollision( final World w, final BlockPos pos )
{ {
if( this instanceof ICustomCollision ) if( this instanceof ICustomCollision )
{ {
@ -242,10 +242,10 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public IAESprite getIcon( IBlockAccess w, BlockPos pos, EnumFacing side ) public IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
{ {
IBlockState state =w.getBlockState( pos ); final IBlockState state =w.getBlockState( pos );
IOrientable ori = getOrientable( w, pos ); final IOrientable ori = getOrientable( w, pos );
if ( ori == null ) if ( ori == null )
return getIcon( side,state ); return getIcon( side,state );
@ -254,29 +254,29 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public IAESprite getIcon( EnumFacing side, IBlockState state ) public IAESprite getIcon( final EnumFacing side, final IBlockState state )
{ {
return this.getRendererInstance().getTexture( AEPartLocation.fromFacing( side ) ); return this.getRendererInstance().getTexture( AEPartLocation.fromFacing( side ) );
} }
@Override @Override
public void addCollisionBoxesToList( public void addCollisionBoxesToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
AxisAlignedBB bb, final AxisAlignedBB bb,
List out, final List out,
Entity e ) final Entity e )
{ {
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos ); final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
if( collisionHandler != null && bb != null ) if( collisionHandler != null && bb != null )
{ {
List<AxisAlignedBB> tmp = new ArrayList<AxisAlignedBB>(); final List<AxisAlignedBB> tmp = new ArrayList<AxisAlignedBB>();
collisionHandler.addCollidingBlockToList( w, pos, bb, tmp, e ); collisionHandler.addCollidingBlockToList( w, pos, bb, tmp, e );
for( AxisAlignedBB b : tmp ) for( final AxisAlignedBB b : tmp )
{ {
AxisAlignedBB offset = b.offset( pos.getX(), pos.getY(), pos.getZ() ); final AxisAlignedBB offset = b.offset( pos.getX(), pos.getY(), pos.getZ() );
if( bb.intersectsWith( offset ) ) if( bb.intersectsWith( offset ) )
{ {
out.add( offset ); out.add( offset );
@ -292,8 +292,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public AxisAlignedBB getSelectedBoundingBox( public AxisAlignedBB getSelectedBoundingBox(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos ); final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
@ -309,11 +309,11 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
double lastDist = 0; double lastDist = 0;
for( AxisAlignedBB bb : bbs ) for( final AxisAlignedBB bb : bbs )
{ {
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ ); this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
MovingObjectPosition r = super.collisionRayTrace( w, pos, ld.a, ld.b ); final MovingObjectPosition r = super.collisionRayTrace( w, pos, ld.a, ld.b );
this.setBlockBounds( 0, 0, 0, 1, 1, 1 ); this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
@ -342,7 +342,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
AxisAlignedBB b = null; // new AxisAlignedBB( 16d, 16d, 16d, 0d, 0d, 0d ); AxisAlignedBB b = null; // new AxisAlignedBB( 16d, 16d, 16d, 0d, 0d, 0d );
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, null, false ) ) for( final AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, null, false ) )
{ {
if ( b == null ) if ( b == null )
{ {
@ -379,10 +379,10 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
public MovingObjectPosition collisionRayTrace( public MovingObjectPosition collisionRayTrace(
World w, final World w,
BlockPos pos, final BlockPos pos,
Vec3 a, final Vec3 a,
Vec3 b ) final Vec3 b )
{ {
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos ); final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
@ -393,21 +393,21 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
double lastDist = 0; double lastDist = 0;
for( AxisAlignedBB bb : bbs ) for( final AxisAlignedBB bb : bbs )
{ {
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ ); this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
MovingObjectPosition r = super.collisionRayTrace( w, pos, a, b ); final MovingObjectPosition r = super.collisionRayTrace( w, pos, a, b );
this.setBlockBounds( 0, 0, 0, 1, 1, 1 ); this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
if( r != null ) if( r != null )
{ {
double xLen = ( a.xCoord - r.hitVec.xCoord ); final double xLen = ( a.xCoord - r.hitVec.xCoord );
double yLen = ( a.yCoord - r.hitVec.yCoord ); final double yLen = ( a.yCoord - r.hitVec.yCoord );
double zLen = ( a.zCoord - r.hitVec.zCoord ); final double zLen = ( a.zCoord - r.hitVec.zCoord );
double thisDist = xLen * xLen + yLen * yLen + zLen * zLen; final double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
if( br == null || lastDist > thisDist ) if( br == null || lastDist > thisDist )
{ {
lastDist = thisDist; lastDist = thisDist;
@ -428,7 +428,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return super.collisionRayTrace( w, pos, a, b ); return super.collisionRayTrace( w, pos, a, b );
} }
public boolean onActivated( World w, BlockPos pos, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ ) public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{ {
return false; return false;
} }
@ -436,7 +436,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
public final void getSubBlocks( Item item, CreativeTabs tabs, List itemStacks ) public final void getSubBlocks( final Item item, final CreativeTabs tabs, final List itemStacks )
{ {
this.getCheckedSubBlocks( item, tabs, itemStacks ); this.getCheckedSubBlocks( item, tabs, itemStacks );
} }
@ -449,21 +449,21 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
public int getComparatorInputOverride( public int getComparatorInputOverride(
World worldIn, final World worldIn,
BlockPos pos ) final BlockPos pos )
{ {
return 0; return 0;
} }
@Override @Override
public boolean isNormalCube( public boolean isNormalCube(
IBlockAccess world, final IBlockAccess world,
BlockPos pos ) final BlockPos pos )
{ {
return this.isFullSize; return this.isFullSize;
} }
public IOrientable getOrientable( IBlockAccess w, BlockPos pos ) public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{ {
if( this instanceof IOrientableBlock ) if( this instanceof IOrientableBlock )
{ {
@ -474,9 +474,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override @Override
public boolean rotateBlock( public boolean rotateBlock(
World w, final World w,
BlockPos pos, final BlockPos pos,
EnumFacing axis ) final EnumFacing axis )
{ {
final IOrientable rotatable = this.getOrientable( w, pos ); final IOrientable rotatable = this.getOrientable( w, pos );
@ -514,40 +514,40 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return false; return false;
} }
protected void customRotateBlock( IOrientable rotatable, EnumFacing axis ) protected void customRotateBlock( final IOrientable rotatable, final EnumFacing axis )
{ {
} }
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up ) public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
{ {
return true; return true;
} }
@Override @Override
public EnumFacing[] getValidRotations( World w, BlockPos pos ) public EnumFacing[] getValidRotations( final World w, final BlockPos pos )
{ {
return new EnumFacing[0]; return new EnumFacing[0];
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
super.getSubBlocks( item, tabs, itemStacks ); super.getSubBlocks( item, tabs, itemStacks );
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void setRenderStateByMeta( int itemDamage ) public void setRenderStateByMeta( final int itemDamage )
{ {
} }
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( final ItemStack is )
{ {
return this.getUnlocalizedName(); return this.getUnlocalizedName();
} }
public void addInformation( ItemStack is, EntityPlayer player, List<String> lines, boolean advancedItemTooltips ) public void addInformation( final ItemStack is, final EntityPlayer player, final List<String> lines, final boolean advancedItemTooltips )
{ {
} }
@ -563,8 +563,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
} }
public EnumFacing mapRotation( public EnumFacing mapRotation(
IOrientable ori, final IOrientable ori,
EnumFacing dir ) final EnumFacing dir )
{ {
// case DOWN: return bottomIcon; // case DOWN: return bottomIcon;
// case UP: return blockIcon; // case UP: return blockIcon;
@ -581,12 +581,12 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return dir; return dir;
} }
int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY(); final int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ(); final int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX(); final int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
EnumFacing west = null; EnumFacing west = null;
for( EnumFacing dx : EnumFacing.VALUES ) for( final EnumFacing dx : EnumFacing.VALUES )
{ {
if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z ) if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z )
{ {
@ -629,8 +629,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void registerBlockIcons( public void registerBlockIcons(
TextureMap clientHelper, final TextureMap clientHelper,
String name ) final String name )
{ {
final BlockRenderInfo info = this.getRendererInstance(); final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon topIcon; final FlippableIcon topIcon;
@ -647,7 +647,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
private FlippableIcon optionalIcon( TextureMap ir, String name, IAESprite substitute ) private FlippableIcon optionalIcon( final TextureMap ir, final String name, IAESprite substitute )
{ {
// if the input is an flippable IAESprite find the original. // if the input is an flippable IAESprite find the original.
while( substitute instanceof FlippableIcon ) while( substitute instanceof FlippableIcon )
@ -659,26 +659,26 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
{ {
try try
{ {
ResourceLocation resLoc = new ResourceLocation( AppEng.MOD_ID, String.format( "%s/%s%s", "textures/blocks", name, ".png" ) ); final ResourceLocation resLoc = new ResourceLocation( AppEng.MOD_ID, String.format( "%s/%s%s", "textures/blocks", name, ".png" ) );
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc ); final IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
if( res != null ) if( res != null )
{ {
return new FlippableIcon( new BaseIcon( ir.registerSprite( new ResourceLocation(AppEng.MOD_ID, "blocks/" + name ) ) ) ); return new FlippableIcon( new BaseIcon( ir.registerSprite( new ResourceLocation(AppEng.MOD_ID, "blocks/" + name ) ) ) );
} }
} }
catch( Throwable e ) catch( final Throwable e )
{ {
return new FlippableIcon( substitute ); return new FlippableIcon( substitute );
} }
} }
ResourceLocation resLoc = new ResourceLocation(AppEng.MOD_ID, "blocks/" + name ); final ResourceLocation resLoc = new ResourceLocation(AppEng.MOD_ID, "blocks/" + name );
return new FlippableIcon(new BaseIcon( ir.registerSprite( resLoc ) ) ); return new FlippableIcon(new BaseIcon( ir.registerSprite( resLoc ) ) );
} }
String textureName; String textureName;
public void setBlockTextureName( String texture ) public void setBlockTextureName( final String texture )
{ {
textureName = texture; textureName = texture;
} }

View file

@ -46,7 +46,7 @@ public class AEBaseItemBlock extends ItemBlock
private final AEBaseBlock blockType; private final AEBaseBlock blockType;
public AEBaseItemBlock( Block id ) public AEBaseItemBlock( final Block id )
{ {
super( id ); super( id );
this.blockType = (AEBaseBlock) id; this.blockType = (AEBaseBlock) id;
@ -54,7 +54,7 @@ public class AEBaseItemBlock extends ItemBlock
} }
@Override @Override
public int getMetadata( int dmg ) public int getMetadata( final int dmg )
{ {
if( this.hasSubtypes ) if( this.hasSubtypes )
{ {
@ -66,40 +66,40 @@ public class AEBaseItemBlock extends ItemBlock
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
public final void addInformation( ItemStack itemStack, EntityPlayer player, List toolTip, boolean advancedTooltips ) public final void addInformation( final ItemStack itemStack, final EntityPlayer player, final List toolTip, final boolean advancedTooltips )
{ {
this.addCheckedInformation( itemStack, player, toolTip, advancedTooltips ); this.addCheckedInformation( itemStack, player, toolTip, advancedTooltips );
} }
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedToolTips ) public void addCheckedInformation( final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip, final boolean advancedToolTips )
{ {
this.blockType.addInformation( itemStack, player, toolTip, advancedToolTips ); this.blockType.addInformation( itemStack, player, toolTip, advancedToolTips );
} }
@Override @Override
public boolean isBookEnchantable( ItemStack itemstack1, ItemStack itemstack2 ) public boolean isBookEnchantable( final ItemStack itemstack1, final ItemStack itemstack2 )
{ {
return false; return false;
} }
@Override @Override
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( final ItemStack is )
{ {
return this.blockType.getUnlocalizedName( is ); return this.blockType.getUnlocalizedName( is );
} }
@Override @Override
public boolean placeBlockAt( public boolean placeBlockAt(
ItemStack stack, final ItemStack stack,
EntityPlayer player, final EntityPlayer player,
World w, final World w,
BlockPos pos, final BlockPos pos,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ, final float hitZ,
IBlockState newState ) final IBlockState newState )
{ {
EnumFacing up = null; EnumFacing up = null;
EnumFacing forward = null; EnumFacing forward = null;
@ -134,7 +134,7 @@ public class AEBaseItemBlock extends ItemBlock
{ {
up = EnumFacing.UP; up = EnumFacing.UP;
byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 ); final byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
switch( rotation ) switch( rotation )
{ {
@ -187,7 +187,7 @@ public class AEBaseItemBlock extends ItemBlock
{ {
if( this.blockType instanceof AEBaseTileBlock && !( this.blockType instanceof BlockLightDetector ) ) if( this.blockType instanceof AEBaseTileBlock && !( this.blockType instanceof BlockLightDetector ) )
{ {
AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, pos ); final AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, pos );
ori = tile; ori = tile;
if( tile == null ) if( tile == null )

View file

@ -40,18 +40,18 @@ import appeng.util.Platform;
public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEItemPowerStorage public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEItemPowerStorage
{ {
public AEBaseItemBlockChargeable( Block id ) public AEBaseItemBlockChargeable( final Block id )
{ {
super( id ); super( id );
} }
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedTooltips ) public void addCheckedInformation( final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip, final boolean advancedTooltips )
{ {
final NBTTagCompound tag = itemStack.getTagCompound(); final NBTTagCompound tag = itemStack.getTagCompound();
double internalCurrentPower = 0; double internalCurrentPower = 0;
double internalMaxPower = this.getMaxEnergyCapacity(); final double internalMaxPower = this.getMaxEnergyCapacity();
if( tag != null ) if( tag != null )
{ {
@ -67,7 +67,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
{ {
final Block blockID = Block.getBlockFromItem( this ); final Block blockID = Block.getBlockFromItem( this );
final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell(); final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell();
for( Block block : energyCell.maybeBlock().asSet() ) for( final Block block : energyCell.maybeBlock().asSet() )
{ {
if( blockID == block ) if( blockID == block )
{ {
@ -83,10 +83,10 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
} }
@Override @Override
public double injectAEPower( ItemStack is, double amt ) public double injectAEPower( final ItemStack is, double amt )
{ {
double internalCurrentPower = this.getInternal( is ); double internalCurrentPower = this.getInternal( is );
double internalMaxPower = this.getMaxEnergyCapacity(); final double internalMaxPower = this.getMaxEnergyCapacity();
internalCurrentPower += amt; internalCurrentPower += amt;
if( internalCurrentPower > internalMaxPower ) if( internalCurrentPower > internalMaxPower )
{ {
@ -100,20 +100,20 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
return 0; return 0;
} }
private double getInternal( ItemStack is ) private double getInternal( final ItemStack is )
{ {
final NBTTagCompound nbt = Platform.openNbtData( is ); final NBTTagCompound nbt = Platform.openNbtData( is );
return nbt.getDouble( "internalCurrentPower" ); return nbt.getDouble( "internalCurrentPower" );
} }
private void setInternal( ItemStack is, double amt ) private void setInternal( final ItemStack is, final double amt )
{ {
final NBTTagCompound nbt = Platform.openNbtData( is ); final NBTTagCompound nbt = Platform.openNbtData( is );
nbt.setDouble( "internalCurrentPower", amt ); nbt.setDouble( "internalCurrentPower", amt );
} }
@Override @Override
public double extractAEPower( ItemStack is, double amt ) public double extractAEPower( final ItemStack is, double amt )
{ {
double internalCurrentPower = this.getInternal( is ); double internalCurrentPower = this.getInternal( is );
if( internalCurrentPower > amt ) if( internalCurrentPower > amt )
@ -129,19 +129,19 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
} }
@Override @Override
public double getAEMaxPower( ItemStack is ) public double getAEMaxPower( final ItemStack is )
{ {
return this.getMaxEnergyCapacity(); return this.getMaxEnergyCapacity();
} }
@Override @Override
public double getAECurrentPower( ItemStack is ) public double getAECurrentPower( final ItemStack is )
{ {
return this.getInternal( is ); return this.getInternal( is );
} }
@Override @Override
public AccessRestriction getPowerFlow( ItemStack is ) public AccessRestriction getPowerFlow( final ItemStack is )
{ {
return AccessRestriction.WRITE; return AccessRestriction.WRITE;
} }

View file

@ -37,7 +37,7 @@ public abstract class AEBaseStairBlock extends BlockStairs implements IAEFeature
{ {
private final IFeatureHandler features; private final IFeatureHandler features;
protected AEBaseStairBlock( Block block, EnumSet<AEFeature> features, String type ) protected AEBaseStairBlock( final Block block, final EnumSet<AEFeature> features, final String type )
{ {
super( block.getStateFromMeta( 0 ) ); super( block.getStateFromMeta( 0 ) );

View file

@ -71,24 +71,24 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Nonnull @Nonnull
private Class<? extends TileEntity> tileEntityType; private Class<? extends TileEntity> tileEntityType;
public AEBaseTileBlock( Material mat ) public AEBaseTileBlock( final Material mat )
{ {
super( mat ); super( mat );
} }
protected AEBaseTileBlock( Material mat, Optional<String> subName ) protected AEBaseTileBlock( final Material mat, final Optional<String> subName )
{ {
super( mat, subName ); super( mat, subName );
} }
@Override @Override
protected void setFeature( EnumSet<AEFeature> f ) protected void setFeature( final EnumSet<AEFeature> f )
{ {
final AETileBlockFeatureHandler featureHandler = new AETileBlockFeatureHandler( f, this, this.featureSubName ); final AETileBlockFeatureHandler featureHandler = new AETileBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler ); this.setHandler( featureHandler );
} }
protected void setTileEntity( Class<? extends TileEntity> c ) protected void setTileEntity( final Class<? extends TileEntity> c )
{ {
this.tileEntityType = c; this.tileEntityType = c;
this.isInventory = IInventory.class.isAssignableFrom( c ); this.isInventory = IInventory.class.isAssignableFrom( c );
@ -97,7 +97,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
// update Block value. // update Block value.
private void setTileProvider( boolean b ) private void setTileProvider( final boolean b )
{ {
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" ); ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
} }
@ -113,13 +113,13 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
} }
@Nullable @Nullable
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z ) public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final int x, final int y, final int z )
{ {
return getTileEntity( w, new BlockPos(x,y,z) ); return getTileEntity( w, new BlockPos(x,y,z) );
} }
@Nullable @Nullable
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, BlockPos pos ) public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final BlockPos pos )
{ {
if( !this.hasBlockTileEntity() ) if( !this.hasBlockTileEntity() )
{ {
@ -136,7 +136,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
} }
@Override @Override
public final TileEntity createNewTileEntity( World var1, int var2 ) public final TileEntity createNewTileEntity( final World var1, final int var2 )
{ {
if( this.hasBlockTileEntity() ) if( this.hasBlockTileEntity() )
{ {
@ -144,11 +144,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
{ {
return this.tileEntityType.newInstance(); return this.tileEntityType.newInstance();
} }
catch( InstantiationException e ) catch( final InstantiationException e )
{ {
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType, e ); throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType, e );
} }
catch( IllegalAccessException e ) catch( final IllegalAccessException e )
{ {
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e ); throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
} }
@ -159,9 +159,9 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public void breakBlock( public void breakBlock(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state ) final IBlockState state )
{ {
final AEBaseTile te = this.getTileEntity( w,pos ); final AEBaseTile te = this.getTileEntity( w,pos );
if( te != null ) if( te != null )
@ -185,7 +185,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
} }
@Override @Override
public final EnumFacing[] getValidRotations( World w, BlockPos pos ) public final EnumFacing[] getValidRotations( final World w, final BlockPos pos )
{ {
final AEBaseTile obj = this.getTileEntity( w, pos ); final AEBaseTile obj = this.getTileEntity( w, pos );
if( obj != null && obj.canBeRotated() ) if( obj != null && obj.canBeRotated() )
@ -198,10 +198,10 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public boolean recolorBlock( public boolean recolorBlock(
World world, final World world,
BlockPos pos, final BlockPos pos,
EnumFacing side, final EnumFacing side,
EnumDyeColor color ) final EnumDyeColor color )
{ {
final TileEntity te = this.getTileEntity( world, pos ); final TileEntity te = this.getTileEntity( world, pos );
@ -224,8 +224,8 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public int getComparatorInputOverride( public int getComparatorInputOverride(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
final TileEntity te = this.getTileEntity( w, pos ); final TileEntity te = this.getTileEntity( w, pos );
if( te instanceof IInventory ) if( te instanceof IInventory )
@ -237,11 +237,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public boolean onBlockEventReceived( public boolean onBlockEventReceived(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
int eventID, final int eventID,
int eventParam ) final int eventParam )
{ {
super.onBlockEventReceived( worldIn, pos, state ,eventID, eventParam); super.onBlockEventReceived( worldIn, pos, state ,eventID, eventParam);
final TileEntity tileentity = worldIn.getTileEntity( pos ); final TileEntity tileentity = worldIn.getTileEntity( pos );
@ -250,11 +250,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public void onBlockPlacedBy( public void onBlockPlacedBy(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityLivingBase placer, final EntityLivingBase placer,
ItemStack is ) final ItemStack is )
{ {
if( is.hasDisplayName() ) if( is.hasDisplayName() )
{ {
@ -268,14 +268,14 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
@Override @Override
public boolean onBlockActivated( public boolean onBlockActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player != null ) if( player != null )
{ {
@ -301,7 +301,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
} }
final ItemStack op = new ItemStack( this ); final ItemStack op = new ItemStack( this );
for( ItemStack ol : drops ) for( final ItemStack ol : drops )
{ {
if( Platform.isSameItemType( ol, op ) ) if( Platform.isSameItemType( ol, op ) )
{ {
@ -365,13 +365,13 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
} }
@Override @Override
public IOrientable getOrientable( IBlockAccess w, BlockPos pos ) public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{ {
return this.getTileEntity( w, pos ); return this.getTileEntity( w, pos );
} }
@Override @Override
public ICustomCollision getCustomCollision( World w, BlockPos pos ) public ICustomCollision getCustomCollision( final World w, final BlockPos pos )
{ {
final AEBaseTile te = this.getTileEntity( w, pos ); final AEBaseTile te = this.getTileEntity( w, pos );
if( te instanceof ICustomCollision ) if( te instanceof ICustomCollision )

View file

@ -24,7 +24,7 @@ import net.minecraft.block.material.Material;
public abstract class AEDecorativeBlock extends AEBaseBlock public abstract class AEDecorativeBlock extends AEBaseBlock
{ {
public AEDecorativeBlock( Material mat ) public AEDecorativeBlock( final Material mat )
{ {
super( mat ); super( mat );
} }

View file

@ -53,12 +53,12 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
@Override @Override
public IAESprite getIcon( public IAESprite getIcon(
EnumFacing side, final EnumFacing side,
IBlockState state ) final IBlockState state )
{ {
if( side != EnumFacing.SOUTH ) if( side != EnumFacing.SOUTH )
{ {
for( Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() ) for( final Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
{ {
return ( (BlockCraftingUnit)craftingUnitBlock ).getIcon( side, state ); return ( (BlockCraftingUnit)craftingUnitBlock ).getIcon( side, state );
} }
@ -69,7 +69,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
itemStacks.add( new ItemStack( this, 1, 0 ) ); itemStacks.add( new ItemStack( this, 1, 0 ) );
} }

View file

@ -33,7 +33,7 @@ import appeng.tile.crafting.TileCraftingStorageTile;
public class BlockCraftingStorage extends BlockCraftingUnit public class BlockCraftingStorage extends BlockCraftingUnit
{ {
public BlockCraftingStorage( CraftingUnitType type ) public BlockCraftingStorage( final CraftingUnitType type )
{ {
super(type ); super(type );
this.setTileEntity( TileCraftingStorageTile.class ); this.setTileEntity( TileCraftingStorageTile.class );
@ -46,9 +46,9 @@ public class BlockCraftingStorage extends BlockCraftingUnit
} }
@Override @Override
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, net.minecraft.block.state.IBlockState state) public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
{ {
boolean formed = (boolean)state.getValue( FORMED ); final boolean formed = (boolean)state.getValue( FORMED );
switch( this.type ) switch( this.type )
{ {
default: default:
@ -74,7 +74,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
itemStacks.add( new ItemStack( this, 1, 0 ) ); itemStacks.add( new ItemStack( this, 1, 0 ) );
itemStacks.add( new ItemStack( this, 1, 1 ) ); itemStacks.add( new ItemStack( this, 1, 1 ) );
@ -83,7 +83,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
} }
@Override @Override
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( final ItemStack is )
{ {
if( is.getItemDamage() == 1 ) if( is.getItemDamage() == 1 )
{ {

View file

@ -61,7 +61,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
final public CraftingUnitType type; final public CraftingUnitType type;
public BlockCraftingUnit( CraftingUnitType type ) public BlockCraftingUnit( final CraftingUnitType type )
{ {
super( Material.iron, Optional.of( type.name() ) ); super( Material.iron, Optional.of( type.name() ) );
@ -71,23 +71,23 @@ public class BlockCraftingUnit extends AEBaseTileBlock
} }
@Override @Override
public IBlockState getStateFromMeta( int meta ) public IBlockState getStateFromMeta( final int meta )
{ {
return getDefaultState().withProperty( POWERED, ( meta & 1 ) == 1 ).withProperty( FORMED, ( meta & 2 ) == 2 ); return getDefaultState().withProperty( POWERED, ( meta & 1 ) == 1 ).withProperty( FORMED, ( meta & 2 ) == 2 );
} }
@Override @Override
public int getMetaFromState( IBlockState state ) public int getMetaFromState( final IBlockState state )
{ {
boolean p = (boolean) state.getValue( POWERED ); final boolean p = (boolean) state.getValue( POWERED );
boolean f = (boolean) state.getValue( FORMED ); final boolean f = (boolean) state.getValue( FORMED );
return ( p ? 1 : 0 ) | ( f ? 2 : 0 ); return ( p ? 1 : 0 ) | ( f ? 2 : 0 );
} }
@Override @Override
public void onNeighborBlockChange( World worldIn, BlockPos pos, IBlockState state, Block neighborBlock ) public void onNeighborBlockChange( final World worldIn, final BlockPos pos, final IBlockState state, final Block neighborBlock )
{ {
TileCraftingTile cp = this.getTileEntity( worldIn, pos ); final TileCraftingTile cp = this.getTileEntity( worldIn, pos );
if( cp != null ) if( cp != null )
{ {
cp.updateMultiBlock(); cp.updateMultiBlock();
@ -101,9 +101,9 @@ public class BlockCraftingUnit extends AEBaseTileBlock
} }
@Override @Override
public void breakBlock( World w, BlockPos pos, IBlockState state ) public void breakBlock( final World w, final BlockPos pos, final IBlockState state )
{ {
TileCraftingTile cp = this.getTileEntity( w, pos ); final TileCraftingTile cp = this.getTileEntity( w, pos );
if( cp != null ) if( cp != null )
{ {
cp.breakCluster(); cp.breakCluster();
@ -113,9 +113,9 @@ public class BlockCraftingUnit extends AEBaseTileBlock
} }
@Override @Override
public boolean onBlockActivated( World w, BlockPos pos, IBlockState state, EntityPlayer p, EnumFacing side, float hitX, float hitY, float hitZ ) public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{ {
TileCraftingTile tg = this.getTileEntity( w, pos ); final TileCraftingTile tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() ) if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
{ {
if( Platform.isClient() ) if( Platform.isClient() )
@ -130,7 +130,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
return false; return false;
} }
protected String getItemUnlocalizedName( ItemStack is ) protected String getItemUnlocalizedName( final ItemStack is )
{ {
return super.getUnlocalizedName( is ); return super.getUnlocalizedName( is );
} }
@ -151,7 +151,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
} }
@Override @Override
public appeng.client.texture.IAESprite getIcon( EnumFacing side, IBlockState state ) public appeng.client.texture.IAESprite getIcon( final EnumFacing side, final IBlockState state )
{ {
if( type == CraftingUnitType.ACCELERATOR ) if( type == CraftingUnitType.ACCELERATOR )
{ {
@ -173,14 +173,14 @@ public class BlockCraftingUnit extends AEBaseTileBlock
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
itemStacks.add( new ItemStack( this, 1, 0 ) ); itemStacks.add( new ItemStack( this, 1, 0 ) );
itemStacks.add( new ItemStack( this, 1, 1 ) ); itemStacks.add( new ItemStack( this, 1, 1 ) );
} }
@Override @Override
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( final ItemStack is )
{ {
if( is.getItemDamage() == 1 ) if( is.getItemDamage() == 1 )
{ {

View file

@ -54,7 +54,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
} }
@Override @Override
public boolean canRenderInLayer(net.minecraft.util.EnumWorldBlockLayer layer) { public boolean canRenderInLayer( final net.minecraft.util.EnumWorldBlockLayer layer) {
return layer == EnumWorldBlockLayer.CUTOUT_MIPPED; return layer == EnumWorldBlockLayer.CUTOUT_MIPPED;
} }
@ -67,16 +67,16 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
@Override @Override
public boolean onBlockActivated( public boolean onBlockActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
TileMolecularAssembler tg = this.getTileEntity( w, pos ); final TileMolecularAssembler tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() ) if( tg != null && !p.isSneaking() )
{ {
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_MAC ); Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_MAC );

View file

@ -30,15 +30,15 @@ import appeng.core.features.AEFeature;
public class ItemCraftingStorage extends AEBaseItemBlock public class ItemCraftingStorage extends AEBaseItemBlock
{ {
public ItemCraftingStorage( Block id ) public ItemCraftingStorage( final Block id )
{ {
super( id ); super( id );
} }
@Override @Override
public ItemStack getContainerItem( ItemStack itemStack ) public ItemStack getContainerItem( final ItemStack itemStack )
{ {
for( ItemStack stack : AEApi.instance().definitions().blocks().craftingUnit().maybeStack( 1 ).asSet() ) for( final ItemStack stack : AEApi.instance().definitions().blocks().craftingUnit().maybeStack( 1 ).asSet() )
{ {
return stack; return stack;
} }
@ -47,7 +47,7 @@ public class ItemCraftingStorage extends AEBaseItemBlock
} }
@Override @Override
public boolean hasContainerItem( ItemStack stack ) public boolean hasContainerItem( final ItemStack stack )
{ {
return AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting ); return AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting );
} }

View file

@ -64,13 +64,13 @@ public class BlockCrank extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player instanceof FakePlayer || player == null ) if( player instanceof FakePlayer || player == null )
{ {
@ -78,7 +78,7 @@ public class BlockCrank extends AEBaseTileBlock
return true; return true;
} }
AEBaseTile tile = this.getTileEntity( w, pos ); final AEBaseTile tile = this.getTileEntity( w, pos );
if( tile instanceof TileCrank ) if( tile instanceof TileCrank )
{ {
if( ( (TileCrank) tile ).power() ) if( ( (TileCrank) tile ).power() )
@ -90,7 +90,7 @@ public class BlockCrank extends AEBaseTileBlock
return true; return true;
} }
private void dropCrank( World world, BlockPos pos ) private void dropCrank( final World world, final BlockPos pos )
{ {
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true ); world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
world.markBlockForUpdate( pos ); world.markBlockForUpdate( pos );
@ -98,16 +98,16 @@ public class BlockCrank extends AEBaseTileBlock
@Override @Override
public void onBlockPlacedBy( public void onBlockPlacedBy(
World world, final World world,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityLivingBase placer, final EntityLivingBase placer,
ItemStack stack ) final ItemStack stack )
{ {
AEBaseTile tile = this.getTileEntity( world, pos ); final AEBaseTile tile = this.getTileEntity( world, pos );
if( tile != null ) if( tile != null )
{ {
EnumFacing mnt = this.findCrankable( world, pos ); final EnumFacing mnt = this.findCrankable( world, pos );
EnumFacing forward = EnumFacing.UP; EnumFacing forward = EnumFacing.UP;
if( mnt == EnumFacing.UP || mnt == EnumFacing.DOWN ) if( mnt == EnumFacing.UP || mnt == EnumFacing.DOWN )
{ {
@ -123,18 +123,18 @@ public class BlockCrank extends AEBaseTileBlock
@Override @Override
public boolean isValidOrientation( public boolean isValidOrientation(
World w, final World w,
BlockPos pos, final BlockPos pos,
EnumFacing forward, final EnumFacing forward,
EnumFacing up ) final EnumFacing up )
{ {
TileEntity te = w.getTileEntity( pos ); final TileEntity te = w.getTileEntity( pos );
return !( te instanceof TileCrank ) || this.isCrankable( w, pos, up.getOpposite() ); return !( te instanceof TileCrank ) || this.isCrankable( w, pos, up.getOpposite() );
} }
private EnumFacing findCrankable( World world, BlockPos pos ) private EnumFacing findCrankable( final World world, final BlockPos pos )
{ {
for( EnumFacing dir : EnumFacing.VALUES ) for( final EnumFacing dir : EnumFacing.VALUES )
{ {
if( this.isCrankable( world, pos, dir ) ) if( this.isCrankable( world, pos, dir ) )
{ {
@ -144,23 +144,23 @@ public class BlockCrank extends AEBaseTileBlock
return null; return null;
} }
private boolean isCrankable( World world, BlockPos pos, EnumFacing offset ) private boolean isCrankable( final World world, final BlockPos pos, final EnumFacing offset )
{ {
BlockPos o = pos.offset( offset); final BlockPos o = pos.offset( offset);
TileEntity te = world.getTileEntity( o ); final TileEntity te = world.getTileEntity( o );
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() ); return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
} }
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World world, final World world,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
AEBaseTile tile = this.getTileEntity( world, pos ); final AEBaseTile tile = this.getTileEntity( world, pos );
if( tile != null ) if( tile != null )
{ {
if( !this.isCrankable( world, pos, tile.getUp().getOpposite() ) ) if( !this.isCrankable( world, pos, tile.getUp().getOpposite() ) )
@ -175,7 +175,7 @@ public class BlockCrank extends AEBaseTileBlock
} }
@Override @Override
public boolean canPlaceBlockAt( World world, BlockPos pos ) public boolean canPlaceBlockAt( final World world, final BlockPos pos )
{ {
return this.findCrankable( world, pos ) != null; return this.findCrankable( world, pos ) != null;
} }

View file

@ -49,14 +49,14 @@ public class BlockGrinder extends AEBaseTileBlock
@Override @Override
public boolean onBlockActivated( public boolean onBlockActivated(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityPlayer playerIn, final EntityPlayer playerIn,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ ); return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ );
@ -64,15 +64,15 @@ public class BlockGrinder extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
TileGrinder tg = this.getTileEntity( w, pos ); final TileGrinder tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() ) if( tg != null && !p.isSneaking() )
{ {
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_GRINDER ); Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_GRINDER );

View file

@ -47,20 +47,20 @@ public class BlockCellWorkbench extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileCellWorkbench tg = this.getTileEntity( w, pos ); final TileCellWorkbench tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )

View file

@ -71,13 +71,13 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player.isSneaking() ) if( player.isSneaking() )
{ {
@ -86,7 +86,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
if( Platform.isServer() ) if( Platform.isServer() )
{ {
TileCharger tc = this.getTileEntity( w, pos ); final TileCharger tc = this.getTileEntity( w, pos );
if( tc != null ) if( tc != null )
{ {
tc.activate( player ); tc.activate( player );
@ -99,10 +99,10 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void randomDisplayTick( public void randomDisplayTick(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random r ) final Random r )
{ {
if( !AEConfig.instance.enableEffects ) if( !AEConfig.instance.enableEffects )
{ {
@ -114,22 +114,22 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
return; return;
} }
AEBaseTile tile = this.getTileEntity( w, pos ); final AEBaseTile tile = this.getTileEntity( w, pos );
if( tile instanceof TileCharger ) if( tile instanceof TileCharger )
{ {
TileCharger tc = (TileCharger) tile; final TileCharger tc = (TileCharger) tile;
if( AEApi.instance().definitions().materials().certusQuartzCrystalCharged().isSameAs( tc.getStackInSlot( 0 ) ) ) if( AEApi.instance().definitions().materials().certusQuartzCrystalCharged().isSameAs( tc.getStackInSlot( 0 ) ) )
{ {
double xOff = 0.0; final double xOff = 0.0;
double yOff = 0.0; final double yOff = 0.0;
double zOff = 0.0; final double zOff = 0.0;
for( int bolts = 0; bolts < 3; bolts++ ) for( int bolts = 0; bolts < 3; bolts++ )
{ {
if( CommonHelper.proxy.shouldAddParticles( r ) ) if( CommonHelper.proxy.shouldAddParticles( r ) )
{ {
LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D ); final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
@ -139,18 +139,18 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
TileCharger tile = this.getTileEntity( w, pos ); final TileCharger tile = this.getTileEntity( w, pos );
if( tile != null ) if( tile != null )
{ {
double twoPixels = 2.0 / 16.0; final double twoPixels = 2.0 / 16.0;
EnumFacing up = tile.getUp(); final EnumFacing up = tile.getUp();
EnumFacing forward = tile.getForward(); final EnumFacing forward = tile.getForward();
AEAxisAlignedBB bb = AEAxisAlignedBB.fromBounds( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels ); final AEAxisAlignedBB bb = AEAxisAlignedBB.fromBounds( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
if( up.getFrontOffsetX() != 0 ) if( up.getFrontOffsetX() != 0 )
{ {
@ -199,11 +199,11 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
} }

View file

@ -47,13 +47,13 @@ public class BlockCondenser extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player.isSneaking() ) if( player.isSneaking() )
{ {
@ -62,7 +62,7 @@ public class BlockCondenser extends AEBaseTileBlock
if( Platform.isServer() ) if( Platform.isServer() )
{ {
TileCondenser tc = this.getTileEntity( w, pos ); final TileCondenser tc = this.getTileEntity( w, pos );
if( tc != null && !player.isSneaking() ) if( tc != null && !player.isSneaking() )
{ {
Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_CONDENSER ); Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_CONDENSER );

View file

@ -58,20 +58,20 @@ public class BlockInscriber extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileInscriber tg = this.getTileEntity( w, pos ); final TileInscriber tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
@ -84,7 +84,7 @@ public class BlockInscriber extends AEBaseTileBlock
} }
@Override @Override
public String getUnlocalizedName( ItemStack is ) public String getUnlocalizedName( final ItemStack is )
{ {
return super.getUnlocalizedName( is ); return super.getUnlocalizedName( is );
} }

View file

@ -56,20 +56,20 @@ public class BlockInterface extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileInterface tg = this.getTileEntity( w, pos ); final TileInterface tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
@ -88,7 +88,7 @@ public class BlockInterface extends AEBaseTileBlock
} }
@Override @Override
protected void customRotateBlock( IOrientable rotatable, EnumFacing axis ) protected void customRotateBlock( final IOrientable rotatable, final EnumFacing axis )
{ {
if( rotatable instanceof TileInterface ) if( rotatable instanceof TileInterface )
{ {

View file

@ -62,14 +62,14 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public int getMetaFromState( public int getMetaFromState(
IBlockState state ) final IBlockState state )
{ {
return 0; return 0;
} }
@Override @Override
public IBlockState getStateFromMeta( public IBlockState getStateFromMeta(
int meta ) final int meta )
{ {
return getDefaultState(); return getDefaultState();
} }
@ -82,10 +82,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public int isProvidingWeakPower( public int isProvidingWeakPower(
IBlockAccess w, final IBlockAccess w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EnumFacing side ) final EnumFacing side )
{ {
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, pos ) ).isReady() ) if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, pos ) ).isReady() )
{ {
@ -97,13 +97,13 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public void onNeighborChange( public void onNeighborChange(
IBlockAccess world, final IBlockAccess world,
BlockPos pos, final BlockPos pos,
BlockPos neighbor ) final BlockPos neighbor )
{ {
super.onNeighborChange( world, pos, neighbor ); super.onNeighborChange( world, pos, neighbor );
TileLightDetector tld = this.getTileEntity( world, pos ); final TileLightDetector tld = this.getTileEntity( world, pos );
if( tld != null ) if( tld != null )
{ {
tld.updateLight(); tld.updateLight();
@ -112,10 +112,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public void randomDisplayTick( public void randomDisplayTick(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random rand ) final Random rand )
{ {
// cancel out lightning // cancel out lightning
} }
@ -128,40 +128,40 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public boolean isValidOrientation( public boolean isValidOrientation(
World w, final World w,
BlockPos pos, final BlockPos pos,
EnumFacing forward, final EnumFacing forward,
EnumFacing up ) final EnumFacing up )
{ {
return this.canPlaceAt( w, pos, up.getOpposite() ); return this.canPlaceAt( w, pos, up.getOpposite() );
} }
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir ) private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
{ {
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false ); return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
EnumFacing up = this.getOrientable( w, pos ).getUp(); final EnumFacing up = this.getOrientable( w, pos ).getUp();
double xOff = -0.3 * up.getFrontOffsetX(); final double xOff = -0.3 * up.getFrontOffsetX();
double yOff = -0.3 * up.getFrontOffsetY(); final double yOff = -0.3 * up.getFrontOffsetY();
double zOff = -0.3 * up.getFrontOffsetZ(); final double zOff = -0.3 * up.getFrontOffsetZ();
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) ); return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
} }
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{/* {/*
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 * * double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff * getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
@ -171,19 +171,19 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
EnumFacing up = this.getOrientable( w, pos ).getUp(); final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) ) if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
{ {
this.dropTorch( w, pos ); this.dropTorch( w, pos );
} }
} }
private void dropTorch( World w, BlockPos pos ) private void dropTorch( final World w, final BlockPos pos )
{ {
w.destroyBlock( pos, true ); w.destroyBlock( pos, true );
w.markBlockForUpdate( pos ); w.markBlockForUpdate( pos );
@ -191,10 +191,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
@Override @Override
public boolean canPlaceBlockAt( public boolean canPlaceBlockAt(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
for( EnumFacing dir : EnumFacing.VALUES ) for( final EnumFacing dir : EnumFacing.VALUES )
{ {
if( this.canPlaceAt( w, pos, dir ) ) if( this.canPlaceAt( w, pos, dir ) )
{ {
@ -211,7 +211,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
} }
@Override @Override
public IOrientable getOrientable( final IBlockAccess w, BlockPos pos ) public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{ {
return new MetaRotation( w, pos,true ); return new MetaRotation( w, pos,true );
} }

View file

@ -73,36 +73,36 @@ public class BlockPaint extends AEBaseTileBlock
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
// do nothing // do nothing
} }
@Override @Override
public AxisAlignedBB getCollisionBoundingBox( public AxisAlignedBB getCollisionBoundingBox(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state ) final IBlockState state )
{ {
return null; return null;
} }
@Override @Override
public boolean canCollideCheck( public boolean canCollideCheck(
IBlockState state, final IBlockState state,
boolean hitIfLiquid ) final boolean hitIfLiquid )
{ {
return false; return false;
} }
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TilePaint tp = this.getTileEntity( w, pos ); final TilePaint tp = this.getTileEntity( w, pos );
if( tp != null ) if( tp != null )
{ {
@ -112,28 +112,28 @@ public class BlockPaint extends AEBaseTileBlock
@Override @Override
public Item getItemDropped( public Item getItemDropped(
IBlockState state, final IBlockState state,
Random rand, final Random rand,
int fortune ) final int fortune )
{ {
return null; return null;
} }
@Override @Override
public void dropBlockAsItemWithChance( public void dropBlockAsItemWithChance(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
float chance, final float chance,
int fortune ) final int fortune )
{ {
} }
@Override @Override
public void fillWithRain( public void fillWithRain(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
{ {
@ -143,10 +143,10 @@ public class BlockPaint extends AEBaseTileBlock
@Override @Override
public int getLightValue( public int getLightValue(
IBlockAccess w, final IBlockAccess w,
BlockPos pos ) final BlockPos pos )
{ {
TilePaint tp = this.getTileEntity( w, pos ); final TilePaint tp = this.getTileEntity( w, pos );
if( tp != null ) if( tp != null )
{ {
@ -158,16 +158,16 @@ public class BlockPaint extends AEBaseTileBlock
@Override @Override
public boolean isAir( public boolean isAir(
IBlockAccess world, final IBlockAccess world,
BlockPos pos ) final BlockPos pos )
{ {
return true; return true;
} }
@Override @Override
public boolean isReplaceable( public boolean isReplaceable(
World worldIn, final World worldIn,
BlockPos pos ) final BlockPos pos )
{ {
return true; return true;
} }

View file

@ -58,48 +58,47 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
@Override @Override
public void randomDisplayTick( public void randomDisplayTick(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random r ) final Random r )
{ {
if( !AEConfig.instance.enableEffects ) if( !AEConfig.instance.enableEffects )
{ {
return; return;
} }
TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos ); final TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos );
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) ) if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{ {
double d0 = r.nextFloat() - 0.5F; final double d0 = r.nextFloat() - 0.5F;
double d1 = r.nextFloat() - 0.5F; final double d1 = r.nextFloat() - 0.5F;
EnumFacing up = cga.getUp(); final EnumFacing up = cga.getUp();
EnumFacing forward = cga.getForward(); final EnumFacing forward = cga.getForward();
EnumFacing west = Platform.crossProduct( forward, up ); final EnumFacing west = Platform.crossProduct( forward, up );
double rx = 0.5 + pos.getX(); double rx = 0.5 + pos.getX();
double ry = 0.5 + pos.getY(); double ry = 0.5 + pos.getY();
double rz = 0.5 + pos.getZ(); double rz = 0.5 + pos.getZ();
double dx = 0;
double dz = 0;
rx += up.getFrontOffsetX() * d0; rx += up.getFrontOffsetX() * d0;
ry += up.getFrontOffsetY() * d0; ry += up.getFrontOffsetY() * d0;
rz += up.getFrontOffsetZ() * d0; rz += up.getFrontOffsetZ() * d0;
int x = pos.getX(); final int x = pos.getX();
int y = pos.getY(); final int y = pos.getY();
int z = pos.getZ(); final int z = pos.getZ();
double dz = 0;
double dx = 0;
switch( r.nextInt( 4 ) ) switch( r.nextInt( 4 ) )
{ {
case 0: case 0:
dx = 0.6; dx = 0.6;
dz = d1; dz = d1;
BlockPos pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() ); final BlockPos pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() );
if( !w.getBlockState(pt).getBlock().isAir( w, pt) ) if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
{ {
return; return;
@ -142,7 +141,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
ry += dz * forward.getFrontOffsetY(); ry += dz * forward.getFrontOffsetY();
rz += dz * forward.getFrontOffsetZ(); rz += dz * forward.getFrontOffsetZ();
LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D ); final LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }

View file

@ -66,14 +66,14 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override @Override
public int getMetaFromState( public int getMetaFromState(
IBlockState state ) final IBlockState state )
{ {
return 0; return 0;
} }
@Override @Override
public IBlockState getStateFromMeta( public IBlockState getStateFromMeta(
int meta ) final int meta )
{ {
return getDefaultState(); return getDefaultState();
} }
@ -91,29 +91,29 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
} }
@Override @Override
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up ) public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
{ {
return this.canPlaceAt( w, pos, up.getOpposite() ); return this.canPlaceAt( w, pos, up.getOpposite() );
} }
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir ) private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
{ {
BlockPos test = pos.offset( dir ); final BlockPos test = pos.offset( dir );
return w.isSideSolid( test, dir.getOpposite(), false ); return w.isSideSolid( test, dir.getOpposite(), false );
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity e, boolean isVisual ) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity e, final boolean isVisual )
{ {
EnumFacing up = this.getOrientable( w, pos ).getUp(); final EnumFacing up = this.getOrientable( w, pos ).getUp();
double xOff = -0.3 * up.getFrontOffsetX(); final double xOff = -0.3 * up.getFrontOffsetX();
double yOff = -0.3 * up.getFrontOffsetY(); final double yOff = -0.3 * up.getFrontOffsetY();
double zOff = -0.3 * up.getFrontOffsetZ(); final double zOff = -0.3 * up.getFrontOffsetZ();
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) ); return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
} }
@Override @Override
public void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List out, Entity e ) public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List out, final Entity e )
{/* {/*
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 * * double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff * getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
@ -124,10 +124,10 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void randomDisplayTick( public void randomDisplayTick(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random r ) final Random r )
{ {
if( !AEConfig.instance.enableEffects ) if( !AEConfig.instance.enableEffects )
{ {
@ -139,15 +139,15 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
return; return;
} }
EnumFacing up = this.getOrientable( w, pos ).getUp(); final EnumFacing up = this.getOrientable( w, pos ).getUp();
double xOff = -0.3 * up.getFrontOffsetX(); final double xOff = -0.3 * up.getFrontOffsetX();
double yOff = -0.3 * up.getFrontOffsetY(); final double yOff = -0.3 * up.getFrontOffsetY();
double zOff = -0.3 * up.getFrontOffsetZ(); final double zOff = -0.3 * up.getFrontOffsetZ();
for( int bolts = 0; bolts < 3; bolts++ ) for( int bolts = 0; bolts < 3; bolts++ )
{ {
if( CommonHelper.proxy.shouldAddParticles( r ) ) if( CommonHelper.proxy.shouldAddParticles( r ) )
{ {
LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D ); final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
@ -156,28 +156,28 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
EnumFacing up = this.getOrientable( w, pos ).getUp(); final EnumFacing up = this.getOrientable( w, pos ).getUp();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) ) if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
{ {
this.dropTorch( w, pos ); this.dropTorch( w, pos );
} }
} }
private void dropTorch( World w, BlockPos pos ) private void dropTorch( final World w, final BlockPos pos )
{ {
w.destroyBlock( pos, true ); w.destroyBlock( pos, true );
w.markBlockForUpdate( pos ); w.markBlockForUpdate( pos );
} }
@Override @Override
public boolean canPlaceBlockAt( World w, BlockPos pos ) public boolean canPlaceBlockAt( final World w, final BlockPos pos )
{ {
for( EnumFacing dir : EnumFacing.VALUES ) for( final EnumFacing dir : EnumFacing.VALUES )
{ {
if( this.canPlaceAt( w, pos, dir ) ) if( this.canPlaceAt( w, pos, dir ) )
{ {
@ -194,7 +194,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
} }
@Override @Override
public IOrientable getOrientable( final IBlockAccess w, BlockPos pos ) public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
{ {
return new MetaRotation( w, pos,true ); return new MetaRotation( w, pos,true );
} }

View file

@ -62,20 +62,20 @@ public class BlockSecurity extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileSecurity tg = this.getTileEntity( w, pos ); final TileSecurity tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isClient() ) if( Platform.isClient() )

View file

@ -58,9 +58,9 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
} }
@Override @Override
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up ) public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
{ {
TileSkyCompass sc = this.getTileEntity( w, pos ); final TileSkyCompass sc = this.getTileEntity( w, pos );
if( sc != null ) if( sc != null )
{ {
return false; return false;
@ -68,27 +68,27 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
return this.canPlaceAt( w, pos, forward.getOpposite() ); return this.canPlaceAt( w, pos, forward.getOpposite() );
} }
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir ) private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
{ {
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false ); return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
} }
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileSkyCompass sc = this.getTileEntity( w, pos ); final TileSkyCompass sc = this.getTileEntity( w, pos );
EnumFacing up = sc.getForward(); final EnumFacing up = sc.getForward();
if( !this.canPlaceAt( w, pos, up.getOpposite() ) ) if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
{ {
this.dropTorch( w, pos ); this.dropTorch( w, pos );
} }
} }
private void dropTorch( World w, BlockPos pos ) private void dropTorch( final World w, final BlockPos pos )
{ {
w.destroyBlock( pos, true ); w.destroyBlock( pos, true );
w.markBlockForUpdate( pos ); w.markBlockForUpdate( pos );
@ -96,10 +96,10 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public boolean canPlaceBlockAt( public boolean canPlaceBlockAt(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
for( EnumFacing dir : EnumFacing.VALUES ) for( final EnumFacing dir : EnumFacing.VALUES )
{ {
if( this.canPlaceAt( w, pos, dir ) ) if( this.canPlaceAt( w, pos, dir ) )
{ {
@ -111,15 +111,15 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
TileSkyCompass tile = this.getTileEntity( w, pos ); final TileSkyCompass tile = this.getTileEntity( w, pos );
if( tile != null ) if( tile != null )
{ {
EnumFacing forward = tile.getForward(); final EnumFacing forward = tile.getForward();
double minX = 0; double minX = 0;
double minY = 0; double minY = 0;
@ -177,11 +177,11 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
} }

View file

@ -80,7 +80,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public boolean onActivated( World w, BlockPos pos, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ ) public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
{ {
if( player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel ) if( player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel )
{ {
@ -95,18 +95,18 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
} }
public void startFuse( World w, BlockPos pos, EntityLivingBase igniter ) public void startFuse( final World w, final BlockPos pos, final EntityLivingBase igniter )
{ {
if( !w.isRemote ) if( !w.isRemote )
{ {
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter ); final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
w.spawnEntityInWorld( primedTinyTNTEntity ); w.spawnEntityInWorld( primedTinyTNTEntity );
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F ); w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
} }
} }
@Override @Override
public void onNeighborBlockChange( World w, BlockPos pos, IBlockState state, Block neighborBlock ) public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
{ {
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 ) if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
{ {
@ -116,7 +116,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public void onBlockAdded( World w, BlockPos pos, IBlockState state ) public void onBlockAdded( final World w, final BlockPos pos, final IBlockState state )
{ {
super.onBlockAdded( w, pos, state ); super.onBlockAdded( w, pos, state );
@ -128,11 +128,11 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public void onEntityCollidedWithBlock( World w, BlockPos pos, Entity entity ) public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final Entity entity )
{ {
if( entity instanceof EntityArrow && !w.isRemote ) if( entity instanceof EntityArrow && !w.isRemote )
{ {
EntityArrow entityarrow = (EntityArrow) entity; final EntityArrow entityarrow = (EntityArrow) entity;
if( entityarrow.isBurning() ) if( entityarrow.isBurning() )
{ {
@ -143,30 +143,30 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
} }
@Override @Override
public boolean canDropFromExplosion( Explosion exp ) public boolean canDropFromExplosion( final Explosion exp )
{ {
return false; return false;
} }
@Override @Override
public void onBlockExploded( World w, BlockPos pos, Explosion exp ) public void onBlockExploded( final World w, final BlockPos pos, final Explosion exp )
{ {
if( !w.isRemote ) if( !w.isRemote )
{ {
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() ); final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8; primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
w.spawnEntityInWorld( primedTinyTNTEntity ); w.spawnEntityInWorld( primedTinyTNTEntity );
} }
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity thePlayer, boolean b ) public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
{ {
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) ); return Collections.singletonList( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
} }
@Override @Override
public void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e ) public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
{ {
out.add( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) ); out.add( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
} }

View file

@ -54,10 +54,10 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
} }
@Override @Override
public appeng.client.texture.IAESprite getIcon(IBlockAccess w, BlockPos pos, EnumFacing side) public appeng.client.texture.IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side)
{ {
IAESprite ico = super.getIcon( w, pos, side ); final IAESprite ico = super.getIcon( w, pos, side );
TileVibrationChamber tvc = this.getTileEntity( w, pos ); final TileVibrationChamber tvc = this.getTileEntity( w, pos );
if( tvc != null && tvc.isOn && ico == this.getRendererInstance().getTexture( AEPartLocation.SOUTH ) ) if( tvc != null && tvc.isOn && ico == this.getRendererInstance().getTexture( AEPartLocation.SOUTH ) )
{ {
@ -69,13 +69,13 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player.isSneaking() ) if( player.isSneaking() )
{ {
@ -84,7 +84,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
if( Platform.isServer() ) if( Platform.isServer() )
{ {
TileVibrationChamber tc = this.getTileEntity( w, pos ); final TileVibrationChamber tc = this.getTileEntity( w, pos );
if( tc != null && !player.isSneaking() ) if( tc != null && !player.isSneaking() )
{ {
Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_VIBRATION_CHAMBER ); Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_VIBRATION_CHAMBER );
@ -97,39 +97,39 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
@Override @Override
public void randomDisplayTick( public void randomDisplayTick(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random r ) final Random r )
{ {
if( !AEConfig.instance.enableEffects ) if( !AEConfig.instance.enableEffects )
{ {
return; return;
} }
AEBaseTile tile = this.getTileEntity( w, pos ); final AEBaseTile tile = this.getTileEntity( w, pos );
if( tile instanceof TileVibrationChamber ) if( tile instanceof TileVibrationChamber )
{ {
TileVibrationChamber tc = (TileVibrationChamber) tile; final TileVibrationChamber tc = (TileVibrationChamber) tile;
if( tc.isOn ) if( tc.isOn )
{ {
float f1 = pos.getX() + 0.5F; float f1 = pos.getX() + 0.5F;
float f2 = pos.getY() + 0.5F; float f2 = pos.getY() + 0.5F;
float f3 = pos.getZ() + 0.5F; float f3 = pos.getZ() + 0.5F;
EnumFacing forward = tc.getForward(); final EnumFacing forward = tc.getForward();
EnumFacing up = tc.getUp(); final EnumFacing up = tc.getUp();
int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY(); final int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ(); final int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX(); final int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
f1 += forward.getFrontOffsetX() * 0.6; f1 += forward.getFrontOffsetX() * 0.6;
f2 += forward.getFrontOffsetY() * 0.6; f2 += forward.getFrontOffsetY() * 0.6;
f3 += forward.getFrontOffsetZ() * 0.6; f3 += forward.getFrontOffsetZ() * 0.6;
float ox = r.nextFloat(); final float ox = r.nextFloat();
float oy = r.nextFloat() * 0.2f; final float oy = r.nextFloat() * 0.2f;
f1 += up.getFrontOffsetX() * ( -0.3 + oy ); f1 += up.getFrontOffsetX() * ( -0.3 + oy );
f2 += up.getFrontOffsetY() * ( -0.3 + oy ); f2 += up.getFrontOffsetY() * ( -0.3 + oy );

View file

@ -94,38 +94,38 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public void randomDisplayTick( public void randomDisplayTick(
World worldIn, final World worldIn,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random rand ) final Random rand )
{ {
this.cb( worldIn, pos ).randomDisplayTick( worldIn, pos, rand ); this.cb( worldIn, pos ).randomDisplayTick( worldIn, pos, rand );
} }
@Override @Override
public void onNeighborChange( public void onNeighborChange(
IBlockAccess w, final IBlockAccess w,
BlockPos pos, final BlockPos pos,
BlockPos neighbor ) final BlockPos neighbor )
{ {
this.cb( w, pos ).onNeighborChanged(); this.cb( w, pos ).onNeighborChanged();
} }
@Override @Override
public Item getItemDropped( public Item getItemDropped(
IBlockState state, final IBlockState state,
Random rand, final Random rand,
int fortune ) final int fortune )
{ {
return null; return null;
} }
@Override @Override
public int isProvidingWeakPower( public int isProvidingWeakPower(
IBlockAccess w, final IBlockAccess w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EnumFacing side ) final EnumFacing side )
{ {
return this.cb( w, pos ).isProvidingWeakPower( side.getOpposite() ); // TODO: IS OPPOSITE!? return this.cb( w, pos ).isProvidingWeakPower( side.getOpposite() ); // TODO: IS OPPOSITE!?
} }
@ -138,30 +138,30 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public void onEntityCollidedWithBlock( public void onEntityCollidedWithBlock(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Entity entityIn ) final Entity entityIn )
{ {
this.cb( w, pos ).onEntityCollision( entityIn ); this.cb( w, pos ).onEntityCollision( entityIn );
} }
@Override @Override
public int isProvidingStrongPower( public int isProvidingStrongPower(
IBlockAccess w, final IBlockAccess w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EnumFacing side ) final EnumFacing side )
{ {
return this.cb( w, pos ).isProvidingStrongPower( side.getOpposite() ); // TODO: IS OPPOSITE!? return this.cb( w, pos ).isProvidingStrongPower( side.getOpposite() ); // TODO: IS OPPOSITE!?
} }
@Override @Override
public int getLightValue( public int getLightValue(
IBlockAccess world, final IBlockAccess world,
BlockPos pos ) final BlockPos pos )
{ {
IBlockState block = world.getBlockState( pos ); final IBlockState block = world.getBlockState( pos );
if( block != null && block.getBlock() != this ) if( block != null && block.getBlock() != this )
{ {
return block.getBlock().getLightValue( world, pos ); return block.getBlock().getLightValue( world, pos );
@ -174,35 +174,35 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
} }
@Override @Override
public boolean isLadder( IBlockAccess world, BlockPos pos, EntityLivingBase entity ) public boolean isLadder( final IBlockAccess world, final BlockPos pos, final EntityLivingBase entity )
{ {
return this.cb( world, pos ).isLadder( entity ); return this.cb( world, pos ).isLadder( entity );
} }
@Override @Override
public boolean isSideSolid( IBlockAccess w, BlockPos pos, EnumFacing side ) public boolean isSideSolid( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
{ {
return this.cb( w, pos ).isSolidOnSide( side ); return this.cb( w, pos ).isSolidOnSide( side );
} }
@Override @Override
public boolean isReplaceable( public boolean isReplaceable(
World w, final World w,
BlockPos pos ) final BlockPos pos )
{ {
return this.cb( w, pos ).isEmpty(); return this.cb( w, pos ).isEmpty();
} }
@Override @Override
public boolean removedByPlayer( public boolean removedByPlayer(
World world, final World world,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
boolean willHarvest ) final boolean willHarvest )
{ {
if( player.capabilities.isCreativeMode ) if( player.capabilities.isCreativeMode )
{ {
AEBaseTile tile = this.getTileEntity( world, pos ); final AEBaseTile tile = this.getTileEntity( world, pos );
if( tile != null ) if( tile != null )
{ {
tile.disableDrops(); tile.disableDrops();
@ -214,8 +214,8 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public boolean canConnectRedstone( public boolean canConnectRedstone(
IBlockAccess w, final IBlockAccess w,
BlockPos pos, final BlockPos pos,
EnumFacing side ) EnumFacing side )
{ {
if ( side == null ) if ( side == null )
@ -226,7 +226,7 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public boolean canRenderInLayer( public boolean canRenderInLayer(
EnumWorldBlockLayer layer ) final EnumWorldBlockLayer layer )
{ {
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) ) if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
{ {
@ -238,12 +238,12 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public ItemStack getPickBlock( public ItemStack getPickBlock(
MovingObjectPosition target, final MovingObjectPosition target,
World world, final World world,
BlockPos pos ) final BlockPos pos )
{ {
Vec3 v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() ); final Vec3 v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
SelectedPart sp = this.cb( world, pos ).selectPart( v3 ); final SelectedPart sp = this.cb( world, pos ).selectPart( v3 );
if( sp.part != null ) if( sp.part != null )
{ {
@ -259,12 +259,12 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public boolean addHitEffects( World world, MovingObjectPosition target, EffectRenderer effectRenderer ) public boolean addHitEffects( final World world, final MovingObjectPosition target, final EffectRenderer effectRenderer )
{ {
Object object = this.cb( world, target.getBlockPos() ); final Object object = this.cb( world, target.getBlockPos() );
if( object instanceof IPartHost ) if( object instanceof IPartHost )
{ {
IPartHost host = (IPartHost) object; final IPartHost host = (IPartHost) object;
// TODO HIT EFFECTS // TODO HIT EFFECTS
/* /*
@ -310,14 +310,14 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public boolean addDestroyEffects( public boolean addDestroyEffects(
World world, final World world,
BlockPos pos, final BlockPos pos,
EffectRenderer effectRenderer ) final EffectRenderer effectRenderer )
{ {
Object object = this.cb( world, pos ); final Object object = this.cb( world, pos );
if( object instanceof IPartHost ) if( object instanceof IPartHost )
{ {
IPartHost host = (IPartHost) object; final IPartHost host = (IPartHost) object;
// TODO DESTROY EFFECTS // TODO DESTROY EFFECTS
/* /*
@ -359,10 +359,10 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
{ {
@ -370,9 +370,9 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
} }
} }
private ICableBusContainer cb( IBlockAccess w, BlockPos pos ) private ICableBusContainer cb( final IBlockAccess w, final BlockPos pos )
{ {
TileEntity te = w.getTileEntity( pos ); final TileEntity te = w.getTileEntity( pos );
ICableBusContainer out = null; ICableBusContainer out = null;
if( te instanceof TileCableBus ) if( te instanceof TileCableBus )
@ -395,54 +395,54 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
return this.cb( w, pos ).activate( player, new Vec3( hitX, hitY, hitZ ) ); return this.cb( w, pos ).activate( player, new Vec3( hitX, hitY, hitZ ) );
} }
@Override @Override
public boolean recolorBlock( public boolean recolorBlock(
World world, final World world,
BlockPos pos, final BlockPos pos,
EnumFacing side, final EnumFacing side,
EnumDyeColor color ) final EnumDyeColor color )
{ {
return this.recolorBlock( world, pos, side, color, null ); return this.recolorBlock( world, pos, side, color, null );
} }
public boolean recolorBlock( public boolean recolorBlock(
World world, final World world,
BlockPos pos, final BlockPos pos,
EnumFacing side, final EnumFacing side,
EnumDyeColor color, final EnumDyeColor color,
EntityPlayer who ) final EntityPlayer who )
{ {
try try
{ {
return this.cb( world, pos ).recolourBlock( side, AEColor.values()[ color.ordinal() ], who ); return this.cb( world, pos ).recolourBlock( side, AEColor.values()[ color.ordinal() ], who );
} }
catch( Throwable ignored ) catch( final Throwable ignored )
{} {}
return false; return false;
} }
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
// do nothing // do nothing
} }
@Override @Override
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, BlockPos pos ) public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final BlockPos pos )
{ {
TileEntity te = w.getTileEntity( pos ); final TileEntity te = w.getTileEntity( pos );
if( noTesrTile.isInstance( te ) ) if( noTesrTile.isInstance( te ) )
{ {
@ -458,7 +458,7 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
} }
@Override @Override
protected void setFeature( EnumSet<AEFeature> f ) protected void setFeature( final EnumSet<AEFeature> f )
{ {
final AECableBusFeatureHandler featureHandler = new AECableBusFeatureHandler( f, this, this.featureSubName ); final AECableBusFeatureHandler featureHandler = new AECableBusFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler ); this.setHandler( featureHandler );

View file

@ -62,13 +62,13 @@ public class BlockController extends AEBaseTileBlock
@Override @Override
public int getMetaFromState( public int getMetaFromState(
IBlockState state ) final IBlockState state )
{ {
return ((ControllerBlockState)state.getValue( CONTROLLER_STATE )).ordinal(); return ((ControllerBlockState)state.getValue( CONTROLLER_STATE )).ordinal();
} }
@Override @Override
public IBlockState getStateFromMeta( int meta ) public IBlockState getStateFromMeta( final int meta )
{ {
return getDefaultState().withProperty( CONTROLLER_STATE, ControllerBlockState.OFFLINE ); return getDefaultState().withProperty( CONTROLLER_STATE, ControllerBlockState.OFFLINE );
} }
@ -89,12 +89,12 @@ public class BlockController extends AEBaseTileBlock
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileController tc = this.getTileEntity( w, pos ); final TileController tc = this.getTileEntity( w, pos );
if( tc != null ) if( tc != null )
{ {
tc.onNeighborChange( false ); tc.onNeighborChange( false );

View file

@ -36,7 +36,7 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
} }
@Override @Override
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, net.minecraft.block.state.IBlockState state) public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
{ {
switch( (int)state.getValue( ENERGY_STORAGE ) ) switch( (int)state.getValue( ENERGY_STORAGE ) )
{ {

View file

@ -50,13 +50,13 @@ public class BlockEnergyCell extends AEBaseTileBlock
@Override @Override
public int getMetaFromState( public int getMetaFromState(
IBlockState state ) final IBlockState state )
{ {
return (int)state.getValue( ENERGY_STORAGE ); return (int)state.getValue( ENERGY_STORAGE );
} }
@Override @Override
public IBlockState getStateFromMeta( int meta ) public IBlockState getStateFromMeta( final int meta )
{ {
return getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) ); return getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) );
} }
@ -76,7 +76,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
} }
@Override @Override
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, IBlockState state) public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final IBlockState state)
{ {
switch( (int)state.getValue( ENERGY_STORAGE ) ) switch( (int)state.getValue( ENERGY_STORAGE ) )
{ {
@ -102,12 +102,12 @@ public class BlockEnergyCell extends AEBaseTileBlock
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
super.getCheckedSubBlocks( item, tabs, itemStacks ); super.getCheckedSubBlocks( item, tabs, itemStacks );
ItemStack charged = new ItemStack( this, 1 ); final ItemStack charged = new ItemStack( this, 1 );
NBTTagCompound tag = Platform.openNbtData( charged ); final NBTTagCompound tag = Platform.openNbtData( charged );
tag.setDouble( "internalCurrentPower", this.getMaxPower() ); tag.setDouble( "internalCurrentPower", this.getMaxPower() );
tag.setDouble( "internalMaxPower", this.getMaxPower() ); tag.setDouble( "internalMaxPower", this.getMaxPower() );

View file

@ -70,21 +70,21 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public boolean onBlockActivated( public boolean onBlockActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( player.isSneaking() ) if( player.isSneaking() )
{ {
return false; return false;
} }
TileWireless tg = this.getTileEntity( w, pos ); final TileWireless tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
@ -98,15 +98,15 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
TileWireless tile = this.getTileEntity( w, pos ); final TileWireless tile = this.getTileEntity( w, pos );
if( tile != null ) if( tile != null )
{ {
EnumFacing forward = tile.getForward(); final EnumFacing forward = tile.getForward();
double minX = 0; double minX = 0;
double minY = 0; double minY = 0;
@ -164,16 +164,16 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
TileWireless tile = this.getTileEntity( w, pos ); final TileWireless tile = this.getTileEntity( w, pos );
if( tile != null ) if( tile != null )
{ {
EnumFacing forward = tile.getForward(); final EnumFacing forward = tile.getForward();
double minX = 0; double minX = 0;
double minY = 0; double minY = 0;

View file

@ -37,11 +37,11 @@ import appeng.tile.qnb.TileQuantumBridge;
public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision
{ {
public BlockQuantumBase( Material mat ) public BlockQuantumBase( final Material mat )
{ {
super( mat ); super( mat );
this.setTileEntity( TileQuantumBridge.class ); this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f; final float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave ); this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 ); this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false; this.isFullSize = this.isOpaque = false;
@ -56,12 +56,12 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileQuantumBridge bridge = this.getTileEntity( w, pos ); final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null ) if( bridge != null )
{ {
bridge.neighborUpdate(); bridge.neighborUpdate();
@ -70,11 +70,11 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
@Override @Override
public void breakBlock( public void breakBlock(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state ) final IBlockState state )
{ {
TileQuantumBridge bridge = this.getTileEntity( w, pos ); final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null ) if( bridge != null )
{ {
bridge.breakCluster(); bridge.breakCluster();

View file

@ -50,12 +50,12 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
@Override @Override
public void randomDisplayTick( public void randomDisplayTick(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Random rand ) final Random rand )
{ {
TileQuantumBridge bridge = this.getTileEntity( w, pos ); final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null ) if( bridge != null )
{ {
if( bridge.hasQES() ) if( bridge.hasQES() )
@ -70,20 +70,20 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileQuantumBridge tg = this.getTileEntity( w, pos ); final TileQuantumBridge tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
@ -97,24 +97,24 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
double onePixel = 2.0 / 16.0; final double onePixel = 2.0 / 16.0;
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) ); return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
} }
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
double onePixel = 2.0 / 16.0; final double onePixel = 2.0 / 16.0;
out.add( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) ); out.add( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
} }
} }

View file

@ -41,13 +41,13 @@ public class BlockQuantumRing extends BlockQuantumBase
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
double onePixel = 2.0 / 16.0; double onePixel = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, pos ); final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null && bridge.isCorner() ) if( bridge != null && bridge.isCorner() )
{ {
onePixel = 4.0 / 16.0; onePixel = 4.0 / 16.0;
@ -61,14 +61,14 @@ public class BlockQuantumRing extends BlockQuantumBase
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
double onePixel = 2.0 / 16.0; double onePixel = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, pos ); final TileQuantumBridge bridge = this.getTileEntity( w, pos );
if( bridge != null && bridge.isCorner() ) if( bridge != null && bridge.isCorner() )
{ {
onePixel = 4.0 / 16.0; onePixel = 4.0 / 16.0;

View file

@ -63,17 +63,17 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
@Override @Override
@SideOnly( Side.CLIENT ) @SideOnly( Side.CLIENT )
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks ) public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
{ {
// do nothing // do nothing
} }
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
// } ); // } );
@ -81,37 +81,37 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) ); out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
} }
@Override @Override
public boolean canPlaceBlockAt( public boolean canPlaceBlockAt(
World worldIn, final World worldIn,
BlockPos pos ) final BlockPos pos )
{ {
return false; return false;
} }
@Override @Override
public void onBlockExploded( public void onBlockExploded(
World world, final World world,
BlockPos pos, final BlockPos pos,
Explosion explosion ) final Explosion explosion )
{ {
// Don't explode. // Don't explode.
} }
@Override @Override
public boolean canEntityDestroy( public boolean canEntityDestroy(
IBlockAccess world, final IBlockAccess world,
BlockPos pos, final BlockPos pos,
Entity entity ) final Entity entity )
{ {
return false; return false;
} }

View file

@ -48,12 +48,12 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileSpatialIOPort te = this.getTileEntity( w, pos ); final TileSpatialIOPort te = this.getTileEntity( w, pos );
if( te != null ) if( te != null )
{ {
te.updateRedstoneState(); te.updateRedstoneState();
@ -62,20 +62,20 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileSpatialIOPort tg = this.getTileEntity( w, pos ); final TileSpatialIOPort tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )

View file

@ -46,12 +46,12 @@ public class BlockSpatialPylon extends AEBaseTileBlock
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileSpatialPylon tsp = this.getTileEntity( w, pos ); final TileSpatialPylon tsp = this.getTileEntity( w, pos );
if( tsp != null ) if( tsp != null )
{ {
tsp.onNeighborBlockChange(); tsp.onNeighborBlockChange();
@ -60,10 +60,10 @@ public class BlockSpatialPylon extends AEBaseTileBlock
@Override @Override
public int getLightValue( public int getLightValue(
IBlockAccess w, final IBlockAccess w,
BlockPos pos ) final BlockPos pos )
{ {
TileSpatialPylon tsp = this.getTileEntity( w, pos ); final TileSpatialPylon tsp = this.getTileEntity( w, pos );
if( tsp != null ) if( tsp != null )
{ {
return tsp.getLightValue(); return tsp.getLightValue();

View file

@ -65,15 +65,15 @@ public class BlockChest extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
TileChest tg = this.getTileEntity( w, pos ); final TileChest tg = this.getTileEntity( w, pos );
if( tg != null && !p.isSneaking() ) if( tg != null && !p.isSneaking() )
{ {
if( Platform.isClient() ) if( Platform.isClient() )
@ -87,10 +87,10 @@ public class BlockChest extends AEBaseTileBlock
} }
else else
{ {
ItemStack cell = tg.getStackInSlot( 1 ); final ItemStack cell = tg.getStackInSlot( 1 );
if( cell != null ) if( cell != null )
{ {
ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell ); final ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );
tg.openGui( p, ch, cell, side ); tg.openGui( p, ch, cell, side );
} }

View file

@ -61,20 +61,20 @@ public class BlockDrive extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileDrive tg = this.getTileEntity( w, pos ); final TileDrive tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )

View file

@ -48,12 +48,12 @@ public class BlockIOPort extends AEBaseTileBlock
@Override @Override
public void onNeighborBlockChange( public void onNeighborBlockChange(
World w, final World w,
BlockPos pos, final BlockPos pos,
IBlockState state, final IBlockState state,
Block neighborBlock ) final Block neighborBlock )
{ {
TileIOPort te = this.getTileEntity( w, pos ); final TileIOPort te = this.getTileEntity( w, pos );
if( te != null ) if( te != null )
{ {
te.updateRedstoneState(); te.updateRedstoneState();
@ -62,20 +62,20 @@ public class BlockIOPort extends AEBaseTileBlock
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer p, final EntityPlayer p,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( p.isSneaking() ) if( p.isSneaking() )
{ {
return false; return false;
} }
TileIOPort tg = this.getTileEntity( w, pos ); final TileIOPort tg = this.getTileEntity( w, pos );
if( tg != null ) if( tg != null )
{ {
if( Platform.isServer() ) if( Platform.isServer() )

View file

@ -54,7 +54,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
public final SkyChestType type; public final SkyChestType type;
public BlockSkyChest( SkyChestType type ) public BlockSkyChest( final SkyChestType type )
{ {
super( Material.rock, Optional.of( type.name() ) ); super( Material.rock, Optional.of( type.name() ) );
this.setTileEntity( TileSkyChest.class ); this.setTileEntity( TileSkyChest.class );
@ -75,13 +75,13 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public boolean onActivated( public boolean onActivated(
World w, final World w,
BlockPos pos, final BlockPos pos,
EntityPlayer player, final EntityPlayer player,
EnumFacing side, final EnumFacing side,
float hitX, final float hitX,
float hitY, final float hitY,
float hitZ ) final float hitZ )
{ {
if( Platform.isServer() ) if( Platform.isServer() )
{ {
@ -93,12 +93,12 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
@Override @Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
World w, final World w,
BlockPos pos, final BlockPos pos,
Entity thePlayer, final Entity thePlayer,
boolean b ) final boolean b )
{ {
TileSkyChest sk = this.getTileEntity( w, pos ); final TileSkyChest sk = this.getTileEntity( w, pos );
EnumFacing o = EnumFacing.UP; EnumFacing o = EnumFacing.UP;
if( sk != null ) if( sk != null )
@ -106,21 +106,21 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
o = sk.getUp(); o = sk.getUp();
} }
double offsetX = o.getFrontOffsetX() == 0 ? 0.06 : 0.0; final double offsetX = o.getFrontOffsetX() == 0 ? 0.06 : 0.0;
double offsetY = o.getFrontOffsetY() == 0 ? 0.06 : 0.0; final double offsetY = o.getFrontOffsetY() == 0 ? 0.06 : 0.0;
double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0; final double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0;
double sc = 0.06; final double sc = 0.06;
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) ); return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
} }
@Override @Override
public void addCollidingBlockToList( public void addCollidingBlockToList(
World w, final World w,
BlockPos pos, final BlockPos pos,
AxisAlignedBB bb, final AxisAlignedBB bb,
List<AxisAlignedBB> out, final List<AxisAlignedBB> out,
Entity e ) final Entity e )
{ {
out.add( AxisAlignedBB.fromBounds( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) ); out.add( AxisAlignedBB.fromBounds( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) );
} }

View file

@ -109,7 +109,7 @@ public class ClientHelper extends ServerHelper
private List<ResourceLocation> extraIcons = new ArrayList<>(); private List<ResourceLocation> extraIcons = new ArrayList<>();
@Override @Override
public void configureIcon( Object item, String name ) public void configureIcon( final Object item, final String name )
{ {
iconTmp.add( new IconReg( item, 0, name ) ); iconTmp.add( new IconReg( item, 0, name ) );
} }
@ -156,9 +156,9 @@ public class ClientHelper extends ServerHelper
} }
@Override @Override
public void bindTileEntitySpecialRenderer( Class<? extends TileEntity> tile, AEBaseBlock blk ) public void bindTileEntitySpecialRenderer( final Class<? extends TileEntity> tile, final AEBaseBlock blk )
{ {
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance; final BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
if( bbr.hasTESR() && tile != null ) if( bbr.hasTESR() && tile != null )
{ {
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) ); ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
@ -170,7 +170,7 @@ public class ClientHelper extends ServerHelper
{ {
if( Platform.isClient() ) if( Platform.isClient() )
{ {
List<EntityPlayer> o = new ArrayList<>(); final List<EntityPlayer> o = new ArrayList<>();
o.add( Minecraft.getMinecraft().thePlayer ); o.add( Minecraft.getMinecraft().thePlayer );
return o; return o;
} }
@ -181,7 +181,7 @@ public class ClientHelper extends ServerHelper
} }
@Override @Override
public void spawnEffect( EffectType effect, World worldObj, double posX, double posY, double posZ, Object o ) public void spawnEffect( final EffectType effect, final World worldObj, final double posX, final double posY, final double posZ, final Object o )
{ {
if( AEConfig.instance.enableEffects ) if( AEConfig.instance.enableEffects )
{ {
@ -211,9 +211,9 @@ public class ClientHelper extends ServerHelper
} }
@Override @Override
public boolean shouldAddParticles( Random r ) public boolean shouldAddParticles( final Random r )
{ {
int setting = Minecraft.getMinecraft().gameSettings.particleSetting; final int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
if( setting == 2 ) if( setting == 2 )
{ {
return false; return false;
@ -232,11 +232,11 @@ public class ClientHelper extends ServerHelper
} }
@Override @Override
public void doRenderItem( ItemStack itemstack, World w ) public void doRenderItem( final ItemStack itemstack, final World w )
{ {
if( itemstack != null ) if( itemstack != null )
{ {
EntityItem entityitem = new EntityItem( w, 0.0D, 0.0D, 0.0D, itemstack ); final EntityItem entityitem = new EntityItem( w, 0.0D, 0.0D, 0.0D, itemstack );
entityitem.getEntityItem().stackSize = 1; entityitem.getEntityItem().stackSize = 1;
// set all this stuff and then do shit? meh? // set all this stuff and then do shit? meh?
@ -259,23 +259,23 @@ public class ClientHelper extends ServerHelper
public void postInit() public void postInit()
{ {
//RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE ); //RenderingRegistry.registerBlockHandler( WorldRender.INSTANCE );
RenderManager inst = Minecraft.getMinecraft().getRenderManager(); final RenderManager inst = Minecraft.getMinecraft().getRenderManager();
inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) ); inst.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed( inst ) );
inst.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem( inst ) ); inst.entityRenderMap.put( EntityFloatingItem.class, new RenderFloatingItem( inst ) );
final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); final ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
ItemMeshDefinition imd = new ItemMeshDefinition() final ItemMeshDefinition imd = new ItemMeshDefinition()
{ {
@Override @Override
public ModelResourceLocation getModelLocation( ItemStack stack ) public ModelResourceLocation getModelLocation( final ItemStack stack )
{ {
return partRenderer; return partRenderer;
} }
}; };
for( IconReg reg : iconTmp ) for( final IconReg reg : iconTmp )
{ {
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem ) if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
{ {
@ -312,15 +312,15 @@ public class ClientHelper extends ServerHelper
} }
} }
String MODID = AppEng.MOD_ID + ":"; final String MODID = AppEng.MOD_ID + ":";
for( List<IconReg> reg : iconRegistrations.values() ) for( final List<IconReg> reg : iconRegistrations.values() )
{ {
String[] names = new String[reg.size()]; final String[] names = new String[reg.size()];
Item it = null; Item it = null;
int offset = 0; int offset = 0;
for( IconReg r : reg ) for( final IconReg r : reg )
{ {
it = (Item) r.item; it = (Item) r.item;
@ -344,8 +344,8 @@ public class ClientHelper extends ServerHelper
return super.getRenderMode(); return super.getRenderMode();
} }
Minecraft mc = Minecraft.getMinecraft(); final Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer; final EntityPlayer player = mc.thePlayer;
return this.renderModeForPlayer( player ); return this.renderModeForPlayer( player );
} }
@ -353,19 +353,19 @@ public class ClientHelper extends ServerHelper
@Override @Override
public void triggerUpdates() public void triggerUpdates()
{ {
Minecraft mc = Minecraft.getMinecraft(); final Minecraft mc = Minecraft.getMinecraft();
if( mc == null || mc.thePlayer == null || mc.theWorld == null ) if( mc == null || mc.thePlayer == null || mc.theWorld == null )
{ {
return; return;
} }
EntityPlayer player = mc.thePlayer; final EntityPlayer player = mc.thePlayer;
int x = (int) player.posX; final int x = (int) player.posX;
int y = (int) player.posY; final int y = (int) player.posY;
int z = (int) player.posZ; final int z = (int) player.posZ;
int range = 16 * 16; final int range = 16 * 16;
mc.theWorld.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range ); mc.theWorld.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
} }
@ -377,14 +377,14 @@ public class ClientHelper extends ServerHelper
} }
@Override @Override
public ResourceLocation addIcon( String string ) public ResourceLocation addIcon( final String string )
{ {
ModelResourceLocation n = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, string ), "inventory" ); final ModelResourceLocation n = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, string ), "inventory" );
extraIcons.add( n ); extraIcons.add( n );
return n; return n;
} }
public ModelResourceLocation setIcon( Item item, String name ) public ModelResourceLocation setIcon( final Item item, final String name )
{ {
List<IconReg> reg = iconRegistrations.get( item ); List<IconReg> reg = iconRegistrations.get( item );
if( reg == null ) if( reg == null )
@ -392,12 +392,12 @@ public class ClientHelper extends ServerHelper
iconRegistrations.put( item, reg = new LinkedList<>() ); iconRegistrations.put( item, reg = new LinkedList<>() );
} }
ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" ); final ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" );
reg.add( new IconReg( item, -1, name, res ) ); reg.add( new IconReg( item, -1, name, res ) );
return res; return res;
} }
public ModelResourceLocation setIcon( Item item, int meta, String name ) public ModelResourceLocation setIcon( final Item item, final int meta, final String name )
{ {
List<IconReg> reg = iconRegistrations.get( item ); List<IconReg> reg = iconRegistrations.get( item );
if( reg == null ) if( reg == null )
@ -405,54 +405,54 @@ public class ClientHelper extends ServerHelper
iconRegistrations.put( item, reg = new LinkedList<>() ); iconRegistrations.put( item, reg = new LinkedList<>() );
} }
ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" ); final ModelResourceLocation res = new ModelResourceLocation( new ResourceLocation( AppEng.MOD_ID, name ), "inventory" );
reg.add( new IconReg( item, meta, name, res ) ); reg.add( new IconReg( item, meta, name, res ) );
return res; return res;
} }
@SubscribeEvent @SubscribeEvent
public void postPlayerRender( RenderLivingEvent.Pre p ) public void postPlayerRender( final RenderLivingEvent.Pre p )
{ {
PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() ); final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
if( player != null ) if( player != null )
{ {
AEColor col = player.myColor; final AEColor col = player.myColor;
float r = 0xff & ( col.mediumVariant >> 16 ); final float r = 0xff & ( col.mediumVariant >> 16 );
float g = 0xff & ( col.mediumVariant >> 8 ); final float g = 0xff & ( col.mediumVariant >> 8 );
float b = 0xff & ( col.mediumVariant ); final float b = 0xff & ( col.mediumVariant );
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f ); GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
} }
} }
private void spawnAssembler( World worldObj, double posX, double posY, double posZ, Object o ) private void spawnAssembler( final World worldObj, final double posX, final double posY, final double posZ, final Object o )
{ {
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o; final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is ); final AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
private void spawnVibrant( World w, double x, double y, double z ) private void spawnVibrant( final World w, final double x, final double y, final double z )
{ {
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) ) if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
{ {
double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D; final double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D; final double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
double d2 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D; final double d2 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D ); final VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
} }
private void spawnCrafting( World w, double posX, double posY, double posZ ) private void spawnCrafting( final World w, final double posX, final double posY, final double posZ )
{ {
float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond ); final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
fx.motionX = -x * 0.2; fx.motionX = -x * 0.2;
fx.motionY = -y * 0.2; fx.motionY = -y * 0.2;
@ -461,13 +461,13 @@ public class ClientHelper extends ServerHelper
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
private void spawnEnergy( World w, double posX, double posY, double posZ ) private void spawnEnergy( final World w, final double posX, final double posY, final double posZ )
{ {
float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f; final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond ); final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
fx.motionX = -x * 0.1; fx.motionX = -x * 0.1;
fx.motionY = -y * 0.1; fx.motionY = -y * 0.1;
@ -476,48 +476,48 @@ public class ClientHelper extends ServerHelper
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
private void spawnLightning( World worldObj, double posX, double posY, double posZ ) private void spawnLightning( final World worldObj, final double posX, final double posY, final double posZ )
{ {
LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f ); final LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
private void spawnLightningArc( World worldObj, double posX, double posY, double posZ, Vec3 second ) private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3 second )
{ {
LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f ); final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
Minecraft.getMinecraft().effectRenderer.addEffect( fx ); Minecraft.getMinecraft().effectRenderer.addEffect( fx );
} }
@SubscribeEvent @SubscribeEvent
public void onModelBakeEvent( ModelBakeEvent event ) public void onModelBakeEvent( final ModelBakeEvent event )
{ {
// inventory renderer // inventory renderer
SmartModel buses = new SmartModel( new BlockRenderInfo( ( new RendererCableBus() ) ) ); final SmartModel buses = new SmartModel( new BlockRenderInfo( ( new RendererCableBus() ) ) );
event.modelRegistry.putObject( partRenderer, buses ); event.modelRegistry.putObject( partRenderer, buses );
for( IconReg reg : iconTmp ) for( final IconReg reg : iconTmp )
{ {
if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem ) if( reg.item instanceof IPartItem || reg.item instanceof IFacadeItem )
{ {
UniqueIdentifier i = GameRegistry.findUniqueIdentifierFor( (Item) reg.item ); final UniqueIdentifier i = GameRegistry.findUniqueIdentifierFor( (Item) reg.item );
event.modelRegistry.putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses ); event.modelRegistry.putObject( new ModelResourceLocation( new ResourceLocation( i.modId, i.name ), "inventory" ), buses );
} }
if( reg.item instanceof AEBaseBlock ) if( reg.item instanceof AEBaseBlock )
{ {
BlockRenderInfo renderer = ( (AEBaseBlock) reg.item ).getRendererInstance(); final BlockRenderInfo renderer = ( (AEBaseBlock) reg.item ).getRendererInstance();
if( renderer == null ) if( renderer == null )
{ {
continue; continue;
} }
SmartModel sm = new SmartModel( renderer ); final SmartModel sm = new SmartModel( renderer );
event.modelRegistry.putObject( renderer.rendererInstance.getResourcePath(), sm ); event.modelRegistry.putObject( renderer.rendererInstance.getResourcePath(), sm );
Map data = new DefaultStateMapper().putStateModelLocations( (Block) reg.item ); final Map data = new DefaultStateMapper().putStateModelLocations( (Block) reg.item );
for( Object Loc : data.values() ) for( final Object Loc : data.values() )
{ {
ModelResourceLocation res = (ModelResourceLocation) Loc; final ModelResourceLocation res = (ModelResourceLocation) Loc;
event.modelRegistry.putObject( res, sm ); event.modelRegistry.putObject( res, sm );
} }
} }
@ -525,16 +525,16 @@ public class ClientHelper extends ServerHelper
} }
@SubscribeEvent @SubscribeEvent
public void wheelEvent( MouseEvent me ) public void wheelEvent( final MouseEvent me )
{ {
if( me.isCanceled() || me.dwheel == 0 ) if( me.isCanceled() || me.dwheel == 0 )
{ {
return; return;
} }
Minecraft mc = Minecraft.getMinecraft(); final Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer; final EntityPlayer player = mc.thePlayer;
ItemStack is = player.getHeldItem(); final ItemStack is = player.getHeldItem();
if( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() ) if( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() )
{ {
@ -543,7 +543,7 @@ public class ClientHelper extends ServerHelper
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) ); NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) );
me.setCanceled( true ); me.setCanceled( true );
} }
catch( IOException e ) catch( final IOException e )
{ {
AELog.error( e ); AELog.error( e );
} }
@ -551,9 +551,9 @@ public class ClientHelper extends ServerHelper
} }
@SubscribeEvent @SubscribeEvent
public void updateTextureSheet( TextureStitchEvent.Pre ev ) public void updateTextureSheet( final TextureStitchEvent.Pre ev )
{ {
for( IconReg reg : iconTmp ) for( final IconReg reg : iconTmp )
{ {
if( reg.item instanceof AEBaseItem ) if( reg.item instanceof AEBaseItem )
{ {
@ -561,7 +561,7 @@ public class ClientHelper extends ServerHelper
} }
else if( reg.item instanceof AEBaseBlock ) else if( reg.item instanceof AEBaseBlock )
{ {
BlockRenderInfo renderer = ( (AEBaseBlock) reg.item ).getRendererInstance(); final BlockRenderInfo renderer = ( (AEBaseBlock) reg.item ).getRendererInstance();
if( renderer == null ) if( renderer == null )
{ {
continue; continue;
@ -575,7 +575,7 @@ public class ClientHelper extends ServerHelper
//if( ev.map.getTextureType() == ITEM_RENDERER ) //if( ev.map.getTextureType() == ITEM_RENDERER )
{ {
for( ExtraItemTextures et : ExtraItemTextures.values() ) for( final ExtraItemTextures et : ExtraItemTextures.values() )
{ {
et.registerIcon( ev.map ); et.registerIcon( ev.map );
} }
@ -583,12 +583,12 @@ public class ClientHelper extends ServerHelper
//if( ev.map. == BLOCK_RENDERER ) //if( ev.map. == BLOCK_RENDERER )
{ {
for( ExtraBlockTextures et : ExtraBlockTextures.values() ) for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
{ {
et.registerIcon( ev.map ); et.registerIcon( ev.map );
} }
for( CableBusTextures cb : CableBusTextures.values() ) for( final CableBusTextures cb : CableBusTextures.values() )
{ {
cb.registerIcon( ev.map ); cb.registerIcon( ev.map );
} }
@ -602,7 +602,7 @@ public class ClientHelper extends ServerHelper
public final int meta; public final int meta;
public final ModelResourceLocation loc; public final ModelResourceLocation loc;
public IconReg( Object item2, int meta2, String name2 ) public IconReg( final Object item2, final int meta2, final String name2 )
{ {
meta = meta2; meta = meta2;
name = name2; name = name2;
@ -610,7 +610,7 @@ public class ClientHelper extends ServerHelper
loc = null; loc = null;
} }
public IconReg( Item item2, int meta2, String name2, ModelResourceLocation res ) public IconReg( final Item item2, final int meta2, final String name2, final ModelResourceLocation res )
{ {
meta = meta2; meta = meta2;
name = name2; name = name2;

View file

@ -37,7 +37,7 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
@Override @Override
public TRSRTransformation apply( public TRSRTransformation apply(
IModelPart part ) final IModelPart part )
{ {
return TRSRTransformation.identity(); return TRSRTransformation.identity();
} }
@ -45,14 +45,14 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
}; };
public SmartModel( public SmartModel(
BlockRenderInfo rendererInstance ) final BlockRenderInfo rendererInstance )
{ {
AERenderer = rendererInstance; AERenderer = rendererInstance;
} }
@Override @Override
public List getFaceQuads( public List getFaceQuads(
EnumFacing p_177551_1_ ) final EnumFacing p_177551_1_ )
{ {
return Collections.emptyList(); return Collections.emptyList();
} }
@ -95,10 +95,10 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
@Override @Override
public IBakedModel handleItemState( public IBakedModel handleItemState(
ItemStack stack ) final ItemStack stack )
{ {
ModelGenerator helper = new ModelGenerator(); final ModelGenerator helper = new ModelGenerator();
Block blk = Block.getBlockFromItem( stack.getItem() ); final Block blk = Block.getBlockFromItem( stack.getItem() );
helper.setRenderBoundsFromBlock( blk ); helper.setRenderBoundsFromBlock( blk );
AERenderer.rendererInstance.renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null ); AERenderer.rendererInstance.renderInventory( blk instanceof AEBaseBlock ? (AEBaseBlock) blk : null, stack, helper, ItemRenderType.INVENTORY, null );
helper.finalizeModel( true ); helper.finalizeModel( true );
@ -107,12 +107,12 @@ public class SmartModel implements IBakedModel, ISmartBlockModel,ISmartItemModel
@Override @Override
public IBakedModel handleBlockState( public IBakedModel handleBlockState(
IBlockState state ) final IBlockState state )
{ {
ModelGenerator helper = new ModelGenerator(); final ModelGenerator helper = new ModelGenerator();
Block blk = state.getBlock(); final Block blk = state.getBlock();
BlockPos pos = ( (IExtendedBlockState)state ).getValue( AEBaseTileBlock.AE_BLOCK_POS ); final BlockPos pos = ( (IExtendedBlockState)state ).getValue( AEBaseTileBlock.AE_BLOCK_POS );
IBlockAccess world = ( (IExtendedBlockState)state ).getValue( AEBaseTileBlock.AE_BLOCK_ACCESS); final IBlockAccess world = ( (IExtendedBlockState)state ).getValue( AEBaseTileBlock.AE_BLOCK_ACCESS);
helper.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() ); helper.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() );
helper.setRenderBoundsFromBlock( blk ); helper.setRenderBoundsFromBlock( blk );
helper.blockAccess = world; helper.blockAccess = world;

View file

@ -96,28 +96,28 @@ public abstract class AEBaseGui extends GuiContainer
boolean useNEI = false; boolean useNEI = false;
private boolean subGui; private boolean subGui;
public AEBaseGui( Container container ) public AEBaseGui( final Container container )
{ {
super( container ); super( container );
this.subGui = switchingGuis; this.subGui = switchingGuis;
switchingGuis = false; switchingGuis = false;
} }
protected static String join( Collection<String> toolTip, String delimiter ) protected static String join( final Collection<String> toolTip, final String delimiter )
{ {
final Joiner joiner = Joiner.on( delimiter ); final Joiner joiner = Joiner.on( delimiter );
return joiner.join( toolTip ); return joiner.join( toolTip );
} }
protected int getQty( GuiButton btn ) protected int getQty( final GuiButton btn )
{ {
try try
{ {
DecimalFormat df = new DecimalFormat( "+#;-#" ); final DecimalFormat df = new DecimalFormat( "+#;-#" );
return df.parse( btn.displayString ).intValue(); return df.parse( btn.displayString ).intValue();
} }
catch( ParseException e ) catch( final ParseException e )
{ {
return 0; return 0;
} }
@ -134,7 +134,7 @@ public abstract class AEBaseGui extends GuiContainer
super.initGui(); super.initGui();
final List<Slot> slots = this.getInventorySlots(); final List<Slot> slots = this.getInventorySlots();
Iterator<Slot> i = slots.iterator(); final Iterator<Slot> i = slots.iterator();
while( i.hasNext() ) while( i.hasNext() )
{ {
if( i.next() instanceof SlotME ) if( i.next() instanceof SlotME )
@ -143,7 +143,7 @@ public abstract class AEBaseGui extends GuiContainer
} }
} }
for( InternalSlotME me : this.meSlots ) for( final InternalSlotME me : this.meSlots )
{ {
slots.add( new SlotME( me ) ); slots.add( new SlotME( me ) );
} }
@ -156,22 +156,22 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
public void drawScreen( int mouseX, int mouseY, float btn ) public void drawScreen( final int mouseX, final int mouseY, final float btn )
{ {
super.drawScreen( mouseX, mouseY, btn ); super.drawScreen( mouseX, mouseY, btn );
boolean hasClicked = Mouse.isButtonDown( 0 ); final boolean hasClicked = Mouse.isButtonDown( 0 );
if( hasClicked && this.myScrollBar != null ) if( hasClicked && this.myScrollBar != null )
{ {
this.myScrollBar.click( this, mouseX - this.guiLeft, mouseY - this.guiTop ); this.myScrollBar.click( this, mouseX - this.guiLeft, mouseY - this.guiTop );
} }
for( Object c : this.buttonList ) for( final Object c : this.buttonList )
{ {
if( c instanceof ITooltip ) if( c instanceof ITooltip )
{ {
ITooltip tooltip = (ITooltip) c; final ITooltip tooltip = (ITooltip) c;
int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition; final int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition;
int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition; int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition;
if( x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible() ) if( x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible() )
@ -183,7 +183,7 @@ public abstract class AEBaseGui extends GuiContainer
y = 15; y = 15;
} }
String msg = tooltip.getMessage(); final String msg = tooltip.getMessage();
if( msg != null ) if( msg != null )
{ {
this.drawTooltip( x + 11, y + 4, 0, msg ); this.drawTooltip( x + 11, y + 4, 0, msg );
@ -194,14 +194,14 @@ public abstract class AEBaseGui extends GuiContainer
} }
} }
public void drawTooltip( int par2, int par3, int forceWidth, String message ) public void drawTooltip( final int par2, final int par3, final int forceWidth, final String message )
{ {
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
GL11.glDisable( GL12.GL_RESCALE_NORMAL ); GL11.glDisable( GL12.GL_RESCALE_NORMAL );
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
GL11.glDisable( GL11.GL_LIGHTING ); GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable( GL11.GL_DEPTH_TEST ); GL11.glDisable( GL11.GL_DEPTH_TEST );
String[] var4 = message.split( "\n" ); final String[] var4 = message.split( "\n" );
if( var4.length > 0 ) if( var4.length > 0 )
{ {
@ -240,14 +240,14 @@ public abstract class AEBaseGui extends GuiContainer
this.zLevel = 300.0F; this.zLevel = 300.0F;
itemRender.zLevel = 300.0F; itemRender.zLevel = 300.0F;
int var10 = -267386864; final int var10 = -267386864;
this.drawGradientRect( var6 - 3, var7 - 4, var6 + var5 + 3, var7 - 3, var10, var10 ); this.drawGradientRect( var6 - 3, var7 - 4, var6 + var5 + 3, var7 - 3, var10, var10 );
this.drawGradientRect( var6 - 3, var7 + var9 + 3, var6 + var5 + 3, var7 + var9 + 4, var10, var10 ); this.drawGradientRect( var6 - 3, var7 + var9 + 3, var6 + var5 + 3, var7 + var9 + 4, var10, var10 );
this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 + var9 + 3, var10, var10 ); this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 + var9 + 3, var10, var10 );
this.drawGradientRect( var6 - 4, var7 - 3, var6 - 3, var7 + var9 + 3, var10, var10 ); this.drawGradientRect( var6 - 4, var7 - 3, var6 - 3, var7 + var9 + 3, var10, var10 );
this.drawGradientRect( var6 + var5 + 3, var7 - 3, var6 + var5 + 4, var7 + var9 + 3, var10, var10 ); this.drawGradientRect( var6 + var5 + 3, var7 - 3, var6 + var5 + 4, var7 + var9 + 3, var10, var10 );
int var11 = 1347420415; final int var11 = 1347420415;
int var12 = ( var11 & 16711422 ) >> 1 | var11 & -16777216; final int var12 = ( var11 & 16711422 ) >> 1 | var11 & -16777216;
this.drawGradientRect( var6 - 3, var7 - 3 + 1, var6 - 3 + 1, var7 + var9 + 3 - 1, var11, var12 ); this.drawGradientRect( var6 - 3, var7 - 3 + 1, var6 - 3 + 1, var7 + var9 + 3 - 1, var11, var12 );
this.drawGradientRect( var6 + var5 + 2, var7 - 3 + 1, var6 + var5 + 3, var7 + var9 + 3 - 1, var11, var12 ); this.drawGradientRect( var6 + var5 + 2, var7 - 3 + 1, var6 + var5 + 3, var7 + var9 + 3 - 1, var11, var12 );
this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 - 3 + 1, var11, var11 ); this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 - 3 + 1, var11, var11 );
@ -284,10 +284,10 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
protected final void drawGuiContainerForegroundLayer( int x, int y ) protected final void drawGuiContainerForegroundLayer( final int x, final int y )
{ {
int ox = this.guiLeft; // (width - xSize) / 2; final int ox = this.guiLeft; // (width - xSize) / 2;
int oy = this.guiTop; // (height - ySize) / 2; final int oy = this.guiTop; // (height - ySize) / 2;
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F ); GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
if( this.myScrollBar != null ) if( this.myScrollBar != null )
@ -301,19 +301,19 @@ public abstract class AEBaseGui extends GuiContainer
public abstract void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ); public abstract void drawFG( int offsetX, int offsetY, int mouseX, int mouseY );
@Override @Override
protected final void drawGuiContainerBackgroundLayer( float f, int x, int y ) protected final void drawGuiContainerBackgroundLayer( final float f, final int x, final int y )
{ {
int ox = this.guiLeft; // (width - xSize) / 2; final int ox = this.guiLeft; // (width - xSize) / 2;
int oy = this.guiTop; // (height - ySize) / 2; final int oy = this.guiTop; // (height - ySize) / 2;
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F ); GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
this.drawBG( ox, oy, x, y ); this.drawBG( ox, oy, x, y );
final List<Slot> slots = this.getInventorySlots(); final List<Slot> slots = this.getInventorySlots();
for( Slot slot : slots ) for( final Slot slot : slots )
{ {
if( slot instanceof OptionalSlotFake ) if( slot instanceof OptionalSlotFake )
{ {
OptionalSlotFake fs = (OptionalSlotFake) slot; final OptionalSlotFake fs = (OptionalSlotFake) slot;
if( fs.renderDisabled() ) if( fs.renderDisabled() )
{ {
if( fs.isEnabled() ) if( fs.isEnabled() )
@ -335,15 +335,15 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
protected void mouseClicked( int xCoord, int yCoord, int btn ) throws IOException protected void mouseClicked( final int xCoord, final int yCoord, final int btn ) throws IOException
{ {
this.drag_click.clear(); this.drag_click.clear();
if( btn == 1 ) if( btn == 1 )
{ {
for( Object o : this.buttonList ) for( final Object o : this.buttonList )
{ {
GuiButton guibutton = (GuiButton) o; final GuiButton guibutton = (GuiButton) o;
if( guibutton.mousePressed( this.mc, xCoord, yCoord ) ) if( guibutton.mousePressed( this.mc, xCoord, yCoord ) )
{ {
super.mouseClicked( xCoord, yCoord, 0 ); super.mouseClicked( xCoord, yCoord, 0 );
@ -356,19 +356,19 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
protected void mouseClickMove( int x, int y, int c, long d ) protected void mouseClickMove( final int x, final int y, final int c, final long d )
{ {
Slot slot = this.getSlot( x, y ); final Slot slot = this.getSlot( x, y );
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack(); final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
if( slot instanceof SlotFake && itemstack != null ) if( slot instanceof SlotFake && itemstack != null )
{ {
this.drag_click.add( slot ); this.drag_click.add( slot );
if( this.drag_click.size() > 1 ) if( this.drag_click.size() > 1 )
{ {
for( Slot dr : this.drag_click ) for( final Slot dr : this.drag_click )
{ {
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 ); final PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
} }
} }
@ -380,9 +380,9 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
protected void handleMouseClick( Slot slot, int slotIdx, int ctrlDown, int key ) protected void handleMouseClick( final Slot slot, final int slotIdx, final int ctrlDown, final int key )
{ {
EntityPlayer player = Minecraft.getMinecraft().thePlayer; final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if( slot instanceof SlotFake ) if( slot instanceof SlotFake )
{ {
@ -393,7 +393,7 @@ public abstract class AEBaseGui extends GuiContainer
return; return;
} }
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 ); final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
return; return;
@ -410,7 +410,7 @@ public abstract class AEBaseGui extends GuiContainer
{ {
NetworkHandler.instance.sendToServer( ( (SlotPatternTerm) slot ).getRequest( key == 1 ) ); NetworkHandler.instance.sendToServer( ( (SlotPatternTerm) slot ).getRequest( key == 1 ) );
} }
catch( IOException e ) catch( final IOException e )
{ {
AELog.error( e ); AELog.error( e );
} }
@ -432,7 +432,7 @@ public abstract class AEBaseGui extends GuiContainer
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM; action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
} }
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 ); final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
return; return;
@ -456,7 +456,7 @@ public abstract class AEBaseGui extends GuiContainer
} }
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack ); ( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 ); final PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
return; return;
} }
@ -491,7 +491,7 @@ public abstract class AEBaseGui extends GuiContainer
if( action != null ) if( action != null )
{ {
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ( (SlotDisconnected) slot ).mySlot.id ); final PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ( (SlotDisconnected) slot ).mySlot.id );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
} }
@ -529,7 +529,7 @@ public abstract class AEBaseGui extends GuiContainer
} }
else if( player.capabilities.isCreativeMode ) else if( player.capabilities.isCreativeMode )
{ {
IAEItemStack slotItem = ( (SlotME) slot ).getAEStack(); final IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
if( slotItem != null ) if( slotItem != null )
{ {
action = InventoryAction.CREATIVE_DUPLICATE; action = InventoryAction.CREATIVE_DUPLICATE;
@ -545,7 +545,7 @@ public abstract class AEBaseGui extends GuiContainer
if( action != null ) if( action != null )
{ {
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack ); ( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 ); final PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
} }
@ -575,7 +575,7 @@ public abstract class AEBaseGui extends GuiContainer
// a replica of the weird broken vanilla feature. // a replica of the weird broken vanilla feature.
final List<Slot> slots = this.getInventorySlots(); final List<Slot> slots = this.getInventorySlots();
for( Slot inventorySlot : slots ) for( final Slot inventorySlot : slots )
{ {
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) ) if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
{ {
@ -591,15 +591,15 @@ public abstract class AEBaseGui extends GuiContainer
} }
@Override @Override
protected boolean checkHotbarKeys( int keyCode ) protected boolean checkHotbarKeys( final int keyCode )
{ {
Slot theSlot; final Slot theSlot;
try try
{ {
theSlot = ObfuscationReflectionHelper.getPrivateValue( GuiContainer.class, this, "theSlot", "field_147006_u", "f" ); theSlot = ObfuscationReflectionHelper.getPrivateValue( GuiContainer.class, this, "theSlot", "field_147006_u", "f" );
} }
catch( Throwable t ) catch( final Throwable t )
{ {
return false; return false;
} }
@ -611,7 +611,7 @@ public abstract class AEBaseGui extends GuiContainer
if( keyCode == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() ) if( keyCode == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
{ {
final List<Slot> slots = this.getInventorySlots(); final List<Slot> slots = this.getInventorySlots();
for( Slot s : slots ) for( final Slot s : slots )
{ {
if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() ) if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() )
{ {
@ -629,7 +629,7 @@ public abstract class AEBaseGui extends GuiContainer
} }
else else
{ {
for( Slot s : slots ) for( final Slot s : slots )
{ {
if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() ) if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() )
{ {
@ -652,10 +652,10 @@ public abstract class AEBaseGui extends GuiContainer
this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI ) this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
} }
protected Slot getSlot( int mouseX, int mouseY ) protected Slot getSlot( final int mouseX, final int mouseY )
{ {
final List<Slot> slots = this.getInventorySlots(); final List<Slot> slots = this.getInventorySlots();
for( Slot slot : slots ) for( final Slot slot : slots )
{ {
// isPointInRegion // isPointInRegion
if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) ) if( this.isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
@ -674,11 +674,11 @@ public abstract class AEBaseGui extends GuiContainer
{ {
super.handleMouseInput(); super.handleMouseInput();
int i = Mouse.getEventDWheel(); final int i = Mouse.getEventDWheel();
if( i != 0 && isShiftKeyDown() ) if( i != 0 && isShiftKeyDown() )
{ {
int x = Mouse.getEventX() * this.width / this.mc.displayWidth; final int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1; final int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
this.mouseWheelEvent( x, y, i / Math.abs( i ) ); this.mouseWheelEvent( x, y, i / Math.abs( i ) );
} }
else if( i != 0 && this.myScrollBar != null ) else if( i != 0 && this.myScrollBar != null )
@ -687,21 +687,21 @@ public abstract class AEBaseGui extends GuiContainer
} }
} }
protected void mouseWheelEvent( int x, int y, int wheel ) protected void mouseWheelEvent( final int x, final int y, final int wheel )
{ {
Slot slot = this.getSlot( x, y ); final Slot slot = this.getSlot( x, y );
if( slot instanceof SlotME ) if( slot instanceof SlotME )
{ {
IAEItemStack item = ( (SlotME) slot ).getAEStack(); final IAEItemStack item = ( (SlotME) slot ).getAEStack();
if( item != null ) if( item != null )
{ {
( (AEBaseContainer) this.inventorySlots ).setTargetStack( item ); ( (AEBaseContainer) this.inventorySlots ).setTargetStack( item );
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP; final InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
int times = Math.abs( wheel ); final int times = Math.abs( wheel );
final int inventorySize = this.getInventorySlots().size(); final int inventorySize = this.getInventorySlots().size();
for( int h = 0; h < times; h++ ) for( int h = 0; h < times; h++ )
{ {
PacketInventoryAction p = new PacketInventoryAction( direction, inventorySize, 0 ); final PacketInventoryAction p = new PacketInventoryAction( direction, inventorySize, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
} }
} }
@ -713,13 +713,13 @@ public abstract class AEBaseGui extends GuiContainer
return true; return true;
} }
public void bindTexture( String base, String file ) public void bindTexture( final String base, final String file )
{ {
ResourceLocation loc = new ResourceLocation( base, "textures/" + file ); final ResourceLocation loc = new ResourceLocation( base, "textures/" + file );
this.mc.getTextureManager().bindTexture( loc ); this.mc.getTextureManager().bindTexture( loc );
} }
protected void drawItem( int x, int y, ItemStack is ) protected void drawItem( final int x, final int y, final ItemStack is )
{ {
this.zLevel = 100.0F; this.zLevel = 100.0F;
itemRender.zLevel = 100.0F; itemRender.zLevel = 100.0F;
@ -736,7 +736,7 @@ public abstract class AEBaseGui extends GuiContainer
this.zLevel = 0.0F; this.zLevel = 0.0F;
} }
protected String getGuiDisplayName( String in ) protected String getGuiDisplayName( final String in )
{ {
return this.hasCustomInventoryName() ? this.getInventoryName() : in; return this.hasCustomInventoryName() ? this.getInventoryName() : in;
} }
@ -755,16 +755,16 @@ public abstract class AEBaseGui extends GuiContainer
return ( (AEBaseContainer) this.inventorySlots ).customName; return ( (AEBaseContainer) this.inventorySlots ).customName;
} }
public void a( Slot s ) public void a( final Slot s )
{ {
this.drawSlot( s ); this.drawSlot( s );
} }
public void drawSlot( Slot s ) public void drawSlot( final Slot s )
{ {
if( s instanceof SlotME ) if( s instanceof SlotME )
{ {
RenderItem pIR = this.setItemRender( this.aeRenderItem ); final RenderItem pIR = this.setItemRender( this.aeRenderItem );
try try
{ {
this.zLevel = 100.0F; this.zLevel = 100.0F;
@ -784,7 +784,7 @@ public abstract class AEBaseGui extends GuiContainer
this.safeDrawSlot( s ); this.safeDrawSlot( s );
} }
catch( Exception err ) catch( final Exception err )
{ {
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() ); AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
} }
@ -795,10 +795,10 @@ public abstract class AEBaseGui extends GuiContainer
{ {
try try
{ {
ItemStack is = s.getStack(); final ItemStack is = s.getStack();
if( s instanceof AppEngSlot && ( ( (AppEngSlot) s ).renderIconWithItem() || is == null ) && ( ( (AppEngSlot) s ).shouldDisplay() ) ) if( s instanceof AppEngSlot && ( ( (AppEngSlot) s ).renderIconWithItem() || is == null ) && ( ( (AppEngSlot) s ).shouldDisplay() ) )
{ {
AppEngSlot aes = (AppEngSlot) s; final AppEngSlot aes = (AppEngSlot) s;
if( aes.getIcon() >= 0 ) if( aes.getIcon() >= 0 )
{ {
this.bindTexture( "guis/states.png" ); this.bindTexture( "guis/states.png" );
@ -806,36 +806,36 @@ public abstract class AEBaseGui extends GuiContainer
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
try try
{ {
int uv_y = (int) Math.floor( aes.getIcon() / 16 ); final int uv_y = (int) Math.floor( aes.getIcon() / 16 );
int uv_x = aes.getIcon() - uv_y * 16; final int uv_x = aes.getIcon() - uv_y * 16;
GL11.glEnable( GL11.GL_BLEND ); GL11.glEnable( GL11.GL_BLEND );
GL11.glDisable( GL11.GL_LIGHTING ); GL11.glDisable( GL11.GL_LIGHTING );
GL11.glEnable( GL11.GL_TEXTURE_2D ); GL11.glEnable( GL11.GL_TEXTURE_2D );
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA ); GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f ); GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
float par1 = aes.xDisplayPosition; final float par1 = aes.xDisplayPosition;
float par2 = aes.yDisplayPosition; final float par2 = aes.yDisplayPosition;
float par3 = uv_x * 16; final float par3 = uv_x * 16;
float par4 = uv_y * 16; final float par4 = uv_y * 16;
Tessellator tessellator = Tessellator.getInstance(); final Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer(); final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads(); worldrenderer.startDrawingQuads();
worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ); worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
float f1 = 0.00390625F; final float f1 = 0.00390625F;
float f = 0.00390625F; final float f = 0.00390625F;
float par6 = 16; final float par6 = 16;
worldrenderer.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ); worldrenderer.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 );
float par5 = 16; final float par5 = 16;
worldrenderer.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ); worldrenderer.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 );
worldrenderer.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ); worldrenderer.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 );
worldrenderer.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ); worldrenderer.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 );
worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f ); worldrenderer.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
tessellator.draw(); tessellator.draw();
} }
catch( Exception err ) catch( final Exception err )
{ {
} }
GL11.glPopAttrib(); GL11.glPopAttrib();
@ -853,7 +853,7 @@ public abstract class AEBaseGui extends GuiContainer
{ {
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld ); isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld );
} }
catch( Exception err ) catch( final Exception err )
{ {
AELog.error( err ); AELog.error( err );
} }
@ -887,7 +887,7 @@ public abstract class AEBaseGui extends GuiContainer
return; return;
} }
catch( Exception err ) catch( final Exception err )
{ {
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() ); AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
} }
@ -896,7 +896,7 @@ public abstract class AEBaseGui extends GuiContainer
this.safeDrawSlot( s ); this.safeDrawSlot( s );
} }
private RenderItem setItemRender( RenderItem item ) private RenderItem setItemRender( final RenderItem item )
{ {
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI ) ) if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI ) )
{ {
@ -904,7 +904,7 @@ public abstract class AEBaseGui extends GuiContainer
} }
else else
{ {
RenderItem ri = itemRender; final RenderItem ri = itemRender;
itemRender = item; itemRender = item;
return ri; return ri;
} }
@ -915,24 +915,24 @@ public abstract class AEBaseGui extends GuiContainer
return true; return true;
} }
private void safeDrawSlot( Slot s ) private void safeDrawSlot( final Slot s )
{ {
try try
{ {
GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s ); GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s );
} }
catch( Exception err ) catch( final Exception err )
{ {
} }
} }
public void bindTexture( String file ) public void bindTexture( final String file )
{ {
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/" + file ); final ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/" + file );
this.mc.getTextureManager().bindTexture( loc ); this.mc.getTextureManager().bindTexture( loc );
} }
public void func_146977_a( Slot s ) public void func_146977_a( final Slot s )
{ {
this.drawSlot( s ); this.drawSlot( s );
} }

View file

@ -35,28 +35,28 @@ import appeng.core.localization.ButtonToolTips;
public abstract class AEBaseMEGui extends AEBaseGui public abstract class AEBaseMEGui extends AEBaseGui
{ {
public AEBaseMEGui( Container container ) public AEBaseMEGui( final Container container )
{ {
super( container ); super( container );
} }
public List<String> handleItemTooltip( ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip ) public List<String> handleItemTooltip( final ItemStack stack, final int mouseX, final int mouseY, final List<String> currentToolTip )
{ {
if( stack != null ) if( stack != null )
{ {
Slot s = this.getSlot( mouseX, mouseY ); final Slot s = this.getSlot( mouseX, mouseY );
if( s instanceof SlotME ) if( s instanceof SlotME )
{ {
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999; final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
IAEItemStack myStack = null; IAEItemStack myStack = null;
try try
{ {
SlotME theSlotField = (SlotME) s; final SlotME theSlotField = (SlotME) s;
myStack = theSlotField.getAEStack(); myStack = theSlotField.getAEStack();
} }
catch( Throwable ignore ) catch( final Throwable ignore )
{ {
} }
@ -96,28 +96,28 @@ public abstract class AEBaseMEGui extends AEBaseGui
// Vanilla version... // Vanilla version...
// protected void drawItemStackTooltip(ItemStack stack, int x, int y) // protected void drawItemStackTooltip(ItemStack stack, int x, int y)
@Override @Override
protected void renderToolTip( ItemStack stack, int x, int y ) protected void renderToolTip( final ItemStack stack, final int x, final int y )
{ {
Slot s = this.getSlot( x, y ); final Slot s = this.getSlot( x, y );
if( s instanceof SlotME && stack != null ) if( s instanceof SlotME && stack != null )
{ {
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999; final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
IAEItemStack myStack = null; IAEItemStack myStack = null;
try try
{ {
SlotME theSlotField = (SlotME) s; final SlotME theSlotField = (SlotME) s;
myStack = theSlotField.getAEStack(); myStack = theSlotField.getAEStack();
} }
catch( Throwable ignore ) catch( final Throwable ignore )
{ {
} }
if( myStack != null ) if( myStack != null )
{ {
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); final List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) ) if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
{ {
@ -133,7 +133,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
} }
else if( stack.stackSize > BigNumber ) else if( stack.stackSize > BigNumber )
{ {
List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips ); final List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) ); var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
this.drawTooltip( x, y, 0, join( var4, "\n" ) ); this.drawTooltip( x, y, 0, join( var4, "\n" ) );
return; return;

View file

@ -25,18 +25,18 @@ import net.minecraft.inventory.Container;
public class GuiNull extends AEBaseGui public class GuiNull extends AEBaseGui
{ {
public GuiNull( Container container ) public GuiNull( final Container container )
{ {
super( container ); super( container );
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
} }

View file

@ -34,16 +34,16 @@ import appeng.core.AppEng;
public class AEConfigGui extends GuiConfig public class AEConfigGui extends GuiConfig
{ {
public AEConfigGui( GuiScreen parent ) public AEConfigGui( final GuiScreen parent )
{ {
super( parent, getConfigElements(), AppEng.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath( AEConfig.instance.getFilePath() ) ); super( parent, getConfigElements(), AppEng.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath( AEConfig.instance.getFilePath() ) );
} }
private static List<IConfigElement> getConfigElements() private static List<IConfigElement> getConfigElements()
{ {
List<IConfigElement> list = new ArrayList<IConfigElement>(); final List<IConfigElement> list = new ArrayList<IConfigElement>();
for( String cat : AEConfig.instance.getCategoryNames() ) for( final String cat : AEConfig.instance.getCategoryNames() )
{ {
if( cat.equals( "versionchecker" ) ) if( cat.equals( "versionchecker" ) )
{ {
@ -55,14 +55,14 @@ public class AEConfigGui extends GuiConfig
continue; continue;
} }
ConfigCategory cc = AEConfig.instance.getCategory( cat ); final ConfigCategory cc = AEConfig.instance.getCategory( cat );
if( cc.isChild() ) if( cc.isChild() )
{ {
continue; continue;
} }
ConfigElement ce = new ConfigElement( cc ); final ConfigElement ce = new ConfigElement( cc );
list.add( ce ); list.add( ce );
} }

View file

@ -30,7 +30,7 @@ public class AEConfigGuiFactory implements IModGuiFactory
{ {
@Override @Override
public void initialize( Minecraft minecraftInstance ) public void initialize( final Minecraft minecraftInstance )
{ {
} }
@ -48,7 +48,7 @@ public class AEConfigGuiFactory implements IModGuiFactory
} }
@Override @Override
public RuntimeOptionGuiHandler getHandlerFor( RuntimeOptionCategoryElement element ) public RuntimeOptionGuiHandler getHandlerFor( final RuntimeOptionCategoryElement element )
{ {
return null; return null;
} }

View file

@ -54,7 +54,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
GuiImgButton partition; GuiImgButton partition;
GuiToggleButton copyMode; GuiToggleButton copyMode;
public GuiCellWorkbench( InventoryPlayer inventoryPlayer, TileCellWorkbench te ) public GuiCellWorkbench( final InventoryPlayer inventoryPlayer, final TileCellWorkbench te )
{ {
super( new ContainerCellWorkbench( inventoryPlayer, te ) ); super( new ContainerCellWorkbench( inventoryPlayer, te ) );
this.workbench = (ContainerCellWorkbench) this.inventorySlots; this.workbench = (ContainerCellWorkbench) this.inventorySlots;
@ -77,7 +77,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.handleButtonVisibility(); this.handleButtonVisibility();
@ -95,7 +95,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 ); this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
this.drawTexturedModalRect( offsetX + 177, offsetY + ( 7 + ( 8 ) * 18 ), 177, 151, 35, 7 ); this.drawTexturedModalRect( offsetX + 177, offsetY + ( 7 + ( 8 ) * 18 ), 177, 151, 35, 7 );
int dx = this.workbench.availableUpgrades() - 8; final int dx = this.workbench.availableUpgrades() - 8;
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 ); this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
if( dx == 8 ) if( dx == 8 )
{ {
@ -114,7 +114,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 ); this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( 8 ) * 18 ), 186, 151, 35 - 8, 7 ); this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( 8 ) * 18 ), 186, 151, 35 - 8, 7 );
int dx = this.workbench.availableUpgrades() - 16; final int dx = this.workbench.availableUpgrades() - 16;
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 ); this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
if( dx == 8 ) if( dx == 8 )
{ {
@ -138,10 +138,10 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.copyMode.setState( this.workbench.copyMode == CopyMode.CLEAR_ON_REMOVE ); this.copyMode.setState( this.workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
boolean hasFuzzy = false; boolean hasFuzzy = false;
IInventory inv = this.workbench.getCellUpgradeInventory(); final IInventory inv = this.workbench.getCellUpgradeInventory();
for( int x = 0; x < inv.getSizeInventory(); x++ ) for( int x = 0; x < inv.getSizeInventory(); x++ )
{ {
ItemStack is = inv.getStackInSlot( x ); final ItemStack is = inv.getStackInSlot( x );
if( is != null && is.getItem() instanceof IUpgradeModule ) if( is != null && is.getItem() instanceof IUpgradeModule )
{ {
if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY ) if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY )
@ -172,7 +172,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) protected void actionPerformed( final GuiButton btn )
{ {
try try
{ {
@ -190,7 +190,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
} }
else if( btn == this.fuzzyMode ) else if( btn == this.fuzzyMode )
{ {
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
FuzzyMode fz = (FuzzyMode) this.fuzzyMode.getCurrentValue(); FuzzyMode fz = (FuzzyMode) this.fuzzyMode.getCurrentValue();
fz = Platform.rotateEnum( fz, backwards, Settings.FUZZY_MODE.getPossibleValues() ); fz = Platform.rotateEnum( fz, backwards, Settings.FUZZY_MODE.getPossibleValues() );
@ -202,7 +202,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
super.actionPerformed( btn ); super.actionPerformed( btn );
} }
} }
catch( IOException ignored ) catch( final IOException ignored )
{ {
} }
} }

View file

@ -38,14 +38,14 @@ public class GuiChest extends AEBaseGui
GuiTabButton priority; GuiTabButton priority;
public GuiChest( InventoryPlayer inventoryPlayer, TileChest te ) public GuiChest( final InventoryPlayer inventoryPlayer, final TileChest te )
{ {
super( new ContainerChest( inventoryPlayer, te ) ); super( new ContainerChest( inventoryPlayer, te ) );
this.ySize = 166; this.ySize = 166;
} }
@Override @Override
protected void actionPerformed( GuiButton par1GuiButton ) throws IOException protected void actionPerformed( final GuiButton par1GuiButton ) throws IOException
{ {
super.actionPerformed( par1GuiButton ); super.actionPerformed( par1GuiButton );
@ -64,14 +64,14 @@ public class GuiChest extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/chest.png" ); this.bindTexture( "guis/chest.png" );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );

View file

@ -45,7 +45,7 @@ public class GuiCondenser extends AEBaseGui
GuiProgressBar pb; GuiProgressBar pb;
GuiImgButton mode; GuiImgButton mode;
public GuiCondenser( InventoryPlayer inventoryPlayer, TileCondenser te ) public GuiCondenser( final InventoryPlayer inventoryPlayer, final TileCondenser te )
{ {
super( new ContainerCondenser( inventoryPlayer, te ) ); super( new ContainerCondenser( inventoryPlayer, te ) );
this.cvc = (ContainerCondenser) this.inventorySlots; this.cvc = (ContainerCondenser) this.inventorySlots;
@ -53,11 +53,11 @@ public class GuiCondenser extends AEBaseGui
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
if( this.mode == btn ) if( this.mode == btn )
{ {
@ -79,7 +79,7 @@ public class GuiCondenser extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
@ -89,7 +89,7 @@ public class GuiCondenser extends AEBaseGui
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/condenser.png" ); this.bindTexture( "guis/condenser.png" );

View file

@ -65,7 +65,7 @@ public class GuiCraftAmount extends AEBaseGui
private GuiBridge originalGui; private GuiBridge originalGui;
@Reflected @Reflected
public GuiCraftAmount( InventoryPlayer inventoryPlayer, ITerminalHost te ) public GuiCraftAmount( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{ {
super( new ContainerCraftAmount( inventoryPlayer, te ) ); super( new ContainerCraftAmount( inventoryPlayer, te ) );
} }
@ -75,10 +75,10 @@ public class GuiCraftAmount extends AEBaseGui
{ {
super.initGui(); super.initGui();
int a = AEConfig.instance.craftItemsByStackAmounts( 0 ); final int a = AEConfig.instance.craftItemsByStackAmounts( 0 );
int b = AEConfig.instance.craftItemsByStackAmounts( 1 ); final int b = AEConfig.instance.craftItemsByStackAmounts( 1 );
int c = AEConfig.instance.craftItemsByStackAmounts( 2 ); final int c = AEConfig.instance.craftItemsByStackAmounts( 2 );
int d = AEConfig.instance.craftItemsByStackAmounts( 3 ); final int d = AEConfig.instance.craftItemsByStackAmounts( 3 );
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) ); this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) );
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) ); this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) );
@ -93,13 +93,13 @@ public class GuiCraftAmount extends AEBaseGui
this.buttonList.add( this.next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) ); this.buttonList.add( this.next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) );
ItemStack myIcon = null; ItemStack myIcon = null;
Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget(); final Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
final IDefinitions definitions = AEApi.instance().definitions(); final IDefinitions definitions = AEApi.instance().definitions();
final IParts parts = definitions.parts(); final IParts parts = definitions.parts();
if( target instanceof WirelessTerminalGuiObject ) if( target instanceof WirelessTerminalGuiObject )
{ {
for( ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
{ {
myIcon = wirelessTerminalStack; myIcon = wirelessTerminalStack;
} }
@ -109,7 +109,7 @@ public class GuiCraftAmount extends AEBaseGui
if( target instanceof PartTerminal ) if( target instanceof PartTerminal )
{ {
for( ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
{ {
myIcon = stack; myIcon = stack;
} }
@ -118,7 +118,7 @@ public class GuiCraftAmount extends AEBaseGui
if( target instanceof PartCraftingTerminal ) if( target instanceof PartCraftingTerminal )
{ {
for( ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
{ {
myIcon = stack; myIcon = stack;
} }
@ -127,7 +127,7 @@ public class GuiCraftAmount extends AEBaseGui
if( target instanceof PartPatternTerminal ) if( target instanceof PartPatternTerminal )
{ {
for( ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
{ {
myIcon = stack; myIcon = stack;
} }
@ -149,13 +149,13 @@ public class GuiCraftAmount extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 ); this.fontRendererObj.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal(); this.next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
@ -167,7 +167,7 @@ public class GuiCraftAmount extends AEBaseGui
Long.parseLong( this.amountToCraft.getText() ); Long.parseLong( this.amountToCraft.getText() );
this.next.enabled = this.amountToCraft.getText().length() > 0; this.next.enabled = this.amountToCraft.getText().length() > 0;
} }
catch( NumberFormatException e ) catch( final NumberFormatException e )
{ {
this.next.enabled = false; this.next.enabled = false;
} }
@ -176,7 +176,7 @@ public class GuiCraftAmount extends AEBaseGui
} }
@Override @Override
protected void keyTyped( char character, int key ) throws IOException protected void keyTyped( final char character, final int key ) throws IOException
{ {
if( !this.checkHotbarKeys( key ) ) if( !this.checkHotbarKeys( key ) )
{ {
@ -207,13 +207,13 @@ public class GuiCraftAmount extends AEBaseGui
out = "0"; out = "0";
} }
long result = Long.parseLong( out ); final long result = Long.parseLong( out );
if( result < 0 ) if( result < 0 )
{ {
this.amountToCraft.setText( "1" ); this.amountToCraft.setText( "1" );
} }
} }
catch( NumberFormatException e ) catch( final NumberFormatException e )
{ {
// :P // :P
} }
@ -226,7 +226,7 @@ public class GuiCraftAmount extends AEBaseGui
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
@ -243,14 +243,14 @@ public class GuiCraftAmount extends AEBaseGui
NetworkHandler.instance.sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), isShiftKeyDown() ) ); NetworkHandler.instance.sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), isShiftKeyDown() ) );
} }
} }
catch( NumberFormatException e ) catch( final NumberFormatException e )
{ {
// nope.. // nope..
this.amountToCraft.setText( "1" ); this.amountToCraft.setText( "1" );
} }
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000; final boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000; final boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
if( isPlus || isMinus ) if( isPlus || isMinus )
{ {
@ -258,7 +258,7 @@ public class GuiCraftAmount extends AEBaseGui
} }
} }
private void addQty( int i ) private void addQty( final int i )
{ {
try try
{ {
@ -298,7 +298,7 @@ public class GuiCraftAmount extends AEBaseGui
Integer.parseInt( out ); Integer.parseInt( out );
this.amountToCraft.setText( out ); this.amountToCraft.setText( out );
} }
catch( NumberFormatException e ) catch( final NumberFormatException e )
{ {
// :P // :P
} }

View file

@ -74,7 +74,7 @@ public class GuiCraftConfirm extends AEBaseGui
GuiButton selectCPU; GuiButton selectCPU;
int tooltip = -1; int tooltip = -1;
public GuiCraftConfirm( InventoryPlayer inventoryPlayer, ITerminalHost te ) public GuiCraftConfirm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{ {
super( new ContainerCraftConfirm( inventoryPlayer, te ) ); super( new ContainerCraftConfirm( inventoryPlayer, te ) );
this.xSize = 238; this.xSize = 238;
@ -131,25 +131,25 @@ public class GuiCraftConfirm extends AEBaseGui
} }
@Override @Override
public void drawScreen( int mouseX, int mouseY, float btn ) public void drawScreen( final int mouseX, final int mouseY, final float btn )
{ {
this.updateCPUButtonText(); this.updateCPUButtonText();
this.start.enabled = !( this.ccc.noCPU || this.isSimulation() ); this.start.enabled = !( this.ccc.noCPU || this.isSimulation() );
this.selectCPU.enabled = !this.isSimulation(); this.selectCPU.enabled = !this.isSimulation();
int gx = ( this.width - this.xSize ) / 2; final int gx = ( this.width - this.xSize ) / 2;
int gy = ( this.height - this.ySize ) / 2; final int gy = ( this.height - this.ySize ) / 2;
this.tooltip = -1; this.tooltip = -1;
int offY = 23; final int offY = 23;
int y = 0; int y = 0;
int x = 0; int x = 0;
for( int z = 0; z <= 4 * 5; z++ ) for( int z = 0; z <= 4 * 5; z++ )
{ {
int minX = gx + 9 + x * 67; final int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY; final int minY = gy + 22 + y * offY;
if( minX < mouseX && minX + 67 > mouseX ) if( minX < mouseX && minX + 67 > mouseX )
{ {
@ -179,7 +179,7 @@ public class GuiCraftConfirm extends AEBaseGui
{ {
if( this.ccc.myName.length() > 0 ) if( this.ccc.myName.length() > 0 )
{ {
String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) ); final String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name; btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
} }
else else
@ -202,11 +202,11 @@ public class GuiCraftConfirm extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
long BytesUsed = this.ccc.bytesUsed; final long BytesUsed = this.ccc.bytesUsed;
String byteUsed = NumberFormat.getInstance().format( BytesUsed ); final String byteUsed = NumberFormat.getInstance().format( BytesUsed );
String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal(); final String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal();
this.fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 ); this.fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
String dsp = null; String dsp = null;
@ -220,36 +220,36 @@ public class GuiCraftConfirm extends AEBaseGui
dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A"; dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
} }
int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2; final int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 ); this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
int sectionLength = 67; final int sectionLength = 67;
int x = 0; int x = 0;
int y = 0; int y = 0;
int xo = 9; final int xo = 9;
int yo = 22; final int yo = 22;
int viewStart = this.myScrollBar.getCurrentScroll() * 3; final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
int viewEnd = viewStart + 3 * this.rows; final int viewEnd = viewStart + 3 * this.rows;
String dspToolTip = ""; String dspToolTip = "";
List<String> lineList = new LinkedList<String>(); final List<String> lineList = new LinkedList<String>();
int toolPosX = 0; int toolPosX = 0;
int toolPosY = 0; int toolPosY = 0;
int offY = 23; final int offY = 23;
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ ) for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
{ {
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z ); final IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
if( refStack != null ) if( refStack != null )
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScaled( 0.5, 0.5, 0.5 ); GL11.glScaled( 0.5, 0.5, 0.5 );
IAEItemStack stored = this.storage.findPrecise( refStack ); final IAEItemStack stored = this.storage.findPrecise( refStack );
IAEItemStack pendingStack = this.pending.findPrecise( refStack ); final IAEItemStack pendingStack = this.pending.findPrecise( refStack );
IAEItemStack missingStack = this.missing.findPrecise( refStack ); final IAEItemStack missingStack = this.missing.findPrecise( refStack );
int lines = 0; int lines = 0;
@ -266,7 +266,7 @@ public class GuiCraftConfirm extends AEBaseGui
lines++; lines++;
} }
int negY = ( ( lines - 1 ) * 5 ) / 2; final int negY = ( ( lines - 1 ) * 5 ) / 2;
int downY = 0; int downY = 0;
if( stored != null && stored.getStackSize() > 0 ) if( stored != null && stored.getStackSize() > 0 )
@ -282,7 +282,7 @@ public class GuiCraftConfirm extends AEBaseGui
} }
str = GuiText.FromStorage.getLocal() + ": " + str; str = GuiText.FromStorage.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str ); final int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 ); this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
@ -307,7 +307,7 @@ public class GuiCraftConfirm extends AEBaseGui
} }
str = GuiText.Missing.getLocal() + ": " + str; str = GuiText.Missing.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str ); final int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 ); this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
@ -332,7 +332,7 @@ public class GuiCraftConfirm extends AEBaseGui
} }
str = GuiText.ToCraft.getLocal() + ": " + str; str = GuiText.ToCraft.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str ); final int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 ); this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
@ -342,10 +342,10 @@ public class GuiCraftConfirm extends AEBaseGui
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19; final int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
int posY = y * offY + yo; final int posY = y * offY + yo;
ItemStack is = refStack.copy().getItemStack(); final ItemStack is = refStack.copy().getItemStack();
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
{ {
@ -364,8 +364,8 @@ public class GuiCraftConfirm extends AEBaseGui
if( red ) if( red )
{ {
int startX = x * ( 1 + sectionLength ) + xo; final int startX = x * ( 1 + sectionLength ) + xo;
int startY = posY - 4; final int startY = posY - 4;
drawRect( startX, startY, startX + sectionLength, startY + offY, 0x1AFF0000 ); drawRect( startX, startY, startX + sectionLength, startY + offY, 0x1AFF0000 );
} }
@ -388,7 +388,7 @@ public class GuiCraftConfirm extends AEBaseGui
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.setScrollBar(); this.setScrollBar();
this.bindTexture( "guis/craftingreport.png" ); this.bindTexture( "guis/craftingreport.png" );
@ -397,41 +397,41 @@ public class GuiCraftConfirm extends AEBaseGui
private void setScrollBar() private void setScrollBar()
{ {
int size = this.visual.size(); final int size = this.visual.size();
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 ); this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 ); this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
} }
public void postUpdate( List<IAEItemStack> list, byte ref ) public void postUpdate( final List<IAEItemStack> list, final byte ref )
{ {
switch( ref ) switch( ref )
{ {
case 0: case 0:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.storage, l ); this.handleInput( this.storage, l );
} }
break; break;
case 1: case 1:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.pending, l ); this.handleInput( this.pending, l );
} }
break; break;
case 2: case 2:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.missing, l ); this.handleInput( this.missing, l );
} }
break; break;
} }
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
long amt = this.getTotal( l ); final long amt = this.getTotal( l );
if( amt <= 0 ) if( amt <= 0 )
{ {
@ -439,7 +439,7 @@ public class GuiCraftConfirm extends AEBaseGui
} }
else else
{ {
IAEItemStack is = this.findVisualStack( l ); final IAEItemStack is = this.findVisualStack( l );
is.setStackSize( amt ); is.setStackSize( amt );
} }
} }
@ -447,7 +447,7 @@ public class GuiCraftConfirm extends AEBaseGui
this.setScrollBar(); this.setScrollBar();
} }
private void handleInput( IItemList<IAEItemStack> s, IAEItemStack l ) private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
{ {
IAEItemStack a = s.findPrecise( l ); IAEItemStack a = s.findPrecise( l );
@ -473,11 +473,11 @@ public class GuiCraftConfirm extends AEBaseGui
} }
} }
private long getTotal( IAEItemStack is ) private long getTotal( final IAEItemStack is )
{ {
IAEItemStack a = this.storage.findPrecise( is ); final IAEItemStack a = this.storage.findPrecise( is );
IAEItemStack c = this.pending.findPrecise( is ); final IAEItemStack c = this.pending.findPrecise( is );
IAEItemStack m = this.missing.findPrecise( is ); final IAEItemStack m = this.missing.findPrecise( is );
long total = 0; long total = 0;
@ -499,12 +499,12 @@ public class GuiCraftConfirm extends AEBaseGui
return total; return total;
} }
private void deleteVisualStack( IAEItemStack l ) private void deleteVisualStack( final IAEItemStack l )
{ {
Iterator<IAEItemStack> i = this.visual.iterator(); final Iterator<IAEItemStack> i = this.visual.iterator();
while( i.hasNext() ) while( i.hasNext() )
{ {
IAEItemStack o = i.next(); final IAEItemStack o = i.next();
if( o.equals( l ) ) if( o.equals( l ) )
{ {
i.remove(); i.remove();
@ -513,9 +513,9 @@ public class GuiCraftConfirm extends AEBaseGui
} }
} }
private IAEItemStack findVisualStack( IAEItemStack l ) private IAEItemStack findVisualStack( final IAEItemStack l )
{ {
for( IAEItemStack o : this.visual ) for( final IAEItemStack o : this.visual )
{ {
if( o.equals( l ) ) if( o.equals( l ) )
{ {
@ -523,13 +523,13 @@ public class GuiCraftConfirm extends AEBaseGui
} }
} }
IAEItemStack stack = l.copy(); final IAEItemStack stack = l.copy();
this.visual.add( stack ); this.visual.add( stack );
return stack; return stack;
} }
@Override @Override
protected void keyTyped( char character, int key ) throws IOException protected void keyTyped( final char character, final int key ) throws IOException
{ {
if( !this.checkHotbarKeys( key ) ) if( !this.checkHotbarKeys( key ) )
{ {
@ -542,11 +542,11 @@ public class GuiCraftConfirm extends AEBaseGui
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
if( btn == this.selectCPU ) if( btn == this.selectCPU )
{ {
@ -554,7 +554,7 @@ public class GuiCraftConfirm extends AEBaseGui
{ {
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) ); NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) );
} }
catch( IOException e ) catch( final IOException e )
{ {
AELog.error( e ); AELog.error( e );
} }
@ -571,7 +571,7 @@ public class GuiCraftConfirm extends AEBaseGui
{ {
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Start", "Start" ) ); NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Start", "Start" ) );
} }
catch( Throwable e ) catch( final Throwable e )
{ {
AELog.error( e ); AELog.error( e );
} }

View file

@ -92,12 +92,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private GuiButton cancel; private GuiButton cancel;
private int tooltip = -1; private int tooltip = -1;
public GuiCraftingCPU( InventoryPlayer inventoryPlayer, Object te ) public GuiCraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
{ {
this( new ContainerCraftingCPU( inventoryPlayer, te ) ); this( new ContainerCraftingCPU( inventoryPlayer, te ) );
} }
protected GuiCraftingCPU( ContainerCraftingCPU container ) protected GuiCraftingCPU( final ContainerCraftingCPU container )
{ {
super( container ); super( container );
this.craftingCpu = container; this.craftingCpu = container;
@ -115,7 +115,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
@ -125,7 +125,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{ {
NetworkHandler.instance.sendToServer( new PacketValueConfig( "TileCrafting.Cancel", "Cancel" ) ); NetworkHandler.instance.sendToServer( new PacketValueConfig( "TileCrafting.Cancel", "Cancel" ) );
} }
catch( IOException e ) catch( final IOException e )
{ {
AELog.error( e ); AELog.error( e );
} }
@ -143,14 +143,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private void setScrollBar() private void setScrollBar()
{ {
int size = this.visual.size(); final int size = this.visual.size();
this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT ); this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 ); this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
} }
@Override @Override
public void drawScreen( int mouseX, int mouseY, float btn ) public void drawScreen( final int mouseX, final int mouseY, final float btn )
{ {
this.cancel.enabled = !this.visual.isEmpty(); this.cancel.enabled = !this.visual.isEmpty();
@ -164,8 +164,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int x = 0; int x = 0;
for( int z = 0; z <= 4 * 5; z++ ) for( int z = 0; z <= 4 * 5; z++ )
{ {
int minX = gx + 9 + x * 67; final int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY; final int minY = gy + 22 + y * offY;
if( minX < mouseX && minX + 67 > mouseX ) if( minX < mouseX && minX + 67 > mouseX )
{ {
@ -189,7 +189,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() ); String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
@ -208,16 +208,16 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
final int viewEnd = viewStart + 3 * 6; final int viewEnd = viewStart + 3 * 6;
String dspToolTip = ""; String dspToolTip = "";
List<String> lineList = new LinkedList<String>(); final List<String> lineList = new LinkedList<String>();
int toolPosX = 0; int toolPosX = 0;
int toolPosY = 0; int toolPosY = 0;
int offY = 23; final int offY = 23;
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE; final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ ) for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
{ {
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z ); final IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
if( refStack != null ) if( refStack != null )
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
@ -248,19 +248,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) ) if( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) )
{ {
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA; final int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA;
int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2; final int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2; final int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor ); drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
} }
int negY = ( ( lines - 1 ) * 5 ) / 2; final int negY = ( ( lines - 1 ) * 5 ) / 2;
int downY = 0; int downY = 0;
if( stored != null && stored.getStackSize() > 0 ) if( stored != null && stored.getStackSize() > 0 )
{ {
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() ); final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
int w = 4 + this.fontRendererObj.getStringWidth( str ); final int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR ); this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
@ -300,10 +300,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
GL11.glPopMatrix(); GL11.glPopMatrix();
int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19; final int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
int posY = y * offY + ITEMSTACK_TOP_OFFSET; final int posY = y * offY + ITEMSTACK_TOP_OFFSET;
ItemStack is = refStack.copy().getItemStack(); final ItemStack is = refStack.copy().getItemStack();
if( this.tooltip == z - viewStart ) if( this.tooltip == z - viewStart )
{ {
@ -339,41 +339,41 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/craftingcpu.png" ); this.bindTexture( "guis/craftingcpu.png" );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
} }
public void postUpdate( List<IAEItemStack> list, byte ref ) public void postUpdate( final List<IAEItemStack> list, final byte ref )
{ {
switch( ref ) switch( ref )
{ {
case 0: case 0:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.storage, l ); this.handleInput( this.storage, l );
} }
break; break;
case 1: case 1:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.active, l ); this.handleInput( this.active, l );
} }
break; break;
case 2: case 2:
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
this.handleInput( this.pending, l ); this.handleInput( this.pending, l );
} }
break; break;
} }
for( IAEItemStack l : list ) for( final IAEItemStack l : list )
{ {
long amt = this.getTotal( l ); final long amt = this.getTotal( l );
if( amt <= 0 ) if( amt <= 0 )
{ {
@ -381,7 +381,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
else else
{ {
IAEItemStack is = this.findVisualStack( l ); final IAEItemStack is = this.findVisualStack( l );
is.setStackSize( amt ); is.setStackSize( amt );
} }
} }
@ -389,7 +389,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
this.setScrollBar(); this.setScrollBar();
} }
private void handleInput( IItemList<IAEItemStack> s, IAEItemStack l ) private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
{ {
IAEItemStack a = s.findPrecise( l ); IAEItemStack a = s.findPrecise( l );
@ -415,7 +415,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
} }
private long getTotal( IAEItemStack is ) private long getTotal( final IAEItemStack is )
{ {
final IAEItemStack a = this.storage.findPrecise( is ); final IAEItemStack a = this.storage.findPrecise( is );
final IAEItemStack b = this.active.findPrecise( is ); final IAEItemStack b = this.active.findPrecise( is );
@ -441,13 +441,13 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
return total; return total;
} }
private void deleteVisualStack( IAEItemStack l ) private void deleteVisualStack( final IAEItemStack l )
{ {
final Iterator<IAEItemStack> i = this.visual.iterator(); final Iterator<IAEItemStack> i = this.visual.iterator();
while( i.hasNext() ) while( i.hasNext() )
{ {
IAEItemStack o = i.next(); final IAEItemStack o = i.next();
if( o.equals( l ) ) if( o.equals( l ) )
{ {
i.remove(); i.remove();
@ -456,9 +456,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
} }
} }
private IAEItemStack findVisualStack( IAEItemStack l ) private IAEItemStack findVisualStack( final IAEItemStack l )
{ {
for( IAEItemStack o : this.visual ) for( final IAEItemStack o : this.visual )
{ {
if( o.equals( l ) ) if( o.equals( l ) )
{ {

View file

@ -59,18 +59,18 @@ public class GuiCraftingStatus extends GuiCraftingCPU
GuiBridge originalGui; GuiBridge originalGui;
ItemStack myIcon = null; ItemStack myIcon = null;
public GuiCraftingStatus( InventoryPlayer inventoryPlayer, ITerminalHost te ) public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{ {
super( new ContainerCraftingStatus( inventoryPlayer, te ) ); super( new ContainerCraftingStatus( inventoryPlayer, te ) );
this.status = (ContainerCraftingStatus) this.inventorySlots; this.status = (ContainerCraftingStatus) this.inventorySlots;
Object target = this.status.getTarget(); final Object target = this.status.getTarget();
final IDefinitions definitions = AEApi.instance().definitions(); final IDefinitions definitions = AEApi.instance().definitions();
final IParts parts = definitions.parts(); final IParts parts = definitions.parts();
if( target instanceof WirelessTerminalGuiObject ) if( target instanceof WirelessTerminalGuiObject )
{ {
for( ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
{ {
this.myIcon = wirelessTerminalStack; this.myIcon = wirelessTerminalStack;
} }
@ -80,7 +80,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if( target instanceof PartTerminal ) if( target instanceof PartTerminal )
{ {
for( ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
{ {
this.myIcon = stack; this.myIcon = stack;
} }
@ -89,7 +89,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if( target instanceof PartCraftingTerminal ) if( target instanceof PartCraftingTerminal )
{ {
for( ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
{ {
this.myIcon = stack; this.myIcon = stack;
} }
@ -98,7 +98,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
if( target instanceof PartPatternTerminal ) if( target instanceof PartPatternTerminal )
{ {
for( ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() ) for( final ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
{ {
this.myIcon = stack; this.myIcon = stack;
} }
@ -107,11 +107,11 @@ public class GuiCraftingStatus extends GuiCraftingCPU
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
if( btn == this.selectCPU ) if( btn == this.selectCPU )
{ {
@ -119,7 +119,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
{ {
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) ); NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) );
} }
catch( IOException e ) catch( final IOException e )
{ {
AELog.error( e ); AELog.error( e );
} }
@ -148,7 +148,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
} }
@Override @Override
public void drawScreen( int mouseX, int mouseY, float btn ) public void drawScreen( final int mouseX, final int mouseY, final float btn )
{ {
this.updateCPUButtonText(); this.updateCPUButtonText();
super.drawScreen( mouseX, mouseY, btn ); super.drawScreen( mouseX, mouseY, btn );
@ -162,7 +162,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
{ {
if( this.status.myName.length() > 0 ) if( this.status.myName.length() > 0 )
{ {
String name = this.status.myName.substring( 0, Math.min( 20, this.status.myName.length() ) ); final String name = this.status.myName.substring( 0, Math.min( 20, this.status.myName.length() ) );
btnTextText = GuiText.CPUs.getLocal() + ": " + name; btnTextText = GuiText.CPUs.getLocal() + ": " + name;
} }
else else
@ -180,7 +180,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
} }
@Override @Override
protected String getGuiDisplayName( String in ) protected String getGuiDisplayName( final String in )
{ {
return in; // the cup name is on the button return in; // the cup name is on the button
} }

View file

@ -40,22 +40,22 @@ public class GuiCraftingTerm extends GuiMEMonitorable
GuiImgButton clearBtn; GuiImgButton clearBtn;
public GuiCraftingTerm( InventoryPlayer inventoryPlayer, ITerminalHost te ) public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
{ {
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) ); super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
this.reservedSpace = 73; this.reservedSpace = 73;
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) protected void actionPerformed( final GuiButton btn )
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
if( this.clearBtn == btn ) if( this.clearBtn == btn )
{ {
Slot s = null; Slot s = null;
Container c = this.inventorySlots; final Container c = this.inventorySlots;
for( Object j : c.inventorySlots ) for( final Object j : c.inventorySlots )
{ {
if( j instanceof SlotCraftingMatrix ) if( j instanceof SlotCraftingMatrix )
{ {
@ -65,7 +65,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
if( s != null ) if( s != null )
{ {
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 ); final PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
NetworkHandler.instance.sendToServer( p ); NetworkHandler.instance.sendToServer( p );
} }
} }
@ -80,7 +80,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
super.drawFG( offsetX, offsetY, mouseX, mouseY ); super.drawFG( offsetX, offsetY, mouseX, mouseY );
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 ); this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );

View file

@ -38,14 +38,14 @@ public class GuiDrive extends AEBaseGui
GuiTabButton priority; GuiTabButton priority;
public GuiDrive( InventoryPlayer inventoryPlayer, TileDrive te ) public GuiDrive( final InventoryPlayer inventoryPlayer, final TileDrive te )
{ {
super( new ContainerDrive( inventoryPlayer, te ) ); super( new ContainerDrive( inventoryPlayer, te ) );
this.ySize = 199; this.ySize = 199;
} }
@Override @Override
protected void actionPerformed( GuiButton par1GuiButton ) throws IOException protected void actionPerformed( final GuiButton par1GuiButton ) throws IOException
{ {
super.actionPerformed( par1GuiButton ); super.actionPerformed( par1GuiButton );
@ -64,14 +64,14 @@ public class GuiDrive extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/drive.png" ); this.bindTexture( "guis/drive.png" );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );

View file

@ -46,7 +46,7 @@ public class GuiFormationPlane extends GuiUpgradeable
GuiTabButton priority; GuiTabButton priority;
GuiImgButton placeMode; GuiImgButton placeMode;
public GuiFormationPlane( InventoryPlayer inventoryPlayer, PartFormationPlane te ) public GuiFormationPlane( final InventoryPlayer inventoryPlayer, final PartFormationPlane te )
{ {
super( new ContainerFormationPlane( inventoryPlayer, te ) ); super( new ContainerFormationPlane( inventoryPlayer, te ) );
this.ySize = 251; this.ySize = 251;
@ -65,7 +65,7 @@ public class GuiFormationPlane extends GuiUpgradeable
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
@ -88,11 +88,11 @@ public class GuiFormationPlane extends GuiUpgradeable
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
if( btn == this.priority ) if( btn == this.priority )
{ {

View file

@ -29,21 +29,21 @@ import appeng.tile.grindstone.TileGrinder;
public class GuiGrinder extends AEBaseGui public class GuiGrinder extends AEBaseGui
{ {
public GuiGrinder( InventoryPlayer inventoryPlayer, TileGrinder te ) public GuiGrinder( final InventoryPlayer inventoryPlayer, final TileGrinder te )
{ {
super( new ContainerGrinder( inventoryPlayer, te ) ); super( new ContainerGrinder( inventoryPlayer, te ) );
this.ySize = 176; this.ySize = 176;
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/grinder.png" ); this.bindTexture( "guis/grinder.png" );
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );

View file

@ -47,7 +47,7 @@ public class GuiIOPort extends GuiUpgradeable
GuiImgButton fullMode; GuiImgButton fullMode;
GuiImgButton operationMode; GuiImgButton operationMode;
public GuiIOPort( InventoryPlayer inventoryPlayer, TileIOPort te ) public GuiIOPort( final InventoryPlayer inventoryPlayer, final TileIOPort te )
{ {
super( new ContainerIOPort( inventoryPlayer, te ) ); super( new ContainerIOPort( inventoryPlayer, te ) );
this.ySize = 166; this.ySize = 166;
@ -66,7 +66,7 @@ public class GuiIOPort extends GuiUpgradeable
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 ); this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 ); this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
@ -88,18 +88,18 @@ public class GuiIOPort extends GuiUpgradeable
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
super.drawBG( offsetX, offsetY, mouseX, mouseY ); super.drawBG( offsetX, offsetY, mouseX, mouseY );
final IDefinitions definitions = AEApi.instance().definitions(); final IDefinitions definitions = AEApi.instance().definitions();
for( ItemStack cell1kStack : definitions.items().cell1k().maybeStack( 1 ).asSet() ) for( final ItemStack cell1kStack : definitions.items().cell1k().maybeStack( 1 ).asSet() )
{ {
this.drawItem( offsetX + 66 - 8, offsetY + 17, cell1kStack ); this.drawItem( offsetX + 66 - 8, offsetY + 17, cell1kStack );
} }
for( ItemStack driveStack : definitions.blocks().drive().maybeStack( 1 ).asSet() ) for( final ItemStack driveStack : definitions.blocks().drive().maybeStack( 1 ).asSet() )
{ {
this.drawItem( offsetX + 94 + 8, offsetY + 17, driveStack ); this.drawItem( offsetX + 94 + 8, offsetY + 17, driveStack );
} }
@ -112,11 +112,11 @@ public class GuiIOPort extends GuiUpgradeable
} }
@Override @Override
protected void actionPerformed( GuiButton btn ) throws IOException protected void actionPerformed( final GuiButton btn ) throws IOException
{ {
super.actionPerformed( btn ); super.actionPerformed( btn );
boolean backwards = Mouse.isButtonDown( 1 ); final boolean backwards = Mouse.isButtonDown( 1 );
if( btn == this.fullMode ) if( btn == this.fullMode )
{ {

View file

@ -35,7 +35,7 @@ public class GuiInscriber extends AEBaseGui
final ContainerInscriber cvc; final ContainerInscriber cvc;
GuiProgressBar pb; GuiProgressBar pb;
public GuiInscriber( InventoryPlayer inventoryPlayer, TileInscriber te ) public GuiInscriber( final InventoryPlayer inventoryPlayer, final TileInscriber te )
{ {
super( new ContainerInscriber( inventoryPlayer, te ) ); super( new ContainerInscriber( inventoryPlayer, te ) );
this.cvc = (ContainerInscriber) this.inventorySlots; this.cvc = (ContainerInscriber) this.inventorySlots;
@ -58,7 +58,7 @@ public class GuiInscriber extends AEBaseGui
} }
@Override @Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" ); this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" );
@ -67,7 +67,7 @@ public class GuiInscriber extends AEBaseGui
} }
@Override @Override
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY ) public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
{ {
this.bindTexture( "guis/inscriber.png" ); this.bindTexture( "guis/inscriber.png" );
this.pb.xPosition = 135 + this.guiLeft; this.pb.xPosition = 135 + this.guiLeft;

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