What would be more optimized?

Started by woodcraft on

Topic category: Help with Minecraft modding (Java Edition)

Last seen on 13:11, 24. Oct 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What would be more optimized?

I'm making a class mod and I want each class to have their own passives, would it be more optimized to run each class on tick individually or though another one?


Example 1:
MageClass: on tick


BruiserClass: on tick


Example 2:

ClassClass on tick

    If class = 1
        call MageClass

    else If class = 2
        call BruiserClass


What would be better?

Last seen on 13:37, 24. Oct 2024
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Performance wise it'd…
Thu, 10/24/2024 - 13:32

Performance wise it'd probably be about the same, but organization wise 1. is clearly superior