Removed redundant function from backpack API. All checks for item validity now use IBackpackDefinition.isItemValid() resulting in more consistent behaivor.

This commit is contained in:
CovertJaguar committed 2014-08-12 03:47:28 -07:00
1 parent 38ed2fec51
commit 54146d29b9
6 files changed
+19 -25

No files matched your search

@@ -10,7 +10,6 @@
******************************************************************************/
package forestry.storage.items;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
@@ -190,7 +189,7 @@ public class ItemBackpack extends ItemInventoried {
if (targetStack == null)
continue;
if(!info.isValidItem(player, targetStack))
if (!info.isValidItem(player, targetStack))
continue;
ItemStack remaining = InvTools.moveItemStack(targetStack, backpackInventory);
@@ -215,15 +214,11 @@ public class ItemBackpack extends ItemInventoried {
return stack.getItem() == this;
}
public Collection<ItemStack> getValidItems(EntityPlayer player) {
return info.getValidItems(player);
}
public int getBackpackSize() {
return getSlotsForType(type);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
ItemInventory inventory = new ItemInventory(ItemBackpack.class, getBackpackSize(), itemstack);
@@ -4,14 +4,12 @@
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.storage.items;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -56,9 +54,4 @@ public class ItemNaturalistBackpack extends ItemBackpack {
public void openGui(EntityPlayer player, ItemStack itemstack) {
player.openGui(ForestryAPI.instance, guiId, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
}
@Override
public ArrayList<ItemStack> getValidItems(EntityPlayer player) {
return null;
}
}