Closed dark-steveneq closed 6 months ago
The overarching change across multiple files involves adding conditional checks to ensure that items are only added to the COOKING_QUEUE
when the execution context is on the client side. This adjustment affects various equipment and weapon-related classes, ensuring that certain operations are client-specific, thereby likely aiming to optimize network performance and gameplay experience.
Files | Change Summary |
---|---|
.../carryable/ItemBackpack.java , .../carryable/ItemBelt.java |
Conditional check added to ensure items are added to COOKING_QUEUE only on the client side. |
.../weaponlib/AttachmentBuilder.java , .../weaponlib/CustomArmor.java , .../weaponlib/ItemVest.java , .../weaponlib/Weapon.java |
Updated logic to add items or attachments to COOKING_QUEUE based on client-side execution context. This includes using FMLCommonHandler for determining the execution side in CustomArmor.java . |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
๐ Description
This is basically my previous pull request but done right.
๐ฏ Goals
Make dedicated servers not crash during
preinit
by not calling client-only methods that caused the crash on dedicated servers.โ Non Goals
Make it a dirty hack
๐ฆ Testing
Start a server. If it crashes then something's still wrong
โฎ๏ธ Backwards Compatibility
Everything should be fine
๐ Related Issues & Documents
Removed @SideOnly() from ClientEventHandler.java to prevent crashing โฆ #414
๐ผ๏ธ Screenshots/Recordings
๐ Added to documentation?
๐ [optional] What gif best describes this PR or how it makes you feel?
Summary by CodeRabbit