blob: bb82a28936a3414fb74c9ce736d5158e1b212181 (
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
26
27
28
29
30
|
package gtPlusPlus.core.slots;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.minecraft.FoodUtils;
public class SlotLunchBox extends SlotGtTool {
public SlotLunchBox(final IInventory base, final int x, final int y, final int z) {
super(base, x, y, z);
}
@Override
public boolean isItemValid(final ItemStack itemstack) {
return isItemValid_STATIC(itemstack);
}
public static boolean isItemValid_STATIC(final ItemStack itemstack) {
if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) {
Logger.WARNING(itemstack.getDisplayName() + " is a valid food.");
return true;
}
Logger.WARNING(itemstack.getDisplayName() + " is not a valid food.");
return false;
}
}
|