Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. @EventHandler
  2. private Listener<RenderHudEvent> listener = new Listener<RenderHudEvent>(e->{}); // do stuff here
  3. @EventHandler
  4. private Listener<RenderHudEvent> listener = new Listener<RenderHudEvent>(e->{}); // do other stuff here, this event would be in another class
  5. /*
  6. both of these fire on the same frame, so instead of doing new ScaledResolution(mc) in both of these event handlers - that would create an unnecessary instance - just create a ScaledResolution in the constructor of RenderHudEvent and add a getter for it. This would make it so that instead of being instantiated twice, the ScaledResolution is only instantiated once, which very slightly improves performance because the calculations in the ScaledRes constructor don't have to be redundantly performed
  7. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement