This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
ElytaHud #147
Open
INotSleep
wants to merge
3
commits into
DarkKronicle:master
Choose a base branch
from
INotSleep:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ElytaHud #147
Conversation
This file contains 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
moehreag
suggested changes
Jul 19, 2023
|
||
public static final Identifier ID = new Identifier("kronhud", "elytrahud"); | ||
|
||
private final KronColor firstColor = new KronColor("positivespeed", ID.getPath(), ColorUtil.SELECTOR_GREEN); |
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.
Please add translations for these keys.
Comment on lines
+79
to
+97
drawString(context, textRenderer, Text.of("VSpeed: "), pos.x()+3, pos.y()+3, thirdColor.getValue().color(), true); | ||
int currPos = textRenderer.getWidth("VSpeed: "); | ||
|
||
drawString(context, textRenderer, Text.of(String.valueOf(verticalSpeed)), pos.x()+3+currPos, pos.y()+3, vspeedColor.getValue().color(), true); | ||
currPos += textRenderer.getWidth(String.valueOf(verticalSpeed)); | ||
|
||
drawString(context, textRenderer, Text.of(" BPS"), pos.x()+3+currPos, pos.y()+3, thirdColor.getValue().color(), true); | ||
|
||
drawString(context, textRenderer, Text.of("HSpeed: "), pos.x()+3, pos.y()+13, thirdColor.getValue().color(), true); | ||
currPos = textRenderer.getWidth("HSpeed: "); | ||
|
||
drawString(context, textRenderer, Text.of(String.valueOf(horizontalSpeed)), pos.x()+3+currPos, pos.y()+13, hspeedColor.getValue().color(), true); | ||
currPos += textRenderer.getWidth(String.valueOf(horizontalSpeed)); | ||
|
||
drawString(context, textRenderer, Text.of(" BPS"), pos.x()+3+currPos, pos.y()+13, thirdColor.getValue().color(), true); | ||
currPos = 0; | ||
|
||
drawString(context, textRenderer, Text.of("Distance: "), pos.x()+3, pos.y()+23, thirdColor.getValue().color(), true); | ||
currPos = textRenderer.getWidth("Distance: "); |
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.
These strings would benefit of translations as well
Comment on lines
+110
to
+125
drawString(context, textRenderer, Text.of("VSpeed: "), pos.x()+3, pos.y()+3, thirdColor.getValue().color(), true); | ||
int currPos = textRenderer.getWidth("VSpeed: "); | ||
|
||
drawString(context, textRenderer, Text.of(String.valueOf(0d)), pos.x()+3+currPos, pos.y()+3, fourthColor.getValue().color(), true); | ||
currPos += textRenderer.getWidth(String.valueOf(0d)); | ||
|
||
drawString(context, textRenderer, Text.of(" BPS"), pos.x()+3+currPos, pos.y()+3, thirdColor.getValue().color(), true); | ||
|
||
drawString(context, textRenderer, Text.of("HSpeed: "), pos.x()+3, pos.y()+13, thirdColor.getValue().color(), true); | ||
currPos = textRenderer.getWidth("HSpeed: "); | ||
|
||
drawString(context, textRenderer, Text.of(String.valueOf(0d)), pos.x()+3+currPos, pos.y()+13, fourthColor.getValue().color(), true); | ||
currPos += textRenderer.getWidth(String.valueOf(0d)); | ||
|
||
drawString(context, textRenderer, Text.of(" BPS"), pos.x()+3+currPos, pos.y()+13, thirdColor.getValue().color(), true); | ||
currPos = 0; |
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.
These as well
Comment on lines
+155
to
+173
@Override | ||
public int getWidth() { | ||
return this.width; | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return this.height; | ||
} | ||
|
||
@Override | ||
public void setWidth(int width) { | ||
this.width = width; | ||
} | ||
|
||
@Override | ||
public void setHeight(int height) { | ||
this.height = height; | ||
} |
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.
These methods are very likely just the same as in the superclass and therefore unnecessary
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Added ElytraHud, which allows to calculate distance, that will be traveled on elytra
Fixed version in readme