OSDN Git Service

パッケージ変更
[chemicraft/ChemiCraftNext.git] / src / asia / tcrs / ccnp / chemicraftnext / core / slot / SlotPyrolysisTableFuel.java
1 package asia.tcrs.ccnp.chemicraftnext.core.slot;
2
3 import java.util.Iterator;
4
5 import asia.tcrs.ccnp.chemicraftnext.core.ChemiCraftAPI;
6
7 import net.minecraft.inventory.IInventory;
8 import net.minecraft.inventory.Slot;
9 import net.minecraft.item.ItemStack;
10
11 public class SlotPyrolysisTableFuel extends Slot {
12
13         public SlotPyrolysisTableFuel(IInventory par1IInventory, int par2, int par3, int par4) {
14                 super(par1IInventory, par2, par3, par4);
15         }
16
17         @Override
18         public boolean isItemValid(ItemStack par1ItemStack) {
19                 Iterator<ItemStack> itFuel = ChemiCraftAPI.getPyrolysisFuelList().keySet().iterator();
20                 while (itFuel.hasNext()) {
21                         ItemStack fuel = itFuel.next();
22                         if (par1ItemStack != null && par1ItemStack.itemID == fuel.itemID) {
23                                 return true;
24                         }
25                 }
26                 return false;
27         }
28
29 }