Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

zacco

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by zacco

  1. Hi. I'm trying to make my first mod. 

    On my mod, when I right click with item A,  I get another item B(ModItems.konpen).

    And I registered metadata of item B.

    Now I want to change to " another random metadata item."

    Please teach me how I can do it.

     

     

    here is current code.

    Spoiler

    @Override
        public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
                player.attackEntityFrom(DamageSource.magic, 4.0F);
                player.getHeldItem(hand).stackSize--;
                player.inventory.addItemStackToInventory(new ItemStack(ModItems.konpen));
            return super.onItemRightClick(stack, world, player, hand);
        }

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.