Changed upgrade slots to SlotUpgrade
This commit is contained in:
parent
3274894625
commit
fb12bfab9e
9 changed files with 61 additions and 32 deletions
21
src/main/java/techreborn/api/SlotUpgrade.java
Normal file
21
src/main/java/techreborn/api/SlotUpgrade.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package techreborn.api;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.upgrade.IMachineUpgrade;
|
||||
|
||||
public class SlotUpgrade extends Slot{
|
||||
|
||||
public SlotUpgrade(IInventory inventoryIn, int index, int xPosition, int yPosition) {
|
||||
super(inventoryIn, index, xPosition, yPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
if(stack.getItem() instanceof IMachineUpgrade){
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue