meteor-client
meteor-client copied to clipboard
Fix some warnings
Type of change
- [x] Bug fix
- [ ] New feature
Description
Just going through the warnings, fixing as much as I can.
Related issues
Mention any issues that this pr relates to.
How Has This Been Tested?
Videos or screenshots of the changes if applicable.
Checklist:
- [x] My code follows the style guidelines of this project.
- [x] I have added comments to my code in more complex areas.
- [x] I have tested the code in both development and production environments.
Progress
Deprecated
- [x]
URL
constructor -> 665044d91814bc8b0686ed8620dff99abb694135: replace withnew URI(url).toURL()
- [x]
lang3-WordUtils
-> 77de6c6e00d6eb95444df22a79219fee4a21c526: useStringUtils
instead - [x]
blocksMovement
-> 28589b9e6a726dcb5c1209957d951105268202e7: re-implement without using deprecatedisSolid()
- [ ]
NativeImage.makePixelArray()
: haven't found any info on alternatives and idk what it does.
Unchecked
- [x]
getArgument()
a9822abeb9bcb3b92320d954ab93bad5d2070d29: suppress the same warnings as method signature - [ ] https://github.com/MeteorDevelopment/meteor-client/blob/8ce8d3002bd6304afbc9624b0b093ce05b996984/src/main/java/meteordevelopment/meteorclient/gui/DefaultSettingsWidgetFactory.java#L47
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/ba1cd6ef4354f2f0abc46dee4db2945332f95a99/src/main/java/meteordevelopment/meteorclient/gui/GuiTheme.java#L121
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/gui/renderer/GuiRenderOperation.java#L23
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/gui/screens/settings/BlockDataSettingScreen.java#L61
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/gui/screens/settings/BlockDataSettingScreen.java#L71
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/gui/screens/settings/BlockDataSettingScreen.java#L79
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/EnumSetting.java#L24
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L178
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L183
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L188
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L193
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L198
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/daf6d3f957de77144f115c7f531987ca5e13a7ba/src/main/java/meteordevelopment/meteorclient/settings/Setting.java#L203
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/settings/Settings.java#L85
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/settings/Settings.java#L88
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/settings/Settings.java#L98
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/settings/Settings.java#L101
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/1ceea3e666e374e67b70c630d105251aeebf6154/src/main/java/meteordevelopment/meteorclient/systems/accounts/Account.java#L111
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/6576056331d72f7b2738e4c591969d7c04df45a8/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoEat.java#L32
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/6576056331d72f7b2738e4c591969d7c04df45a8/src/main/java/meteordevelopment/meteorclient/systems/modules/player/AutoGap.java#L37
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/d2841949c22cbd752dc6936cadd861f9011c17f2/src/main/java/meteordevelopment/meteorclient/utils/misc/UnorderedArrayList.java#L22
- [ ] https://github.com/MeteorDevelopment/meteor-client/blob/b0d1686255fe8957e1e4361fd4eedf60cd1f5c04/src/main/java/meteordevelopment/meteorclient/utils/render/WireframeEntityRenderer.java#L62
Resource Leak
- [x]
BeaconScreenMixin
getInstance()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
BlockCollisionSpliteratorMixin
getInstance()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
BlockItemMixin
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
PlayerEntityMixin:56
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
PlayerEntityMixin:63
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
PlayerEntityMixin:84
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
PlayerEntityMixin:92
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
PlayerEntityMixin:107
getWorld()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
ChunkAwareBlockCollisionSweeperMixin
getInstances()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: declare variable - [x]
Utils
readBytes()
-> 1ae70cdb1b72469f72b48ac39623c1b9e2f8bb24: close stream
Unused Import
- [x]
BaritoneUtils
- [x]
BaritoneAPI
- [x]
FlowableFluid
- [x]
MatrixStack
- [x]
Perspective
- [x]
TextRenderer
- [x]
BufferBuilder
- [x]
VertexConsumerProvider
- [x]
RenderUtils
- [x]
Rotation
- [x]
TextRenderer
- [x]
BufferBuilder
- [x]
VertexConsumerProvider
- [x]
AbstractTeam
- [x]
AuthenticationException
Unused Variable/Field
- [ ]
EasyMCAccount.AuthResponse.message
should remain, for completeness - [x]
Hud.keybind
* -> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
local var item
-> 2fcaed3266621116dc4c196fcc113608092992aa - [x]
Blink.cancelBlink
* -> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
ElytraBoost.keybind
* -> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
LightOverlay.bp
-> c2231b358e239ab836189b05733dbc3a4f8a5889: suppress - [x]
CuboidMarker.mode
-> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
Sphere2dMarker.nextLayerKey
-> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
Sphere2dMarker.prevLayerKey
-> 14481871ee69fd9f036886452f2eef0661a0e61d - [x]
local var layer
-> 2fcaed3266621116dc4c196fcc113608092992aa
* Used, but in a hacky way
To be brief:
- All of the null warnings are not actually triggerable at the moment the code is called.
- The stream related warnings about missing close calls should be handled via try-with-resources.
All of the null warnings are not actually triggerable at the moment the code is called.
Yeah I just kinda added the null warnings and I was gonna see what's actually necesary.
The stream related warnings about missing close calls should be handled via try-with-resources.
The only one that I used .close()
had another stream closed that way in the same method, so I did the same. The others I thought making a variable out of them should take care of it, but if not, I'll look into that.
There's a few unused fields that are keybinds, what's up with that?
There's a few unused fields that are keybinds, what's up with that?
If you're referring to the HUD keybind, it is actually used, but in a hacky way. HUD is not an implementation of the Module class, but it still requires a Keybind for it to be rendered and used.