Finished the gui, and start work on adding support for the furnace.

This commit is contained in:
modmuss50 2017-04-12 18:04:10 +01:00
parent 7541ba4dbb
commit d9af8309b1
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
8 changed files with 167 additions and 27 deletions

View file

@ -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)){

View file

@ -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);
}
}
}