@Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand) { return super.onItemRightClick(worldIn, playerIn, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer player, EnumHand hand) { player.setActiveHand(hand); return super.onItemRightClick(itemStack, world, player, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer player, EnumHand hand) { player.setActiveHand(hand); return super.onItemRightClick(itemStack, world, player, hand); }
@Override public @Nonnull ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { ItemStack stack = player.getHeldItem(hand); if (printCoords(stack, world, player)) { player.swingArm(hand); } return super.onItemRightClick(world, player, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { final ItemStack itemStack = playerIn.getHeldItem(handIn); openGuiOnRightClick(itemStack, worldIn, playerIn); return super.onItemRightClick(worldIn, playerIn, handIn); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObject.itemPowerItemFilter.openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObject.itemFluidFilter.openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ForestryIntegrationObject.itemSpeciesItemFilter.openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObject.itemBasicItemFilter.openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObject.itemModItemFilter.openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World worldIn, @Nonnull EntityPlayer playerIn, @Nonnull EnumHand handIn) { if (!worldIn.isRemote && playerIn.isSneaking()) { ModObject.itemExistingItemFilter.openGui(worldIn, playerIn.getPosition(), playerIn, null, handIn.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, playerIn.getHeldItem(handIn)); } return super.onItemRightClick(worldIn, playerIn, handIn); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObjectRegistry.getModObjectNN(this).openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override @Nonnull public ActionResult<ItemStack> onItemRightClick(@Nonnull World world, @Nonnull EntityPlayer player, @Nonnull EnumHand hand) { if (!world.isRemote && player.isSneaking()) { ModObjectRegistry.getModObjectNN(this).openGui(world, player.getPosition(), player, null, hand.ordinal()); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return super.onItemRightClick(world, player, hand); }
@Override public @Nonnull ActionResult<ItemStack> onItemRightClick(@Nonnull World worldIn, @Nonnull EntityPlayer playerIn, @Nonnull EnumHand handIn) { final ItemStack stack = playerIn.getHeldItem(handIn); if (EnergyUpgradeManager.loadFromItem(stack) != null) { if (!worldIn.isRemote) { NbtValue.ENABLED.setBoolean(stack, !NbtValue.ENABLED.getBoolean(stack)); playerIn.sendStatusMessage((NbtValue.ENABLED.getBoolean(stack) ? Lang.INVCHARGER_ENABLED : Lang.INVCHARGER_DISABLED).toChatServer(), true); } return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack); } return super.onItemRightClick(worldIn, playerIn, handIn); }
@Override @ParametersAreNonnullByDefault public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand) { ItemStack itemStackIn = playerIn.getHeldItem(hand); if (!itemStackIn.isEmpty() && itemStackIn.getItemDamage() == 2 && playerIn.isSneaking() && itemStackIn.hasTagCompound()) { //noinspection ConstantConditions Set<String> keySet = itemStackIn.getTagCompound().getKeySet(); keySet.clear(); } return super.onItemRightClick(worldIn, playerIn, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if (!world.isRemote) { ItemStack itemStack = player.getHeldItem(hand); if (isEmpty(itemStack)) { populate(itemStack, player.inventory); } else { depopulate(itemStack, player.inventory); } return ActionResult.newResult(EnumActionResult.SUCCESS, itemStack); } return super.onItemRightClick(world, player, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if(!world.isRemote) { ItemStack heldItem = player.getHeldItem(hand); if(player.isSneaking()) { heldItem.clearCustomName(); heldItem.setTagCompound(null); return new ActionResult<>(EnumActionResult.SUCCESS, heldItem); } } return super.onItemRightClick(world, player, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { ItemStack stack = player.getHeldItem(hand); if (world.isRemote) return super.onItemRightClick(world, player, hand); stack = NBTHelper.checkNBT(stack); RayTraceResult rayTrace = rayTrace(world, player, false); if (rayTrace == null || rayTrace.typeOfHit == RayTraceResult.Type.MISS || rayTrace.typeOfHit == RayTraceResult.Type.ENTITY) { if (stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) >= AltarTier.MAXTIERS - 1) stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, 0); else stack.getTagCompound().setInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER, stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1); currentDisplayedTier = AltarTier.values()[stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER)]; player.sendStatusMessage(new TextComponentTranslation("chat.bloodmagic.altarMaker.setTier", NumeralHelper.toRoman(stack.getTagCompound().getInteger(Constants.NBT.ALTARMAKER_CURRENT_TIER) + 1)), true); return super.onItemRightClick(world, player, hand); } return super.onItemRightClick(world, player, hand); }
@Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { ItemStack stack = player.getHeldItem(hand); if (PlayerHelper.isFakePlayer(player)) return ActionResult.newResult(EnumActionResult.FAIL, stack); int currentSlot = getCurrentItemOrdinal(stack); List<ItemStack> inv = getInternalInventory(stack); ItemStack itemUsing = inv.get(currentSlot); if (itemUsing.isEmpty() || ((IBindable) itemUsing.getItem()).getBinding(itemUsing) == null) return ActionResult.newResult(EnumActionResult.PASS, stack); itemUsing.getItem().onItemRightClick(world, player, hand); saveInventory(stack, inv); return ActionResult.newResult(EnumActionResult.PASS, stack); }
@Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { TileAltar altar = (TileAltar) world.getTileEntity(pos); if (altar == null || player.isSneaking()) return false; ItemStack playerItem = player.getHeldItem(hand); if (playerItem.getItem() instanceof IAltarReader || playerItem.getItem() instanceof IAltarManipulator) { playerItem.getItem().onItemRightClick(world, player, hand); return true; } if (Utils.insertItemToTile(altar, player)) altar.startCycle(); else altar.setActive(); world.notifyBlockUpdate(pos, state, state, 3); return true; }