Cubed-Development / Modern-Warfare-Cubed

Welcome to the official GitHub Repository for Modern Warfare Cubed!
Apache License 2.0
93 stars 60 forks source link

Strubiums weaponlib cleanup #504

Closed strubium closed 1 week ago

strubium commented 3 weeks ago

📝 Description

Cleanup the various things that annoy me in weaponlib

🎯 Goals

❌ Non Goals

🚦 Testing

👍

⏮️ Backwards Compatibility

1.12.2

📚 Related Issues & Documents

N/A

📖 Added to documentation?

😄 [optional] What gif best describes this PR or how it makes you feel?

github-actions[bot] commented 3 weeks ago

Qodana for JVM

20869 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 10585
Unnecessary 'this' qualifier 🔶 Warning 2514
Deprecated API usage 🔶 Warning 1493
Auto-boxing 🔶 Warning 731
Lombok @Getter may be used 🔶 Warning 389
Statement with empty body 🔶 Warning 361
Field can be local 🔶 Warning 313
Lombok @Setter may be used 🔶 Warning 143
Unused assignment 🔶 Warning 136
Nullability and data flow problems 🔶 Warning 128
Auto-unboxing 🔶 Warning 126
Non-constant field with upper-case name 🔶 Warning 114
Redundant local variable 🔶 Warning 103
Javadoc declaration problems 🔶 Warning 100
Questionable name 🔶 Warning 79
Constant values 🔶 Warning 62
Call to 'printStackTrace()' 🔶 Warning 38
Declaration has problems in Javadoc references 🔶 Warning 27
Possibly lossy implicit cast in compound assignment 🔶 Warning 27
Result of method call ignored 🔶 Warning 18
Deprecated member is still used 🔶 Warning 14
Dynamic regular expression can be replaced by compiled 'Pattern' 🔶 Warning 13
Link specified as plain text 🔶 Warning 13
Condition is covered by further condition 🔶 Warning 12
Mismatched query and update of collection 🔶 Warning 11
'Set' can be replaced with 'EnumSet' 🔶 Warning 11
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 11
String concatenation as argument to 'StringBuilder.append()' call 🔶 Warning 8
Class is exposed outside of its visibility scope 🔶 Warning 7
'Map' can be replaced with 'EnumMap' 🔶 Warning 7
Octal integer 🔶 Warning 7
Suspicious collection method call 🔶 Warning 7
Vulnerable imported dependency 🔶 Warning 7
Functional expression can be folded 🔶 Warning 6
Unnecessary unary minus 🔶 Warning 6
Unstable API Usage 🔶 Warning 6
Bulk operation can be used instead of iteration 🔶 Warning 6
Catch block may ignore exception 🔶 Warning 5
Variable is assigned to itself 🔶 Warning 5
Stream API call chain can be simplified 🔶 Warning 5
Dangling Javadoc comment 🔶 Warning 4
Inner class may be 'static' 🔶 Warning 4
Integer division in floating-point context 🔶 Warning 4
Copy of existing static method body 🔶 Warning 4
Manual min/max calculation 🔶 Warning 4
AutoCloseable used without 'try'-with-resources 🔶 Warning 3
Mismatched read and write of array 🔶 Warning 3
Value passed as parameter never read 🔶 Warning 3
Method is identical to its super method 🔶 Warning 3
String concatenation in loop 🔶 Warning 3
Local variable used and declared in different 'switch' branches 🔶 Warning 3
Unnecessary 'continue' statement 🔶 Warning 3
'default' not last case in 'switch' 🔶 Warning 2
Duplicate condition 🔶 Warning 2
Call math rounding with 'int' argument 🔶 Warning 2
@NotNull/@Nullable problems 🔶 Warning 2
Redundant type cast 🔶 Warning 2
Redundant operation on empty container 🔶 Warning 2
Redundant usage of unmodifiable collection wrappers 🔶 Warning 2
Method does not call super method 🔶 Warning 2
Call to 'Arrays.asList()' with too few arguments 🔶 Warning 1
Caught exception is immediately rethrown 🔶 Warning 1
Redundant 'Collection.addAll()' call 🔶 Warning 1
'static' method declared 'final' 🔶 Warning 1
Call to 'toString()' on array 🔶 Warning 1
Infinite recursion 🔶 Warning 1
Method name same as class name 🔶 Warning 1
'protected' member in 'final' class 🔶 Warning 1
String comparison using '==', instead of 'equals()' 🔶 Warning 1
'String.equals()' can be replaced with 'String.isEmpty()' 🔶 Warning 1
Suspicious variable/parameter name combination 🔶 Warning 1
Minimum 'switch' branches 🔶 Warning 1
Unused import 🔶 Warning 1
Unary plus 🔶 Warning 1
Constant values ◽️ Notice 1351
Commented out code ◽️ Notice 1007
Duplicated code fragment ◽️ Notice 684
Duplicate branches in 'switch' ◽️ Notice 81
'if' statement with identical branches or common parts ◽️ Notice 9
Method can be extracted ◽️ Notice 7
Multiple occurrences of the same expression ◽️ Notice 4
Non-strict inequality '>=' or '<=' can be replaced with '==' ◽️ Notice 1

