blob: 99c6eca8df69a4f7606172bf48b3449d5e727889 (
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 gtPlusPlus.core.interfaces.IItemBlueprint;
import gtPlusPlus.core.util.Utils;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class SlotBlueprint extends Slot{
public SlotBlueprint(final IInventory inventory, final int x, final int y, final int z) {
super(inventory, x, y, z);
}
@Override
public boolean isItemValid(final ItemStack itemstack) {
if (itemstack.getItem() instanceof IItemBlueprint){
Utils.LOG_WARNING(itemstack.getDisplayName()+" is a valid Blueprint.");
return true;
}
Utils.LOG_WARNING(itemstack.getDisplayName()+" is not a valid Blueprint.");
return false;
}
@Override
public int getSlotStackLimit() {
return 1;
}
}
|