blob: 099e65bdd2585c846845d261bfadaffd7d4cc2de (
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
|
package jp.plusplus.fbs.pottery.usable.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
/**
* Created by plusplus_F on 2016/03/30.
*/
public class SlotPotteryUsable extends Slot {
protected InventoryPotteryUsable inventoryPottery;
public SlotPotteryUsable(InventoryPotteryUsable iInventory, int index, int x, int y) {
super(iInventory, index, x, y);
inventoryPottery=iInventory;
}
@Override
public boolean isItemValid(ItemStack itemStack) {
return inventoryPottery.potteryEffect.isItemValid(inventoryPottery.player, inventoryPottery.potteryStack, getSlotIndex(), itemStack);
}
@Override
public boolean canTakeStack(EntityPlayer player) {
return inventoryPottery.potteryEffect.canTakeStack(player, inventoryPottery.potteryStack, getSlotIndex(), getStack());
}
}
|