Deleted unnecessary casts with Eclipse
This commit is contained in:
@@ -590,7 +590,7 @@ public abstract class AEBaseContainer extends Container
|
||||
{
|
||||
if ( syncData.containsKey( idx ) )
|
||||
{
|
||||
syncData.get( idx ).update( (long) value );
|
||||
syncData.get( idx ).update( value );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,15 +118,15 @@ public class SyncDat
|
||||
if ( field.getType().equals( int.class ) )
|
||||
field.set( source, (int) val );
|
||||
else if ( field.getType().equals( long.class ) )
|
||||
field.set( source, (long) val );
|
||||
field.set( source, val );
|
||||
else if ( field.getType().equals( boolean.class ) )
|
||||
field.set( source, val == 1 );
|
||||
else if ( field.getType().equals( Integer.class ) )
|
||||
field.set( source, (Integer) (int) val );
|
||||
field.set( source, (int) val );
|
||||
else if ( field.getType().equals( Long.class ) )
|
||||
field.set( source, (Long) val );
|
||||
field.set( source, val );
|
||||
else if ( field.getType().equals( Boolean.class ) )
|
||||
field.set( source, (Boolean) (val == 1) );
|
||||
field.set( source, val == 1 );
|
||||
}
|
||||
|
||||
source.onUpdate( field.getName(), oldValue, field.get( source ) );
|
||||
|
||||
@@ -262,7 +262,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
this.copyMode = getCopyMode();
|
||||
this.fzMode = (FuzzyMode) getFuzzyMode();
|
||||
this.fzMode = getFuzzyMode();
|
||||
}
|
||||
|
||||
prevStack = is;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ContainerCondenser extends AEBaseContainer
|
||||
double requiredEnergy = this.condenser.getRequiredPower();
|
||||
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
|
||||
|
||||
this.requiredEnergy = (int) maxDisplay;
|
||||
this.requiredEnergy = maxDisplay;
|
||||
this.storedPower = (int) this.condenser.storedPower;
|
||||
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
@@ -15,7 +14,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
IPortableCell civ;
|
||||
|
||||
public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell monitorable) {
|
||||
super( ip, (ITerminalHost) monitorable, false );
|
||||
super( ip, monitorable, false );
|
||||
lockPlayerInventorySlot( ip.currentItem );
|
||||
civ = monitorable;
|
||||
bindPlayerInventory( ip, 0, 0 );
|
||||
@@ -50,7 +49,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
ticks++;
|
||||
if ( ticks > 10 )
|
||||
{
|
||||
civ.extractAEPower( powerMultiplier * (double) ticks, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
civ.extractAEPower( powerMultiplier * ticks, Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||
ticks = 0;
|
||||
}
|
||||
super.detectAndSendChanges();
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
|
||||
if ( te instanceof IPart )
|
||||
{
|
||||
IUpgradeableHost myTile = (IUpgradeableHost) te;
|
||||
IUpgradeableHost myTile = te;
|
||||
TileEntity mk = myTile.getTile();
|
||||
w = mk.getWorldObj();
|
||||
xCoord = mk.xCoord;
|
||||
@@ -186,7 +186,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
{
|
||||
OptionalSlotFake fs = (OptionalSlotFake) o;
|
||||
if ( !fs.isEnabled() && fs.getDisplayStack() != null )
|
||||
((OptionalSlotFake) fs).clearStack();
|
||||
fs.clearStack();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user