Can I make an item that can replace a specific block type?

Started by CookUpAStorm on

Topic category: Help with modding (Java Edition)

Last seen on 09:48, 24. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I make an item that can replace a specific block type?

I have been working on a mod where you use a paintbrush item to colour different blocks. I have found a working procedure that replaces a block with a coloured block while right clicking with the paintbrush item. However, this applies to every block in the game. Is there a possible way to make this block specific so it only works on certain types of blocks? If any knows a solution, please reply. Thanks :) 

 

Last seen on 16:47, 29. Oct 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use this procedure to test…
Mon, 07/27/2020 - 15:54

Use this procedure to test for the right block, and then replace it with the block you want:

Block Procedure

(The image may only open if you click on it)

Last seen on 09:48, 24. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The image doesn't seem to be…
Mon, 07/27/2020 - 15:58

The image doesn't seem to be working for me. 

Last seen on 09:48, 24. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
don't worry i got it to work…
Mon, 07/27/2020 - 16:32

don't worry i got it to work :)

Last seen on 09:48, 24. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! This works a…
Mon, 07/27/2020 - 16:37

Thank you! This works a treat :)