How to copy code blocks in the editor?

Started by Trinicrafter10 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to copy code blocks in the editor?

I'm making a gun mod, and each gun mostly reuses the same code for reloading, it's all essentially: "if magazine is in inventory, change empty gun to loaded gun item and remove mag from inventory" - The problem is, it takes quite a while to put these code blocks together and define the items for each one. It would be much easier if I could just copy the base code blocks and then change the items that need to be swapped, change the reload time etc. Is there a way I can copy the entire "If, else if" segment and all the code within it from one item's code section to another?

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it is possible, place your…
Mon, 08/21/2023 - 15:56

it is possible, place your mouse on the condition block you want to duplicate (the one with all the code in it), then, right click it, and press "duplicate", you can do the same with mod elements, i hope this helps