Removes not needed casts

This commit is contained in:
thatsIch 2014-09-29 09:42:50 +02:00
parent 640d888d13
commit 3ce47a167f
10 changed files with 21 additions and 21 deletions

View file

@ -30,7 +30,7 @@ public class AppEngRenderItem extends RenderItem
@Override @Override
public void renderItemOverlayIntoGUI(FontRenderer par1FontRenderer, TextureManager par2RenderEngine, ItemStack par3ItemStack, int par4, int par5) public void renderItemOverlayIntoGUI(FontRenderer par1FontRenderer, TextureManager par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
{ {
this.renderItemOverlayIntoGUI( par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5, (String) null ); this.renderItemOverlayIntoGUI( par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5, null );
} }
@Override @Override

View file

@ -80,7 +80,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
if ( c instanceof CraftingCPUCluster ) if ( c instanceof CraftingCPUCluster )
{ {
cpuName = ((CraftingCPUCluster) c).getName(); cpuName = c.getName();
monitor = (CraftingCPUCluster) c; monitor = (CraftingCPUCluster) c;
if ( monitor != null ) if ( monitor != null )

View file

@ -137,8 +137,8 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
for (int i = 0; i < this.crafters.size(); ++i) for (int i = 0; i < this.crafters.size(); ++i)
{ {
ICrafting icrafting = (ICrafting) this.crafters.get( i ); ICrafting icrafting = (ICrafting) this.crafters.get( i );
((EntityPlayerMP) icrafting).sendSlotContents( this, wirelessIn.slotNumber, wirelessIn.getStack() ); icrafting.sendSlotContents( this, wirelessIn.slotNumber, wirelessIn.getStack() );
((EntityPlayerMP) icrafting).sendSlotContents( this, wirelessOut.slotNumber, wirelessOut.getStack() ); icrafting.sendSlotContents( this, wirelessOut.slotNumber, wirelessOut.getStack() );
} }
} }

View file

@ -117,7 +117,7 @@ public class ToolDebugCard extends AEBaseItem
outputMsg( player, "Freq: " + ((PartP2PTunnel) center.getMachine()).freq ); outputMsg( player, "Freq: " + ((PartP2PTunnel) center.getMachine()).freq );
} }
TickManagerCache tmc = (TickManagerCache) g.getCache( ITickManager.class ); TickManagerCache tmc = g.getCache( ITickManager.class );
for (Class c : g.getMachineClasses()) for (Class c : g.getMachineClasses())
{ {
int o = 0; int o = 0;

View file

@ -21,7 +21,7 @@ final public class DispenserBehaviorTinyTNT extends BehaviorDefaultDispenseItem
int j = dispenser.getYInt() + enumfacing.getFrontOffsetY(); int j = dispenser.getYInt() + enumfacing.getFrontOffsetY();
int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ(); int k = dispenser.getZInt() + enumfacing.getFrontOffsetZ();
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, i + 0.5F, j + 0.5F, EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( world, i + 0.5F, j + 0.5F,
k + 0.5F, (EntityLiving) null ); k + 0.5F, null );
world.spawnEntityInWorld( primedTinyTNTEntity ); world.spawnEntityInWorld( primedTinyTNTEntity );
--dispensedItem.stackSize; --dispensedItem.stackSize;
return dispensedItem; return dispensedItem;

View file

@ -337,22 +337,22 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
{ {
if ( recipe instanceof ShapelessRecipe ) if ( recipe instanceof ShapelessRecipe )
{ {
List items = (List) ReflectionHelper.getPrivateValue( ShapelessRecipe.class, (ShapelessRecipe) recipe, "input" ); List items = ReflectionHelper.getPrivateValue( ShapelessRecipe.class, (ShapelessRecipe) recipe, "input" );
return getCraftingShapelessRecipe( items, ((ShapelessRecipe) recipe).getRecipeOutput() ); return getCraftingShapelessRecipe( items, recipe.getRecipeOutput() );
} }
else if ( recipe instanceof ShapedRecipe ) else if ( recipe instanceof ShapedRecipe )
{ {
int width = (Integer) ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "width" ); int width = ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "width" );
int height = (Integer) ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "height" ); int height = ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "height" );
Object[] items = (Object[]) ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "input" ); Object[] items = ReflectionHelper.getPrivateValue( ShapedRecipe.class, (ShapedRecipe) recipe, "input" );
if ( allowSmallGrid && width < 3 && height < 3 ) if ( allowSmallGrid && width < 3 && height < 3 )
{ {
return getSmallShapedRecipe( width, height, items, ((ShapedRecipe) recipe).getRecipeOutput() ); return getSmallShapedRecipe( width, height, items, recipe.getRecipeOutput() );
} }
else else
{ {
return getCraftingShapedRecipe( width, height, items, ((ShapedRecipe) recipe).getRecipeOutput() ); return getCraftingShapedRecipe( width, height, items, recipe.getRecipeOutput() );
} }
} }

