-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete unnecessary assets #479
base: next
Are you sure you want to change the base?
Conversation
WalkthroughWalkthroughThe changes involve the removal of various static item attachments and an item magazine from the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
src/main/resources/assets/mwc/textures/models/mas21.png
is excluded by!**/*.png
,!**/*.png
Files selected for processing (3)
- src/main/java/com/paneedah/mwc/weapons/Attachments.java (16 hunks)
- src/main/java/com/paneedah/mwc/weapons/AuxiliaryAttachments.java (4 hunks)
- src/main/java/com/paneedah/mwc/weapons/Magazines.java (2 hunks)
Files skipped from review due to trivial changes (2)
- src/main/java/com/paneedah/mwc/weapons/AuxiliaryAttachments.java
- src/main/java/com/paneedah/mwc/weapons/Magazines.java
Additional comments not posted (16)
src/main/java/com/paneedah/mwc/weapons/Attachments.java (16)
Line range hint
11-13
: Clarify the use of dummy textures.The use of
Dummy.png
as a texture forFABDefenseMount
might be a placeholder or for testing. Please confirm if this is intentional or if an actual texture needs to be used.
Line range hint
15-17
: Verify model and texture file existence and correctness.Ensure that the model
AUGHandguard
and textureaug.png
are correctly implemented and linked in the game's resources.
Line range hint
42-48
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
HoneyBadgerKnightsReceiver
andFABDefenseMount
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon parts and accessories are correctly referenced and relevant.
Both
HoneyBadgerKnightsReceiver
andFABDefenseMount
are defined inAttachments.java
and are actively used in various factory classes, confirming their relevance and correctness in the codebase. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "HoneyBadgerKnightsReceiver|FABDefenseMount"Length of output: 86
Script:
#!/bin/bash # Description: Search for references to HoneyBadgerKnightsReceiver and FABDefenseMount in all Java files. # Search for HoneyBadgerKnightsReceiver in Java files rg --type java "HoneyBadgerKnightsReceiver" -A 5 # Search for FABDefenseMount in Java files rg --type java "FABDefenseMount" -A 5Length of output: 33019
Line range hint
50-56
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
M14TriRailCover
andMAC21Stock
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon parts and accessories are correctly referenced and relevant.
The
M14TriRailCover
andMAC21Stock
are actively used and correctly referenced in the codebase. No issues were found regarding their relevance or correctness.
M14TriRailCover
is used inAttachments.java
andMk14EBRFactory.java
.MAC21Stock
is used inAttachments.java
andMAC10Factory.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "M14TriRailCover|MAC21Stock"Length of output: 70
Script:
#!/bin/bash # Description: Search for direct references to M14TriRailCover and MAC21Stock in the codebase. # Search for references to M14TriRailCover rg --type java "M14TriRailCover" -A 3 # Search for references to MAC21Stock rg --type java "MAC21Stock" -A 3Length of output: 23584
Line range hint
58-64
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
HoneyBadgerMatrixArmsHandguard
andARX160Chassis
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon parts and accessories are correctly referenced and relevant.
The weapon parts
HoneyBadgerMatrixArmsHandguard
andARX160Chassis
are correctly referenced in the codebase, confirming their relevance and correctness. No issues were found regarding their usage.
HoneyBadgerMatrixArmsHandguard
is used inAACHoneyBadgerFactory.java
.ARX160Chassis
is used inARX160Factory.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "HoneyBadgerMatrixArmsHandguard|ARX160Chassis"Length of output: 88
Script:
#!/bin/bash # Description: Search for direct references to specific weapon parts in the codebase. # Search for references to HoneyBadgerMatrixArmsHandguard rg --type java "HoneyBadgerMatrixArmsHandguard" # Search for references to ARX160Chassis rg --type java "ARX160Chassis"Length of output: 4588
Line range hint
19-24
: Verify the relevance and correctness of required attachments.Ensure that all listed required attachments for the
AK47iron
model are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Attachments are relevant and correctly referenced.
The attachments
AR57Handguard
,HK417Handguard
, andHK417HandguardTan
are actively used and correctly referenced throughout the codebase, confirming their relevance. No issues were found regarding their usage.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of required attachments. # Test: Check for any missing or incorrect references to these attachments in the codebase. rg --type java "requiredAttachments" | grep -E "AR57Handguard|HK417Handguard|HK417HandguardTan"Length of output: 95
Script:
#!/bin/bash # Broader search for references to the attachments in the entire codebase rg --type java "AR57Handguard|HK417Handguard|HK417HandguardTan" # Check if these attachments are defined or declared elsewhere in the codebase rg --type java "AR57Handguard|HK417Handguard|HK417HandguardTan"Length of output: 20085
Line range hint
34-40
: Verify crafting recipe correctness and attachment availability.Ensure that the crafting recipe involving
steelIngot
and the listed required attachments are correctly implemented and available in the game.Verification successful
Crafting recipes and attachment availability are correct.
The
steelIngot
,ACRHandGuard
, andACRWEMSKHandGuardTan
are correctly defined and used in crafting recipes and attachments within the codebase. No issues were found regarding their availability or implementation.
steelIngot
is used in crafting recipes inAttachments.java
and other files.ACRHandGuard
andACRWEMSKHandGuardTan
are defined inAttachments.java
and used inACRFactory.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of crafting recipes and the availability of required attachments. # Test: Check for any issues or inconsistencies in the crafting recipes and attachment references. rg --type java "CraftingGroup" | grep -E "steelIngot|ACRHandGuard|ACRWEMSKHandGuardTan"Length of output: 87
Script:
#!/bin/bash # Search for the definitions or usages of steelIngot, ACRHandGuard, and ACRWEMSKHandGuardTan in the codebase. # Check for steelIngot rg --type java "steelIngot" # Check for ACRHandGuard rg --type java "ACRHandGuard" # Check for ACRWEMSKHandGuardTan rg --type java "ACRWEMSKHandGuardTan"Length of output: 29755
Line range hint
82-88
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
HoneyBadgerMatrixArmsHandguard
andFNFALPARAHandguard
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon parts are relevant and correctly referenced.
The weapon parts
HoneyBadgerMatrixArmsHandguard
andFNFALPARAHandguard
are properly defined and used within the codebase. They are correctly referenced in various classes, confirming their relevance. No issues were found regarding their usage.
FNFALPARAHandguard
is used inAttachments.java
andFNFALFactory.java
.HoneyBadgerMatrixArmsHandguard
is used inAttachments.java
andAACHoneyBadgerFactory.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "HoneyBadgerMatrixArmsHandguard|FNFALPARAHandguard"Length of output: 93
Script:
#!/bin/bash # Search for direct references to HoneyBadgerMatrixArmsHandguard and FNFALPARAHandguard in the codebase. rg "HoneyBadgerMatrixArmsHandguard|FNFALPARAHandguard" --type java -A 3Length of output: 14973
Line range hint
90-96
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
Mk14TanBody
andMk14SnowBody
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Verification Successful: Mk14TanBody and Mk14SnowBody are correctly referenced and relevant.
Both
Mk14TanBody
andMk14SnowBody
are declared and used appropriately in the codebase, confirming their relevance and correctness. No issues were found regarding their references.
- Declarations and usages: Found in
Attachments.java
andMk14EBRFactory.java
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "Mk14TanBody|Mk14SnowBody"Length of output: 68
Script:
#!/bin/bash # Description: Search for declarations and usages of Mk14TanBody and Mk14SnowBody in the codebase. # Search for declarations of Mk14TanBody and Mk14SnowBody rg --type java "Mk14TanBody|Mk14SnowBody" -A 3 # Search for usages of Mk14TanBody and Mk14SnowBody rg --type java "Mk14TanBody|Mk14SnowBody"Length of output: 19048
Line range hint
98-104
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
KrissVectorReceiver
andVector556Handguard
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon parts
KrissVectorReceiver
andVector556Handguard
are relevant and correctly referenced.Both parts are actively used across multiple files, confirming their relevance and correctness in the codebase. No issues found.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "KrissVectorReceiver|Vector556Handguard"Length of output: 82
Script:
#!/bin/bash # Description: Search for direct references to KrissVectorReceiver and Vector556Handguard in Java files. # Search for references to KrissVectorReceiver rg --type java "KrissVectorReceiver" -A 3 # Search for references to Vector556Handguard rg --type java "Vector556Handguard" -A 3Length of output: 44383
Line range hint
66-72
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
FamasF1PicatinnyRail
andHK417Handguard
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Weapon Parts and Accessories are Relevant and Correctly Referenced
The weapon parts
FamasF1PicatinnyRail
andHK417Handguard
are declared and used appropriately within the codebase, confirming their relevance and correctness. No issues were found regarding their references.
- File:
src/main/java/com/paneedah/mwc/weapons/Attachments.java
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "FamasF1PicatinnyRail|HK417Handguard"Length of output: 79
Script:
#!/bin/bash # Search for the declarations of FamasF1PicatinnyRail and HK417Handguard in the codebase. ast-grep --lang java --pattern '$_ FamasF1PicatinnyRail' ast-grep --lang java --pattern '$_ HK417Handguard' # Search for any references or usages of FamasF1PicatinnyRail and HK417Handguard in the codebase. rg 'FamasF1PicatinnyRail|HK417Handguard' --type java -A 3Length of output: 17557
Line range hint
74-80
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
KrissVectorReceiver
andRemington870FABDefensePump
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Verification Successful: Weapon Parts and Accessories are Correctly Referenced
The weapon parts
KrissVectorReceiver
andRemington870FABDefensePump
are both defined and referenced correctly in the codebase. There are no missing or incorrect references.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "KrissVectorReceiver|Remington870FABDefensePump"Length of output: 90
Script:
#!/bin/bash # Search for the definitions of KrissVectorReceiver and Remington870FABDefensePump in the codebase ast-grep --lang java --pattern 'class KrissVectorReceiver { $$$ }' ast-grep --lang java --pattern 'class Remington870FABDefensePump { $$$ }' # Search for any references to KrissVectorReceiver and Remington870FABDefensePump in the codebase rg --type java 'KrissVectorReceiver' rg --type java 'Remington870FABDefensePump'Length of output: 8777
Line range hint
106-112
: Verify the relevance and correctness of weapon parts and accessories.Ensure that all listed weapon parts and accessories, such as
ACRPrecisionHandGuardTan
andMk14BlackBody
, are relevant and correctly referenced, especially after the removals ofStonerHANDGUARD
andMAS21Mount
.Verification successful
Verification of Weapon Parts and Accessories References
The weapon parts
ACRPrecisionHandGuardTan
andMk14BlackBody
are indeed declared and referenced in the codebase. They are used in various contexts, such as attachment compatibility and model positioning, confirming their relevance and correctness in the current implementation.
- Declarations and References:
ACRPrecisionHandGuardTan
is declared and used in theAttachments.java
file and referenced inType20Factory.java
andACRFactory.java
.Mk14BlackBody
is declared and used in theAttachments.java
file and referenced inMk14EBRFactory.java
.These findings indicate that the weapon parts are correctly integrated into the codebase. No further action is needed regarding their relevance and correctness.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the relevance and correctness of weapon parts and accessories. # Test: Check for any missing or incorrect references to these parts in the codebase. rg --type java "weapon parts" | grep -E "ACRPrecisionHandGuardTan|Mk14BlackBody"Length of output: 82
Script:
#!/bin/bash # Search for the declarations of ACRPrecisionHandGuardTan and Mk14BlackBody in the codebase ast-grep --lang java --pattern 'public static ItemAttachment<Weapon> ACRPrecisionHandGuardTan' ast-grep --lang java --pattern 'public static ItemAttachment<Weapon> Mk14BlackBody'Length of output: 182
Script:
#!/bin/bash # Search for any mentions of ACRPrecisionHandGuardTan and Mk14BlackBody in the codebase, including comments and documentation rg 'ACRPrecisionHandGuardTan|Mk14BlackBody' --type java -A 3Length of output: 17041
Line range hint
1-4
: Verify remaining attachments are unaffected.Ensure that the removal of
StonerHANDGUARD
andMAS21Mount
does not impact the functionality or initialization of other attachments listed in this hunk.Verification successful
Remaining Attachments Unaffected by Removals
The attachments
AUGA3handguard
,AUGA3extGuard
,AR57Handguard
, andNTW20HandguardRAIL
are initialized correctly and do not depend on the removed itemsStonerHANDGUARD
andMAS21Mount
. Their functionality and initialization remain intact.
AUGA3handguard
andAUGA3extGuard
are defined with appropriate models and categories.AR57Handguard
andNTW20HandguardRAIL
are also initialized correctly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the remaining attachments are initialized correctly and not affected by the removals. # Test: Search for any errors or warnings related to these attachments in the logs. rg --type log "error|warning" | grep -E "AUGA3handguard|AUGA3extGuard|AR57Handguard|NTW20HandguardRAIL"Length of output: 254
Script:
#!/bin/bash # Use ast-grep to find definitions and references of the remaining attachments in the codebase. # Search for the definition of AUGA3handguard ast-grep --lang java --pattern 'AUGA3handguard = $_' # Search for the definition of AUGA3extGuard ast-grep --lang java --pattern 'AUGA3extGuard = $_' # Search for the definition of AR57Handguard ast-grep --lang java --pattern 'AR57Handguard = $_' # Search for the definition of NTW20HandguardRAIL ast-grep --lang java --pattern 'NTW20HandguardRAIL = $_'Length of output: 17170
Line range hint
6-9
: Verify remaining attachments are unaffected.Ensure that the removal of
StonerHANDGUARD
andMAS21Mount
does not impact the functionality or initialization of other attachments listed in this hunk.Verification successful
Remaining Attachments Are Unaffected
The attachments
P90Terminator
,FABDefenseMount
,M4FrontSight
, andM38FrontSight
are correctly defined, initialized, and used in the codebase. Their functionality is not impacted by the removal of other attachments.
P90Terminator
is defined and used inP90Factory
and other classes.FABDefenseMount
is used across multiple gun factory classes.M4FrontSight
andM38FrontSight
are used in various AR and M4 factory classes.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the remaining attachments are initialized correctly and not affected by the removals. # Test: Search for any errors or warnings related to these attachments in the logs. rg --type log "error|warning" | grep -E "P90Terminator|FABDefenseMount|M4FrontSight|M38FrontSight"Length of output: 249
Script:
#!/bin/bash # Check for the presence of log files in the repository. fd --type f --extension log # If log files are found, rerun the search command without the --type log filter. rg "error|warning" | grep -E "P90Terminator|FABDefenseMount|M4FrontSight|M38FrontSight"Length of output: 119
Script:
#!/bin/bash # Search for the definitions and usages of the specified attachments in the codebase. ast-grep --lang java --pattern 'P90Terminator' ast-grep --lang java --pattern 'FABDefenseMount' ast-grep --lang java --pattern 'M4FrontSight' ast-grep --lang java --pattern 'M38FrontSight'Length of output: 5485
Line range hint
26-32
: Verify crafting recipe correctness and attachment availability.Ensure that the crafting recipe involving
steelIngot
and the listed required attachments are correctly implemented and available in the game.Verification successful
Crafting recipes and attachments are correctly implemented.
The crafting recipes involving
steelIngot
and the required attachments (ACRHandGuard
,ACRWEMSKHandGuardTan
) are correctly implemented and available in the codebase. No issues or inconsistencies were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of crafting recipes and the availability of required attachments. # Test: Check for any issues or inconsistencies in the crafting recipes and attachment references. rg --type java "CraftingGroup" | grep -E "steelIngot|ACRHandGuard|ACRWEMSKHandGuardTan"Length of output: 87
Script:
#!/bin/bash # Search for the definition of steelIngot and the specified attachments in the codebase. ast-grep --lang java --pattern '$_ = $_' | grep -E 'steelIngot|ACRHandGuard|ACRWEMSKHandGuardTan' # Additionally, search for crafting recipes in the codebase to verify their presence. rg --type java 'crafting' -A 5Length of output: 22307
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/main/java/com/paneedah/mwc/weapons/Guns.java (2 hunks)
Files skipped from review due to trivial changes (1)
- src/main/java/com/paneedah/mwc/weapons/Guns.java
📝 Description
The MAS21 is a fictional weapon and similar to many handguns, the reason for removing this weapon is because it is fictional and generic to other pistols like the Glock, being a weapon with Weapon System 1 and not craftable, it is a very little used weapon, on the other hand this weapon uses many unnecessary assets.
The StonerA1 is a fictional weapon somewhat similar to the prototypes of the real weapon called KAC LAMG, the model of this weapon in the game is an ugly model and nothing similar to the original design, the weapon has many visual problems such as textures and accessories.
And two models of pistol parts not used in the mod (P220 and P225)
🎯 Goals
Clean up unnecessary files and avoid updating generic or fictitious weapons, also clean up two unnecessary models
❌ Non Goals
Not breaking the game (I doubt the game will break, the MAS21 and StonerA1 are WS1 weapons with many visual bugs) on the other hand they are weapons that cannot be crafted.
If you want to convert those two weapons to WS2, they will become generic weapons
🚦 Testing
N/A
⏮️ Backwards Compatibility
It is fully compatible with previous versions, but when the player is loading his game or his world in minecraft, the parts/components of the weapons (MAS21 - StonerA1) no longer appear or do not recognize those models
*Important: only a message appears that these specific components are not loaded or recognized in the mod
📚 Related Issues & Documents
N/A
🖼️ Screenshots/Recordings
N/A
📖 Added to documentation?