aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/slots/SlotNoInputLogging.java
blob: 42bc7ce346d85edebf26cebf9eb19ff45bda1f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package gtPlusPlus.core.slots;

import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;

public class SlotNoInputLogging extends SlotNoInput {

	private final int aSlotIndex;
	
	public SlotNoInputLogging(final IInventory inventory, final int index, final int x, final int y) {
		super(inventory, index, x, y);
		aSlotIndex = index;
	}

	@Override
	public boolean isItemValid(final ItemStack itemstack) {
		if (ItemUtils.checkForInvalidItems(itemstack)) {
			Logger.INFO("Tried Inserting "+ItemUtils.getItemName(itemstack)+" into slot "+aSlotIndex);
		}		
		return false;
	}

}