Deleted unnecessary casts with Eclipse
This commit is contained in:
@@ -157,7 +157,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
* if ( FluidName != null && FluidName instanceof NBTTagString ) ((NBTTagString) FluidName).data = (String)
|
||||
* this.fluid.getName(); else
|
||||
*/
|
||||
i.setString( "FluidName", (String) this.fluid.getName() );
|
||||
i.setString( "FluidName", this.fluid.getName() );
|
||||
|
||||
/*
|
||||
* if ( Count != null && Count instanceof NBTTagByte ) ((NBTTagByte) Count).data = (byte) 0; else
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.List;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -81,7 +80,7 @@ public class AEItemDef
|
||||
return true;
|
||||
|
||||
if ( tagCompound != null && otherStack.hasTagCompound() )
|
||||
return Platform.NBTEqualityTest( (NBTBase) tagCompound, otherStack.getTagCompound() );
|
||||
return Platform.NBTEqualityTest( tagCompound, otherStack.getTagCompound() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
|
||||
if ( is.getItem() == def.item && is.getItemDamage() == this.def.damageValue )
|
||||
{
|
||||
NBTTagCompound ta = (NBTTagCompound) def.tagCompound;
|
||||
NBTTagCompound ta = def.tagCompound;
|
||||
NBTTagCompound tb = is.getTagCompound();
|
||||
if ( ta == tb )
|
||||
return true;
|
||||
@@ -203,7 +203,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
i.setShort( "Damage", (short) this.def.damageValue );
|
||||
|
||||
if ( def.tagCompound != null )
|
||||
i.setTag( "tag", (NBTTagCompound) def.tagCompound );
|
||||
i.setTag( "tag", def.tagCompound );
|
||||
else
|
||||
i.removeTag( "tag" );
|
||||
|
||||
|
||||
@@ -95,11 +95,11 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
void putPacketValue(ByteBuf tag, long num) throws IOException
|
||||
{
|
||||
if ( num <= 255 )
|
||||
tag.writeByte( (byte) (num + (long) Byte.MIN_VALUE) );
|
||||
tag.writeByte( (byte) (num + Byte.MIN_VALUE) );
|
||||
else if ( num <= 65535 )
|
||||
tag.writeShort( (short) (num + (long) Short.MIN_VALUE) );
|
||||
tag.writeShort( (short) (num + Short.MIN_VALUE) );
|
||||
else if ( num <= 4294967295L )
|
||||
tag.writeInt( (int) (num + (long) Integer.MIN_VALUE) );
|
||||
tag.writeInt( (int) (num + Integer.MIN_VALUE) );
|
||||
else
|
||||
tag.writeLong( num );
|
||||
}
|
||||
@@ -109,19 +109,19 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
if ( type == 0 )
|
||||
{
|
||||
long l = tag.readByte();
|
||||
l -= (long) Byte.MIN_VALUE;
|
||||
l -= Byte.MIN_VALUE;
|
||||
return l;
|
||||
}
|
||||
else if ( type == 1 )
|
||||
{
|
||||
long l = tag.readShort();
|
||||
l -= (long) Short.MIN_VALUE;
|
||||
l -= Short.MIN_VALUE;
|
||||
return l;
|
||||
}
|
||||
else if ( type == 2 )
|
||||
{
|
||||
long l = tag.readInt();
|
||||
l -= (long) Integer.MIN_VALUE;
|
||||
l -= Integer.MIN_VALUE;
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public class OreHelper
|
||||
public boolean sameOre(AEItemStack aeItemStack, IAEItemStack is)
|
||||
{
|
||||
OreReference a = aeItemStack.def.isOre;
|
||||
OreReference b = ((AEItemStack) aeItemStack).def.isOre;
|
||||
OreReference b = aeItemStack.def.isOre;
|
||||
|
||||
if ( a == b )
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user