diff --git a/src/api/java/appeng/api/implementations/items/IStorageCell.java b/src/api/java/appeng/api/implementations/items/IStorageCell.java index 6ea4ec177..e5eff24d1 100644 --- a/src/api/java/appeng/api/implementations/items/IStorageCell.java +++ b/src/api/java/appeng/api/implementations/items/IStorageCell.java @@ -52,18 +52,6 @@ public interface IStorageCell extends ICellWorkbenchItem */ int getBytes( ItemStack cellItem ); - /** - * Determines the number of bytes used for any type included on the cell. - * - * @param cellItem item - * - * @return number of bytes - * - * @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)} - */ - @Deprecated - int BytePerType( ItemStack cellItem ); - /** * Determines the number of bytes used for any type included on the cell. * diff --git a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java index df0cc6a14..4df7d7a42 100644 --- a/src/main/java/appeng/items/storage/ItemBasicStorageCell.java +++ b/src/main/java/appeng/items/storage/ItemBasicStorageCell.java @@ -23,6 +23,8 @@ import java.util.EnumSet; import java.util.List; import java.util.Set; +import com.google.common.base.Optional; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; @@ -30,6 +32,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; + import appeng.api.AEApi; import appeng.api.config.FuzzyMode; import appeng.api.config.IncludeExclude; @@ -53,8 +56,6 @@ import appeng.items.materials.MaterialType; import appeng.util.InventoryAdaptor; import appeng.util.Platform; -import com.google.common.base.Optional; - public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, IItemGroup { @@ -135,12 +136,6 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe return this.totalBytes; } - @Override - public int BytePerType( ItemStack cell ) - { - return this.perType; - } - @Override public int getBytesPerType( ItemStack cellItem ) { diff --git a/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java b/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java index 656d9c096..7480bc3c6 100644 --- a/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java +++ b/src/main/java/appeng/items/tools/powered/ToolColorApplicator.java @@ -28,6 +28,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import com.google.common.base.Optional; + import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.block.BlockDispenser; @@ -47,6 +49,7 @@ import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.oredict.OreDictionary; + import appeng.api.AEApi; import appeng.api.config.Actionable; import appeng.api.config.FuzzyMode; @@ -81,8 +84,6 @@ import appeng.util.ItemSorters; import appeng.util.Platform; import appeng.util.item.AEItemStack; -import com.google.common.base.Optional; - public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCell, IItemGroup, IBlockTool, IMouseWheelItem { @@ -463,12 +464,6 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe return 512; } - @Override - public int BytePerType( ItemStack cell ) - { - return 8; - } - @Override public int getBytesPerType( ItemStack cellItem ) { diff --git a/src/main/java/appeng/items/tools/powered/ToolMassCannon.java b/src/main/java/appeng/items/tools/powered/ToolMassCannon.java index c99c3198f..47cfe22a8 100644 --- a/src/main/java/appeng/items/tools/powered/ToolMassCannon.java +++ b/src/main/java/appeng/items/tools/powered/ToolMassCannon.java @@ -22,6 +22,8 @@ package appeng.items.tools.powered; import java.util.EnumSet; import java.util.List; +import com.google.common.base.Optional; + import net.minecraft.block.Block; import net.minecraft.block.BlockDispenser; import net.minecraft.entity.Entity; @@ -36,11 +38,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.util.Vec3; import net.minecraft.world.World; + import appeng.api.AEApi; import appeng.api.config.Actionable; import appeng.api.config.FuzzyMode; @@ -76,8 +78,6 @@ import appeng.tile.misc.TilePaint; import appeng.util.LookDirection; import appeng.util.Platform; -import com.google.common.base.Optional; - public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell { @@ -482,12 +482,6 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell return 512; } - @Override - public int BytePerType( ItemStack cell ) - { - return 8; - } - @Override public int getBytesPerType( ItemStack cellItem ) { diff --git a/src/main/java/appeng/items/tools/powered/ToolPortableCell.java b/src/main/java/appeng/items/tools/powered/ToolPortableCell.java index bddf9a291..ab542c5dc 100644 --- a/src/main/java/appeng/items/tools/powered/ToolPortableCell.java +++ b/src/main/java/appeng/items/tools/powered/ToolPortableCell.java @@ -23,6 +23,8 @@ import java.util.EnumSet; import java.util.List; import java.util.Set; +import com.google.common.base.Optional; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -30,6 +32,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; + import appeng.api.AEApi; import appeng.api.config.FuzzyMode; import appeng.api.implementations.guiobjects.IGuiItem; @@ -53,8 +56,6 @@ import appeng.items.tools.powered.powersink.AEBasePoweredItem; import appeng.me.storage.CellInventoryHandler; import appeng.util.Platform; -import com.google.common.base.Optional; - public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, IGuiItem, IItemGroup { @@ -102,12 +103,6 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell, return 512; } - @Override - public int BytePerType( ItemStack cell ) - { - return 8; - } - @Override public int getBytesPerType( ItemStack cellItem ) { diff --git a/src/main/java/appeng/me/storage/CellInventory.java b/src/main/java/appeng/me/storage/CellInventory.java index f32299a59..407c87517 100644 --- a/src/main/java/appeng/me/storage/CellInventory.java +++ b/src/main/java/appeng/me/storage/CellInventory.java @@ -65,7 +65,7 @@ public class CellInventory implements ICellInventory protected int storedItemCount = 0; protected IItemList cellItems; protected ItemStack i; - protected IStorageCell CellType; + protected IStorageCell cellType; protected CellInventory( NBTTagCompound data, ISaveProvider container ) { @@ -92,22 +92,22 @@ public class CellInventory implements ICellInventory throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" ); } - this.CellType = null; + this.cellType = null; this.i = o; Item type = this.i.getItem(); if( type instanceof IStorageCell ) { - this.CellType = (IStorageCell) this.i.getItem(); - this.maxItemTypes = this.CellType.getTotalTypes( this.i ); + this.cellType = (IStorageCell) this.i.getItem(); + this.maxItemTypes = this.cellType.getTotalTypes( this.i ); } - if( this.CellType == null ) + if( this.cellType == null ) { throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" ); } - if( !this.CellType.isStorageCell( this.i ) ) + if( !this.cellType.isStorageCell( this.i ) ) { throw new AppEngException( "ItemStack was used as a cell, but was not a cell!" ); } @@ -210,7 +210,7 @@ public class CellInventory implements ICellInventory return null; } - if( isBlackListed( input ) || this.CellType.isBlackListed( this.i, input ) ) + if( isBlackListed( input ) || this.cellType.isBlackListed( this.i, input ) ) { return input; } @@ -484,31 +484,31 @@ public class CellInventory implements ICellInventory @Override public double getIdleDrain() { - return this.CellType.getIdleDrain(); + return this.cellType.getIdleDrain(); } @Override public FuzzyMode getFuzzyMode() { - return this.CellType.getFuzzyMode( this.i ); + return this.cellType.getFuzzyMode( this.i ); } @Override public IInventory getConfigInventory() { - return this.CellType.getConfigInventory( this.i ); + return this.cellType.getConfigInventory( this.i ); } @Override public IInventory getUpgradesInventory() { - return this.CellType.getUpgradesInventory( this.i ); + return this.cellType.getUpgradesInventory( this.i ); } @Override public int getBytesPerType() { - return this.CellType.BytePerType( this.i ); + return this.cellType.getBytesPerType( this.i ); } @Override @@ -521,7 +521,7 @@ public class CellInventory implements ICellInventory @Override public long getTotalBytes() { - return this.CellType.getBytes( this.i ); + return this.cellType.getBytes( this.i ); } @Override