Skip to content

Commit d0ea39c

Browse files
authored
Merge pull request #289 from notjennifer/master
added settings to customize color of spawn & rewarp positions
2 parents b55b245 + f11b376 commit d0ea39c

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ baseGroup=com.jelly.farmhelperv2
44
mcVersion=1.8.9
55
modid=farmhelperv2
66
modName=FarmHelper
7-
version=2.9.1-pre1
7+
version=2.9.1-pre2
88
shouldRelease=true

src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,17 @@ public static void triggerManuallyPestsDestroyer() {
12951295
//</editor-fold>
12961296

12971297
//<editor-fold desc="Drawings">
1298-
1298+
1299+
@Color(
1300+
name = "Rewarp Color", category = GENERAL, subcategory = "Rewarp",
1301+
description = "The color of the rewarp box"
1302+
)
1303+
public static OneColor rewarpColor = new OneColor(0, 255, 217, 171);
1304+
@Color(
1305+
name = "Spawn Color", category = GENERAL, subcategory = "Spawn Position",
1306+
description = "The color of the spawn box"
1307+
)
1308+
public static OneColor spawnColor = new OneColor(0, 255, 217, 171);
12991309
@Switch(
13001310
name = "Pests ESP", category = PESTS_DESTROYER, subcategory = "Drawings",
13011311
description = "Draws a box around pests"

src/main/java/com/jelly/farmhelperv2/handler/MacroHandler.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,22 +357,21 @@ public void onRenderWorldLast(RenderWorldLastEvent event) {
357357
if (FarmHelperConfig.streamerMode) return;
358358

359359
if (FarmHelperConfig.highlightRewarp && FarmHelperConfig.rewarpList != null && GameStateHandler.getInstance().inGarden()) {
360-
Color chroma = Color.getHSBColor((float) ((System.currentTimeMillis() / 10) % 2000) / 2000, 1, 1);
361-
362360
for (Rewarp rewarp : FarmHelperConfig.rewarpList) {
363361
double distance = mc.thePlayer.getDistance(rewarp.x, rewarp.y, rewarp.z);
364-
Color chromaLowerAlpha = new Color(chroma.getRed(), chroma.getGreen(), chroma.getBlue(), Math.max(0, 120 - (int) (distance * 2)));
362+
Color rewarpColor = FarmHelperConfig.rewarpColor.toJavaColor();
365363
if (distance < 50) {
366-
RenderUtils.drawBlockBox(new BlockPos(rewarp.x, rewarp.y, rewarp.z), chromaLowerAlpha);
364+
RenderUtils.drawBlockBox(new BlockPos(rewarp.x, rewarp.y, rewarp.z), rewarpColor);
367365
}
368366
}
369367
}
370368

371369
if (FarmHelperConfig.drawSpawnLocation && PlayerUtils.isSpawnLocationSet() && GameStateHandler.getInstance().inGarden()) {
372370
BlockPos spawnLocation = new BlockPos(PlayerUtils.getSpawnLocation());
373371
double distance = mc.thePlayer.getDistance(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ());
372+
Color spawnColor = FarmHelperConfig.spawnColor.toJavaColor();
374373
if (distance < 50) {
375-
RenderUtils.drawBlockBox(spawnLocation, new Color(Color.orange.getRed(), Color.orange.getGreen(), Color.orange.getBlue(), Math.max(0, 80 - (int) (distance * 1.6))));
374+
RenderUtils.drawBlockBox(spawnLocation, spawnColor);
376375
}
377376
}
378377

0 commit comments

Comments
 (0)