Finished the gui, and start work on adding support for the furnace.
This commit is contained in:
parent
7541ba4dbb
commit
d9af8309b1
8 changed files with 167 additions and 27 deletions
|
@ -107,7 +107,7 @@ public class BuiltContainer extends Container {
|
|||
|
||||
@Override
|
||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
||||
if(slotId > 0 && slotId < 1000){
|
||||
if(dragType == 1 && slotId > 0 && slotId < 1000){
|
||||
Slot slot = this.inventorySlots.get(slotId);
|
||||
if(slot instanceof IRightClickHandler){
|
||||
if(((IRightClickHandler) slot).handleRightClick(slot.getSlotIndex(), player, this)){
|
||||
|
|
|
@ -68,7 +68,7 @@ public class UpgradeSlot extends Slot implements IRightClickHandler {
|
|||
ItemStack stack = upgradeable.getUpgradeInvetory().getStackInSlot(slotID);
|
||||
if(!stack.isEmpty() && stack.getItem() instanceof IUpgrade){
|
||||
//Called on both sides :)
|
||||
((IUpgrade) stack.getItem()).handleRightClick(tileEntity, stack, container);
|
||||
((IUpgrade) stack.getItem()).handleRightClick(tileEntity, stack, container, slotID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue