Recreating Tool Right Click Procedures (Shovel / Flint and Steel)

Started by Cassandra on

Topic category: Help with modding (Java Edition)

Last seen on 04:40, 11. Mar 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Recreating Tool Right Click Procedures (Shovel / Flint and Steel)

Hello! I've been making some tools but I've become stuck on trying to give them the ability to make a path by right clicking (like a vanilla shovel) or a fire on right clicking (like a vanilla flint and steel). 

If anyone could tell me how to make the procedures for those effects I would really appreciate it!

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on right clicked on block…
Sat, 03/07/2020 - 07:45

on right clicked on block procedure trigger:

if(get block at x y z = *insert block*){

//something happens

}

I could elaborate more if you have more specific needs

Last seen on 04:40, 11. Mar 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! I have been able…
Sun, 03/08/2020 - 01:04

Thank you! I have been able to it to create fires but it replaces the block I click on with a fire block.
I'm a bit stuck with how to get it to check the space above the block I click on is empty and then create a fire there.

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if(get block at x y+1 z=air)…
Sun, 03/08/2020 - 01:48

if(get block at x y+1 z=air){

placeblock(x,y+1,z,fire)

}