Remove overrides of use(...) - #63
Merged
Merged
Conversation
|
|
||
| def kiloBytes: Int | ||
|
|
||
| @OnlyIn(Dist.CLIENT) |
Collaborator
There was a problem hiding this comment.
Did you really mean to do this? What good does this do outside of the client?
Collaborator
Author
There was a problem hiding this comment.
Yeah, sorry, I probably should have split this into a separate PR. We shouldn't be using @OnlyIn anywhere any more — IIRC trying to use it in later versions of the game/NF will error — and this one was an easy one to clean up.
Comment on lines
+17
to
+23
| world.getBlockEntity(ctx.getClickedPos) match { | ||
| case host: SidedEnvironment => | ||
| if (!world.isClientSide) Debugger.reconnect(Array(host.sidedNode(ctx.getClickedFace))) | ||
| case host: Environment => | ||
| if (!world.isClientSide) Debugger.reconnect(Array(host.node)) | ||
| case _ => | ||
| if (!world.isClientSide) Debugger.node.remove() |
Collaborator
There was a problem hiding this comment.
It might be better to wrap this entire match in if (!world.isClientSide0 ... since every individual case checks for this, but maybe I don't understand Scala enough to understand why it can't/shouldn't be done that way...
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SimpleItemdefines several overrides for the various use-item methods. This can make code unidiomatic (several places where we don't correctly handle items in the off-hand) and just makes the code a bit more confusing to reason about.