blob: b50b679665c391aa9b41c9dc6b666b52da3184a4 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
package gtPlusPlus.core.slots;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import gregtech.api.enums.ItemList;
import ic2.core.Ic2Items;
public class SlotFuelRod extends Slot {
public SlotFuelRod(final IInventory inventory, final int index, final int x, final int y) {
super(inventory, index, x, y);
}
@Override
public boolean isItemValid(final ItemStack itemstack) {
boolean returnValue = false;
// Uranium Rods
if (itemstack.getItem() == Ic2Items.reactorUraniumSimple.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == Ic2Items.reactorUraniumDual.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == Ic2Items.reactorUraniumQuad.getItem()) {
returnValue = true;
}
// Mox Rods
if (itemstack.getItem() == Ic2Items.reactorMOXSimple.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == Ic2Items.reactorMOXDual.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == Ic2Items.reactorMOXQuad.getItem()) {
returnValue = true;
}
// Thorium Rods
if (itemstack.getItem() == ItemList.ThoriumCell_1.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == ItemList.ThoriumCell_2.getItem()) {
returnValue = true;
} else if (itemstack.getItem() == ItemList.ThoriumCell_4.getItem()) {
returnValue = true;
}
return returnValue;
}
@Override
public int getSlotStackLimit() {
return 1;
}
}
|