☁️ View the detailed Qodana report

Detected 18 dependencies # Third-party software list This page lists the third-party software dependencies used in Modern Warfare Cubed | Dependency | Version | Licenses | |-------------------------------------------------------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------| | [commons-codec](http://commons.apache.org/proper/commons-codec/) | 1.10 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-compress](http://commons.apache.org/proper/commons-compress/) | 1.8.1 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-io](http://commons.apache.org/proper/commons-io/) | 2.5 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-lang3](http://commons.apache.org/proper/commons-lang/) | 3.5 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-logging](http://commons.apache.org/proper/commons-logging/) | 1.1.3 | [Apache-2.0](http://www.apache.org/licenses/) | | groovyscript | 1.2.0-hotfix1 | [MIT](http://opensource.org/licenses/mit-license.php) | | [httpclient](http://hc.apache.org/httpcomponents-client) | 4.3.3 | [Apache-2.0](http://www.apache.org/licenses/) | | [httpcore](http://hc.apache.org/httpcomponents-core-ga) | 4.3.2 | [Apache-2.0](http://www.apache.org/licenses/)
[CC-BY-2.5](http://creativecommons.org/licenses/by/2.5/) | | icu4j-core-mojang | 51.2 | [IBM-ICU](http://source.icu-project.org/repos/icu/icu/trunk/license.html) | | [java-objc-bridge](https://github.com/shannah/Java-Objective-C-Bridge) | 1.0.0 | [Apache-2.0](http://www.apache.org/licenses/) | | jline | 3.5.1 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | | [jopt-simple](http://pholser.github.io/jopt-simple) | 5.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | | log4j-api | 2.17.1 | [Apache-2.0](http://www.apache.org/licenses/) | | log4j-core | 2.17.1 | [Apache-2.0](http://www.apache.org/licenses/) | | lombok | 1.18.32 | BSD-3-CLAUSE-NO-TRADEMARK
[MIT](http://opensource.org/licenses/mit-license.php) | | maven-artifact | 3.5.3 | [Apache-2.0](http://www.apache.org/licenses/) | | plexus-utils | 3.1.0 | [Apache-2.0](http://www.apache.org/licenses/) | | vecmath | 1.5.2 | [GPL-2.0-only](http://www.gnu.org/licenses/gpl-2.0.html)
[ORACLE-OPENJDK-EXCEPTION-2.0](http://openjdk.java.net/legal/gplv2+ce.html) |
Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions
coderabbitai[bot] commented 3 weeks ago

[!WARNING]

Rate limit exceeded

@strubium has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 51 seconds before requesting another review.

⌛ How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.
📥 Commits Reviewing files that changed from the base of the PR and between 4c1da2ab9573e3958f72c54efcd0c57b72593132 and 850b4a658ceac54e9b2d7b46f64e82bbbf4ac22c.
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough ## Walkthrough The pull request introduces significant modifications across multiple classes in the codebase. Key changes include the transition from static initialization methods to a factory pattern for equipment and tile entity creation, enhancements to vehicle interaction handling, and the implementation of generics in the `CustomTileEntityRenderer`. Additionally, several methods have been removed or updated for clarity and maintainability, including changes to logging mechanisms and GUI rendering. Overall, the changes reflect a focus on improving code structure, readability, and flexibility while maintaining existing functionality. ## Changes | File Path | Change Summary | |-----------|----------------| | `src/main/java/com/paneedah/mwc/proxies/CommonProxy.java` | Added import for `TurretBaseFactory`. Modified `preInit` method to instantiate `TurretBaseFactory` and `TileEntities` directly. | | `src/main/java/com/paneedah/mwc/tileentities/TileEntities.java` | Updated class to implement `TileEntityFactory`. Added method `createTileEntity(ModContext modContext)` replacing static `init` method. | | `src/main/java/com/paneedah/mwc/tileentities/TurretBaseFactory.java` | Removed `lootLoad` method. Updated `build` method to use `modContext` directly. | | `src/main/java/com/paneedah/weaponlib/ClientEventHandler.java` | Added `handleVehicleInteraction` method to consolidate vehicle interaction logic. Updated `onRightHandEmpty` and `onLeftHandEmpty` methods. | | `src/main/java/com/paneedah/weaponlib/ClientModContext.java` | Removed `registerServerSideOnly` and `getPlayerItemInstanceRegistry` methods. Updated `preInit` method for command and event handler registration. | | `src/main/java/com/paneedah/weaponlib/WeaponRenderer.java` | Added `GUN_ICON_SHEET` field for gun icon texture management. Updated methods to utilize this field. | | `src/main/java/com/paneedah/weaponlib/animation/AnimationModeProcessor.java` | Modified `onTick()` method to enhance mouse interaction handling and state management. | | `src/main/java/com/paneedah/weaponlib/animation/gui/AnimationGUI.java` | Removed `TEXTURES` variable. Updated constructor without altering core functionality. | | `src/main/java/com/paneedah/weaponlib/animation/gui/Button.java` | Consolidated `x` and `y` variable declarations. Updated `size` variable initialization. | | `src/main/java/com/paneedah/weaponlib/render/GLModelBuilder.java` | Updated Javadoc for `createStaticBuffer` method for clarity. | | `src/main/java/com/paneedah/weaponlib/render/ModificationGUI.java` | Removed `translate` method, replaced with `LangTools.formatName`. Updated parameter name in `getName` method. | | `src/main/java/com/paneedah/weaponlib/render/SpriteSheetTools.java` | Added `getSquareSprite` and `getRectSprite` methods with updated logic for sprite retrieval. | | `src/main/java/com/paneedah/weaponlib/tile/CustomTileEntityRenderer.java` | Updated class to support generics. Modified `render` method to accept a generic type. | | `src/main/java/com/paneedah/weaponlib/tile/LootBoxTileEntity.java` | Added import for `ProjectConstants`. Updated `dropContents` method to use structured logging. | | `src/main/java/com/paneedah/weaponlib/equipment/Armors.java` | Updated class to implement `EquipmentFactory`. Replaced `init` method with `createEquipment`. | | `src/main/java/com/paneedah/weaponlib/equipment/Backpacks.java` | Updated class to implement `EquipmentFactory`. Added `createEquipment` method. | | `src/main/java/com/paneedah/weaponlib/equipment/Belts.java` | Updated class to implement `EquipmentFactory`. Added `createEquipment` method. | | `src/main/java/com/paneedah/weaponlib/equipment/Electronics.java` | Updated class to implement `EquipmentFactory`. Added `createEquipment` method. | | `src/main/java/com/paneedah/weaponlib/equipment/Vests.java` | Updated class to implement `EquipmentFactory`. Added `createEquipment` method. | | `src/main/java/com/paneedah/weaponlib/vehicle/AE86TruenoFactory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/vehicle/ATVFactory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/vehicle/AudiS4Factory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/vehicle/JLTVM1280Factory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/vehicle/McLarenSennaFactory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/vehicle/SampleVehicleFactory.java` | Updated `createVehicle` method to use `modContext`. Added `@Override` annotation. | | `src/main/java/com/paneedah/weaponlib/ItemVest.java` | Updated `build` method to specify "ItemVest name not set" in error handling. | | `src/main/java/com/paneedah/weaponlib/render/ResourceManager.java` | Removed class responsible for managing gun icon textures. | | `src/main/java/com/paneedah/weaponlib/render/modern/RayTraceUtil.java` | Removed empty class. | | `src/main/java/com/paneedah/weaponlib/render/qrender/QBoxer.java` | Removed class for 3D box model representation. | | `src/main/java/com/paneedah/weaponlib/render/qrender/QOven.java` | Removed class with unimplemented method. | | `src/main/java/com/paneedah/weaponlib/render/scopes/Reticle.java` | Updated fields to use Lombok annotations for getters and setters. | | `src/main/java/com/paneedah/weaponlib/vehicle/jimphysics/Transmission.java` | Updated eco shift parameters for `eUShift` and `eDShift`. | | `src/main/java/com/paneedah/mwc/ModernWorldGenerator.java` | Renamed class from `WorldGeneratorEventHandler` to `ModernWorldGenerator`. | | `src/main/java/com/paneedah/mwc/UniversalSoundRegistry.java` | Updated comments for sound registration examples. | | `src/main/java/com/paneedah/mwc/utils/PlayerCreatureWrapper.java` | Added null check for connection parameter in constructor. | ## Sequence Diagram(s) ```mermaid sequenceDiagram participant CommonProxy participant TurretBaseFactory participant TileEntities participant ModContext CommonProxy->>TurretBaseFactory: new TurretBaseFactory().createTileEntity(MWC.modContext) CommonProxy->>TileEntities: new TileEntities().createTileEntity(MWC.modContext) ```

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?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 2 weeks ago

Qodana for JVM

20860 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 10585
Unnecessary 'this' qualifier 🔶 Warning 2515
Deprecated API usage 🔶 Warning 1493
Auto-boxing 🔶 Warning 731
Lombok @Getter may be used 🔶 Warning 386
Statement with empty body 🔶 Warning 361
Field can be local 🔶 Warning 313
Lombok @Setter may be used 🔶 Warning 140
Unused assignment 🔶 Warning 134
Nullability and data flow problems 🔶 Warning 127
Auto-unboxing 🔶 Warning 126
Non-constant field with upper-case name 🔶 Warning 114
Redundant local variable 🔶 Warning 103
Javadoc declaration problems 🔶 Warning 100
Questionable name 🔶 Warning 77
Constant values 🔶 Warning 62
Call to 'printStackTrace()' 🔶 Warning 36
Declaration has problems in Javadoc references 🔶 Warning 27
Possibly lossy implicit cast in compound assignment 🔶 Warning 27
Result of method call ignored 🔶 Warning 18
Deprecated member is still used 🔶 Warning 14
Dynamic regular expression can be replaced by compiled 'Pattern' 🔶 Warning 13
Link specified as plain text 🔶 Warning 13
Condition is covered by further condition 🔶 Warning 12
Mismatched query and update of collection 🔶 Warning 11
'Set' can be replaced with 'EnumSet' 🔶 Warning 11
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 11
String concatenation as argument to 'StringBuilder.append()' call 🔶 Warning 8
Class is exposed outside of its visibility scope 🔶 Warning 7
'Map' can be replaced with 'EnumMap' 🔶 Warning 7
Octal integer 🔶 Warning 7
Suspicious collection method call 🔶 Warning 7
Vulnerable imported dependency 🔶 Warning 7
Functional expression can be folded 🔶 Warning 6
Unused import 🔶 Warning 6
Unnecessary unary minus 🔶 Warning 6
Unstable API Usage 🔶 Warning 6
Bulk operation can be used instead of iteration 🔶 Warning 6
Catch block may ignore exception 🔶 Warning 5
Variable is assigned to itself 🔶 Warning 5
Stream API call chain can be simplified 🔶 Warning 5
Dangling Javadoc comment 🔶 Warning 4
Inner class may be 'static' 🔶 Warning 4
Integer division in floating-point context 🔶 Warning 4
Copy of existing static method body 🔶 Warning 4
Manual min/max calculation 🔶 Warning 4
AutoCloseable used without 'try'-with-resources 🔶 Warning 3
Mismatched read and write of array 🔶 Warning 3
Value passed as parameter never read 🔶 Warning 3
Method is identical to its super method 🔶 Warning 3
String concatenation in loop 🔶 Warning 3
Local variable used and declared in different 'switch' branches 🔶 Warning 3
Unnecessary 'continue' statement 🔶 Warning 3
'default' not last case in 'switch' 🔶 Warning 2
Duplicate condition 🔶 Warning 2
Call math rounding with 'int' argument 🔶 Warning 2
@NotNull/@Nullable problems 🔶 Warning 2
Redundant type cast 🔶 Warning 2
Redundant operation on empty container 🔶 Warning 2
Redundant usage of unmodifiable collection wrappers 🔶 Warning 2
Method does not call super method 🔶 Warning 2
Call to 'Arrays.asList()' with too few arguments 🔶 Warning 1
Caught exception is immediately rethrown 🔶 Warning 1
Redundant 'Collection.addAll()' call 🔶 Warning 1
'static' method declared 'final' 🔶 Warning 1
Call to 'toString()' on array 🔶 Warning 1
Infinite recursion 🔶 Warning 1
Method name same as class name 🔶 Warning 1
'protected' member in 'final' class 🔶 Warning 1
String comparison using '==', instead of 'equals()' 🔶 Warning 1
'String.equals()' can be replaced with 'String.isEmpty()' 🔶 Warning 1
Suspicious variable/parameter name combination 🔶 Warning 1
Minimum 'switch' branches 🔶 Warning 1
Unary plus 🔶 Warning 1
Constant values ◽️ Notice 1351
Commented out code ◽️ Notice 1005
Duplicated code fragment ◽️ Notice 684
Duplicate branches in 'switch' ◽️ Notice 81
'if' statement with identical branches or common parts ◽️ Notice 9
Method can be extracted ◽️ Notice 7
Multiple occurrences of the same expression ◽️ Notice 4
Non-strict inequality '>=' or '<=' can be replaced with '==' ◽️ Notice 1

☁️ View the detailed Qodana report

Detected 18 dependencies # Third-party software list This page lists the third-party software dependencies used in Modern Warfare Cubed | Dependency | Version | Licenses | |-------------------------------------------------------------------------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------| | [commons-codec](http://commons.apache.org/proper/commons-codec/) | 1.10 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-compress](http://commons.apache.org/proper/commons-compress/) | 1.8.1 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-io](http://commons.apache.org/proper/commons-io/) | 2.5 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-lang3](http://commons.apache.org/proper/commons-lang/) | 3.5 | [Apache-2.0](http://www.apache.org/licenses/) | | [commons-logging](http://commons.apache.org/proper/commons-logging/) | 1.1.3 | [Apache-2.0](http://www.apache.org/licenses/) | | groovyscript | 1.2.0-hotfix1 | [MIT](http://opensource.org/licenses/mit-license.php) | | [httpclient](http://hc.apache.org/httpcomponents-client) | 4.3.3 | [Apache-2.0](http://www.apache.org/licenses/) | | [httpcore](http://hc.apache.org/httpcomponents-core-ga) | 4.3.2 | [Apache-2.0](http://www.apache.org/licenses/)
[CC-BY-2.5](http://creativecommons.org/licenses/by/2.5/) | | icu4j-core-mojang | 51.2 | [IBM-ICU](http://source.icu-project.org/repos/icu/icu/trunk/license.html) | | [java-objc-bridge](https://github.com/shannah/Java-Objective-C-Bridge) | 1.0.0 | [Apache-2.0](http://www.apache.org/licenses/) | | jline | 3.5.1 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) | | [jopt-simple](http://pholser.github.io/jopt-simple) | 5.0.3 | [MIT](http://opensource.org/licenses/mit-license.php) | | log4j-api | 2.17.1 | [Apache-2.0](http://www.apache.org/licenses/) | | log4j-core | 2.17.1 | [Apache-2.0](http://www.apache.org/licenses/) | | lombok | 1.18.32 | BSD-3-CLAUSE-NO-TRADEMARK
[MIT](http://opensource.org/licenses/mit-license.php) | | maven-artifact | 3.5.3 | [Apache-2.0](http://www.apache.org/licenses/) | | plexus-utils | 3.1.0 | [Apache-2.0](http://www.apache.org/licenses/) | | vecmath | 1.5.2 | [GPL-2.0-only](http://www.gnu.org/licenses/gpl-2.0.html)
[ORACLE-OPENJDK-EXCEPTION-2.0](http://openjdk.java.net/legal/gplv2+ce.html) |
Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions
strubium commented 2 weeks ago

I've decided to rename WorldGeneratorEventHandler to ModernWorldGenerator, because it isn't a event handler. I've also made an EquipmentFactory interface, it is like VehicleFactory and TileEntityFactory

This PR also lowers the total number of Qodana problems from 21,962 to 20,866