MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[unanswered] making new materials and tools

3 posters

Page 2 of 2 Previous  1, 2

Go down

[unanswered] making new materials and tools - Page 2 Empty [unanswered] making new materials and tools

Post by ikke009 Fri Oct 28, 2011 3:33 pm

First topic message reminder :

So here is what i am trying to do for my mod:
I made a new block, emerald block, and i want to create a new tool, which is not a pickaxe or shovel but a new tool called a chisel. if you use the chisel on the emerald block how you would normally use a pickaxe on a coal ore, you get an emerald crystal.
So if anyone can explain to me how to do this, it will be greatly appreciated Smile
ikke009
ikke009
Member

Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands

Back to top Go down


[unanswered] making new materials and tools - Page 2 Empty Re: [unanswered] making new materials and tools

Post by ikke009 Thu Nov 03, 2011 6:23 pm

Code:

public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
  {
      if(!world.multiplayerWorld && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Block.dirt.blockID)
//blockID can be changed to shiftedIndex for items
      {
          dropBlockAsItem_do(world, i, j, k, new ItemStack(mod_MODSNAMEHERE.BLOCKSNAMEHERE.blockID, 1, l & 3));
      } else
      {
          super.harvestBlock(world, entityplayer, i, j, k, l);
      }
  }
ikke009
ikke009
Member

Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands

Back to top Go down

[unanswered] making new materials and tools - Page 2 Empty Re: [unanswered] making new materials and tools

Post by jesshankin22 Fri Nov 04, 2011 12:04 am

Damn, i almost had it... but this does look interesting, maybe ill use something like it in my mod

jesshankin22
Member

Posts : 47
Join date : 2011-10-24

Back to top Go down

[unanswered] making new materials and tools - Page 2 Empty Re: [unanswered] making new materials and tools

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum