More tweaks to the alchemy table, as well as some minor recipes.

This commit is contained in:
WayofTime 2016-05-02 20:08:25 -04:00
parent ce385bd9a6
commit c80b083865
8 changed files with 115 additions and 22 deletions

View file

@ -2,6 +2,7 @@ package WayofTime.bloodmagic.tile.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
@ -40,6 +41,23 @@ public class ContainerAlchemyTable extends Container
}
}
@Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player)
{
InventoryPlayer inventoryPlayer = player.inventory;
if (slotId < 6 && slotId >= 0)
{
Slot slot = this.getSlot(slotId);
if (!slot.getHasStack() && inventoryPlayer.getItemStack() == null)
{
((TileAlchemyTable) tileTable).toggleInputSlotAccessible(slotId);
}
}
return super.slotClick(slotId, dragType, clickTypeIn, player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
{