View file

@ -301,7 +301,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
{ {
if ( compound != null ) if ( compound != null )
{ {
IConfigManager cm = ((IConfigurableObject) this).getConfigManager(); IConfigManager cm = this.getConfigManager();
if ( cm != null ) if ( cm != null )
cm.readFromNBT( compound ); cm.readFromNBT( compound );
} }
@ -312,7 +312,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
pHost.setPriority( compound.getInteger( "priority" ) ); pHost.setPriority( compound.getInteger( "priority" ) );
} }
IInventory inv = ((ISegmentedInventory) this).getInventoryByName( "config" ); IInventory inv = this.getInventoryByName( "config" );
if ( inv != null && inv instanceof AppEngInternalAEInventory ) if ( inv != null && inv instanceof AppEngInternalAEInventory )
{ {
AppEngInternalAEInventory target = (AppEngInternalAEInventory) inv; AppEngInternalAEInventory target = (AppEngInternalAEInventory) inv;
@ -343,7 +343,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
output.setInteger( "priority", pHost.getPriority() ); output.setInteger( "priority", pHost.getPriority() );
} }
IInventory inv = ((ISegmentedInventory) this).getInventoryByName( "config" ); IInventory inv = this.getInventoryByName( "config" );
if ( inv != null && inv instanceof AppEngInternalAEInventory ) if ( inv != null && inv instanceof AppEngInternalAEInventory )
{ {
((AppEngInternalAEInventory) inv).writeToNBT( output, "config" ); ((AppEngInternalAEInventory) inv).writeToNBT( output, "config" );

View file

@ -96,7 +96,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable
ItemSpatialStorageCell sc = (ItemSpatialStorageCell) cell.getItem(); ItemSpatialStorageCell sc = (ItemSpatialStorageCell) cell.getItem();
SpatialPylonCache spc = (SpatialPylonCache) gi.getCache( ISpatialCache.class ); SpatialPylonCache spc = gi.getCache( ISpatialCache.class );
if ( spc.hasRegion() && spc.isValidRegion() ) if ( spc.hasRegion() && spc.isValidRegion() )
{ {
double req = spc.requiredPower(); double req = spc.requiredPower();

View file

@ -856,7 +856,7 @@ public class Platform
if ( willAdd == null ) if ( willAdd == null )
return false; return false;
IAETagCompound tag = willAdd.getTagCompound(); IAETagCompound tag = willAdd.getTagCompound();
if ( tag != null && ((AESharedNBT) tag).getSpecialComparison() != null ) if ( tag != null && tag.getSpecialComparison() != null )
return true; return true;
return false; return false;
} }
@ -1548,7 +1548,7 @@ public class Platform
if ( grid == null ) if ( grid == null )
return false; return false;
IEnergyGrid eg = (IEnergyGrid) grid.getCache( IEnergyGrid.class ); IEnergyGrid eg = grid.getCache( IEnergyGrid.class );
return eg.isNetworkPowered(); return eg.isNetworkPowered();
} }
@ -1557,7 +1557,7 @@ public class Platform
if ( grid == null ) if ( grid == null )
return false; return false;
ISecurityGrid gs = (ISecurityGrid) grid.getCache( ISecurityGrid.class ); ISecurityGrid gs = grid.getCache( ISecurityGrid.class );
if ( gs == null ) if ( gs == null )
return false; return false;

View file

@ -119,7 +119,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
if ( st != null ) if ( st != null )
{ {
// st.setPriority( currentPriority ); // st.setPriority( currentPriority );
((IAEItemStack) st).setCountRequestable( ((IAEItemStack) st).getCountRequestable() + ((IAEItemStack) option).getCountRequestable() ); ((IAEItemStack) st).setCountRequestable( st.getCountRequestable() + option.getCountRequestable() );
return; return;
} }