mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
32 lines
741 B
Java
32 lines
741 B
Java
package magicbees.client.gui;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import forestry.api.apiculture.IHiveFrame;
|
|
|
|
public class SlotFrame extends SlotCustomItems {
|
|
|
|
public SlotFrame(IInventory inventory, int slotIndex, int xPos, int yPos) {
|
|
super(inventory, slotIndex, xPos, yPos);
|
|
}
|
|
|
|
@Override
|
|
public boolean isItemValid(ItemStack itemStack) {
|
|
if (itemStack == null) {
|
|
return false;
|
|
}
|
|
if (!inventory.isItemValidForSlot(getSlotIndex(), itemStack)) {
|
|
return false;
|
|
}
|
|
|
|
boolean flag = false;
|
|
|
|
if (itemStack.getItem() instanceof IHiveFrame) {
|
|
flag = true;
|
|
}
|
|
|
|
return flag;
|
|
}
|
|
}
|