Skip to content

Commit

Permalink
PestsDestroyer:
Browse files Browse the repository at this point in the history
 = Additional fixes and adjustments
 = Improved a little flying

Fixes overall

Merged PRs
  • Loading branch information
May2Beez committed Mar 6, 2024
2 parents b474194 + 5f9cf7b commit 9b0792b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,12 @@ public void onRenderOverlay(RenderGameOverlayEvent.Post event) {
} else if (restartMacroAfterFailsafeDelay.isScheduled()) {
String text = "Restarting the macro in: " + LogUtils.formatTime(restartMacroAfterFailsafeDelay.getRemainingTime());
RenderUtils.drawCenterTopText(text, event, Color.ORANGE);
} else if (triggeredFailsafe.isPresent() && !triggeredFailsafe.get().equals(GuestVisitFailsafe.getInstance())) {
} else if (triggeredFailsafe.isPresent()
&& !triggeredFailsafe.get().equals(BanwaveFailsafe.getInstance())
&& !triggeredFailsafe.get().equals(EvacuateFailsafe.getInstance())
&& !triggeredFailsafe.get().equals(GuestVisitFailsafe.getInstance())
&& !triggeredFailsafe.get().equals(JacobFailsafe.getInstance())
) {
ArrayList<String> textLines = new ArrayList<>();
textLines.add("§6" + StringUtils.stripControlCodes(triggeredFailsafe.get().getType().name()).replace("_", " "));
textLines.add("§c§lYOU ARE DURING STAFF CHECK!");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/jelly/farmhelperv2/util/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static void drawText(String str, double X, double Y, double Z, float scal

double distance = Math.sqrt(renderPosX * renderPosX + renderPosY * renderPosY + renderPosZ * renderPosZ);
double multiplier = Math.max(distance / 150f, 0.1f);
lScale *= 0.45f * multiplier;
lScale *= (float) (0.45f * multiplier);

float xMultiplier = Minecraft.getMinecraft().gameSettings.thirdPersonView == 2 ? -1 : 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ public static String getScoreboardTitle() {
}

public static String cleanSB(String scoreboard) {
char[] nvString = StringUtils.stripControlCodes(scoreboard).toCharArray();
StringBuilder cleaned = new StringBuilder();

for (char c : nvString) {
if ((int) c > 20 && (int) c < 127) {
for (char c : StringUtils.stripControlCodes(scoreboard).toCharArray()) {
if (c >= 32 && c < 127) {
cleaned.append(c);
}
}
Expand Down

0 comments on commit 9b0792b

Please sign in to comment.