use of net.mcft.copy.betterstorage.container.ContainerKeyring in project BetterStorage by copygirl.
the class ItemKeyring method onItemRightClick.
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (world.isRemote || !player.isSneaking())
return stack;
String title = StackUtils.get(stack, "", "display", "Name");
int protectedSlot = player.inventory.currentItem;
Container container = new ContainerKeyring(player, title, protectedSlot);
PlayerUtils.openGui(player, Constants.containerKeyring, protectedSlot, 1, title, container);
return stack;
}
Aggregations