Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void removeItem(EntityPlayer player, ItemStack is, int amount) {
- if(is == null)
- return;
- int removed = 0;
- for(ItemStack stack : player.inventory.mainInventory) {
- if(stack != null && removed <= is.stackSize) {
- if(areItemStacksEqual(stack, is)) {
- stack.stackSize--;
- removed++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement