Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft

Event Wrapper Mod FAQ

10 questions players actually ask, answered.

Do I need to rewrite my entire mod to use Event Wrapper Mod?
No. You only need to add the @EventBusSubscriberWrapper tag to your class and swap your event parameters for their wrapper equivalents (like LivingHealEventWrapper). Your existing method logic stays the same.
Will my mod work on both Forge and Fabric without any changes after I add the wrapper tags?
Yes, that's the main purpose. The mod handles Forge events directly and uses mixins to translate them on Fabric, so the same tagged code runs on both loaders.
What happens if I forget to tag a method with @SubscriberEventWrapper?
The method won't be recognized as an event handler by the wrapper system, so it won't fire on either loader. Make sure every event method has both the class-level @EventBusSubscriberWrapper tag and the method-level @SubscriberEventWrapper tag.
Can I cancel events using Event Wrapper Mod?
Yes. The wrapper event objects support cancellation the same way Forge events do—check your specific wrapper's documentation for the cancel() method or setCanceled() equivalent.
How do I know which wrapper class to use for a specific Forge event?
The wrapper class names follow Forge event names closely (LivingHealEventWrapper for LivingHealEvent, MobEffectEventWrapper for MobEffectEvent). Check the mod's event reference or your IDE's autocomplete when you import the wrapper package.
Does Event Wrapper Mod work with custom events I've created?
No, it only wraps standard Forge events. Custom events need their own cross-loader handling or separate implementations per loader.
Will using this mod slow down my game?
The wrapper layer adds minimal overhead since it's a direct translation of existing event calls. Performance impact should be negligible compared to running separate Forge and Fabric codebases.
Can I mix wrapped and unwrapped event handlers in the same class?
It's not recommended. Keep your event logic in classes tagged with @EventBusSubscriberWrapper to avoid confusion and ensure consistent cross-loader behavior.
What do I do if a wrapper event doesn't have the method or field I need?
Check the wrapper's source or documentation to confirm what's exposed. If a critical feature is missing, you may need to file a report or fall back to loader-specific code for that particular handler.
Do I need to set up mixins myself to use this mod on Fabric?
No. Event Wrapper Mod handles all the mixin setup internally. You just add the tags and the mod manages the Fabric translation automatically.