Started by
Trinicrafter10
on
Topic category: Help with Minecraft modding (Java Edition)
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?
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