Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.6-bin.zip
networkTimeout=30000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
org.gradle.jvmargs=-Xmx2G --add-opens java.base/java.io=ALL-UNNAMED

57 changes: 56 additions & 1 deletion gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import top.fpsmaster.event.Subscribe;
import top.fpsmaster.event.events.EventValueChange;
import top.fpsmaster.exception.FileException;
import top.fpsmaster.features.impl.InterfaceModule;
import top.fpsmaster.features.manager.Category;
import top.fpsmaster.features.manager.Module;
import top.fpsmaster.features.settings.impl.BindSetting;
import top.fpsmaster.features.settings.impl.BooleanSetting;
import top.fpsmaster.features.settings.impl.ModeSetting;
Expand All @@ -20,7 +20,7 @@

import static top.fpsmaster.utils.core.Utility.mc;

public class ClientSettings extends InterfaceModule {
public class ClientSettings extends Module {
public static ModeSetting language = new ModeSetting("Language", 1, "English", "Chinese");
public static BooleanSetting blur = new BooleanSetting("blur", false);
public static BindSetting keyBind = new BindSetting("ClickGuiKey", Keyboard.KEY_RSHIFT);
Expand All @@ -33,8 +33,10 @@ public class ClientSettings extends InterfaceModule {
2,
"0.5x", "0.75x", "1x", "1.25x", "1.5x", "2x", "2.5x", "3x"
);
public static ModeSetting theme = new ModeSetting("Theme", 0, "Dark", "Light");
public static BooleanSetting clientCommand = new BooleanSetting("Command", true);
public static final TextSetting prefix = new TextSetting("prefix", "#", () -> clientCommand.getValue());
public static BindSetting zoomBind = new BindSetting("ZoomBind", Keyboard.KEY_LCONTROL);
public static final TextSetting prefix = new TextSetting("prefix", ".", () -> clientCommand.getValue());

public static boolean isFollowGameScaleEnabled() {
return followGameScale.getValue();
Expand Down Expand Up @@ -68,7 +70,7 @@ public static float getUiRenderScale() {

public ClientSettings() {
super("ClientSettings", Category.Utility);
addSettings(language, keyBind, followGameScale, fixedScale, blur, clientCommand, prefix);
addSettings(language, keyBind, followGameScale, fixedScale, blur, theme, zoomBind, clientCommand, prefix);
EventDispatcher.registerListener(this);
// get system language
Locale locale = Locale.getDefault();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/top/fpsmaster/features/impl/utility/AutoGG.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AutoGG extends Module {
private final NumberSetting delay = new NumberSetting("DelayToPlay", 5, 0, 10, 1, autoPlay::getValue);
private final TextSetting message = new TextSetting("Message", "gg");

private final ModeSetting servers = new ModeSetting("Servers", 0, "hypixel", "normal");
private final ModeSetting servers = new ModeSetting("Servers", 0, "hypixel", "普通");

private final String[] hypixelTrigger = new String[]{
"Reward Summary",
Expand Down Expand Up @@ -113,4 +113,4 @@ public void onPacket(EventPacket event) {
}
}
}
}
}
17 changes: 16 additions & 1 deletion src/main/java/top/fpsmaster/features/impl/utility/LevelTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ public static void renderName(Entity entityIn, String str, double x, double y, d
GlStateManager.translate((float) x + 0.0F, (float) y + entityIn.height + 0.5F, (float) z);
GL11.glNormal3f(0.0F, 1.0F, 0.0F);

/*
* 原版 1.8.9 nametag 朝向逻辑:
*
* playerViewY 控制左右方向,前面需要负号;
* playerViewX 控制上下俯仰方向,直接使用正值;
*
* 不要根据 first person / third person 分支处理,
* RenderManager.playerViewX / playerViewY 本身就应该代表当前相机方向。
*/
GlStateManager.rotate(-mc.getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(mc.getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F);

Expand Down Expand Up @@ -175,6 +184,9 @@ public static void renderName(Entity entityIn, String str, double x, double y, d
GL11.glColor4f(1, 1, 1, 1);
GlStateManager.enableTexture2D();

/*
* 第一遍绘制:关闭深度时绘制暗色文字。
*/
if (isMate) {
Images.draw(
new ResourceLocation("client/textures/mate.png"),
Expand All @@ -201,6 +213,9 @@ public static void renderName(Entity entityIn, String str, double x, double y, d
);
}

/*
* 第二遍绘制:开启深度后绘制正常白色文字。
*/
GlStateManager.enableDepth();
GlStateManager.depthMask(true);

Expand Down Expand Up @@ -242,4 +257,4 @@ public void onDisable() {
public static boolean isUsing() {
return using;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public RawInput() {
@Override
public void onEnable() {
rawInputMod.start();
RawInputMod.setAcceptingInput(true);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/top/fpsmaster/ui/click/CategoryComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public class CategoryComponent {

public CategoryComponent(Category category) {
this.category = category;
animationName.set(new Color(234, 234, 234));
animationName.set(ClickGuiTheme.categoryTextUnselected());
}

public void render(float x, float y, float width, float height, float mouseX, float mouseY, boolean selected, double dt) {
animationName.animateTo(
selected ? new Color(0, 0, 0) : new Color(255, 255, 255),
selected ? ClickGuiTheme.categoryTextSelected() : ClickGuiTheme.categoryTextUnselected(),
0.2f,
Easings.QUAD_IN_OUT
);
Expand Down
156 changes: 156 additions & 0 deletions src/main/java/top/fpsmaster/ui/click/ClickGuiTheme.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
package top.fpsmaster.ui.click;

import top.fpsmaster.features.impl.interfaces.ClientSettings;

import java.awt.*;

public class ClickGuiTheme {
public static boolean isLight() {
return ClientSettings.theme.getValue() == 1;
}

// ClickGuiTheme author:Ukiyograin
public static Color textPrimary() {
return isLight() ? new Color(30, 30, 30) : new Color(234, 234, 234);
}

public static Color textSecondary() {
return isLight() ? new Color(100, 100, 100) : new Color(162, 162, 162);
}

public static Color textDescription() {
return isLight() ? new Color(70, 70, 70) : new Color(162, 162, 162);
}

public static Color textDisabled() {
return isLight() ? new Color(140, 140, 140) : new Color(156, 156, 156);
}

public static Color categoryTextSelected() {
return isLight() ? new Color(255, 255, 255) : new Color(0, 0, 0);
}

public static Color categoryTextUnselected() {
return isLight() ? new Color(30, 30, 30) : new Color(255, 255, 255);
}

public static Color categoryHover() {
return isLight() ? new Color(200, 200, 200) : new Color(70, 70, 70);
}

public static Color categoryBg() {
return isLight() ? new Color(255, 255, 255, 200) : new Color(0, 0, 0, 200);
}

public static Color panelBg() {
return isLight() ? new Color(235, 238, 248, 180) : new Color(0, 0, 0, 0);
}

public static Color moduleHeaderBg() {
return isLight() ? new Color(0, 0, 0, 0) : new Color(0, 0, 0, 0);
}

public static Color categorySelection() {
return isLight() ? new Color(40, 40, 40) : new Color(255, 255, 255);
}

public static Color settingsBg() {
return isLight() ? new Color(195, 200, 220, 160) : new Color(100, 100, 100, 60);
}

public static Color moduleContentEnabled() {
return isLight() ? new Color(40, 80, 220) : new Color(255, 255, 255);
}

public static Color moduleContentDisabled() {
return isLight() ? new Color(0, 0, 0) : new Color(156, 156, 156);
}

public static Color toggleEnabled() {
return new Color(89, 101, 241);
}

public static Color toggleDisabled() {
return isLight() ? new Color(40, 40, 40) : new Color(255, 255, 255);
}

public static Color inputBg() {
return isLight() ? new Color(200, 200, 200, 80) : new Color(0, 0, 0, 80);
}

public static Color sliderFill() {
return isLight() ? new Color(89, 101, 241) : new Color(255, 255, 255);
}

public static Color modeBg() {
return isLight() ? new Color(220, 220, 220) : new Color(52, 52, 52);
}

public static Color modeBorder() {
return isLight() ? new Color(0, 0, 0, 50) : new Color(255, 255, 255, 50);
}

public static Color modeText() {
return isLight() ? new Color(30, 30, 30) : new Color(234, 234, 234);
}

public static Color scrollbar() {
return isLight() ? new Color(0, 0, 0, 100) : new Color(255, 255, 255, 100);
}

public static Color mask(int alpha) {
return new Color(0, 0, 0, alpha);
}

public static Color pickerBg() {
return isLight() ? new Color(180, 180, 180) : new Color(39, 39, 39);
}

public static Color hexText() {
return isLight() ? new Color(30, 30, 30) : new Color(234, 234, 234);
}

public static Color bindBgActive() {
return isLight() ? new Color(180, 180, 180, 80) : new Color(255, 255, 255, 80);
}

public static Color bindBgInactive() {
return isLight() ? new Color(200, 200, 200, 80) : new Color(0, 0, 0, 80);
}

public static Color textFieldBg() {
return isLight() ? new Color(200, 200, 200) : new Color(58, 58, 58);
}

public static Color textFieldText() {
return isLight() ? new Color(30, 30, 30) : new Color(234, 234, 234);
}

public static Color itemBg() {
return isLight() ? new Color(180, 180, 180, 120) : new Color(50, 50, 50, 120);
}

public static Color itemContainerBg() {
return isLight() ? new Color(160, 160, 160, 160) : new Color(80, 80, 80, 160);
}

public static Color buttonBg() {
return isLight() ? new Color(160, 160, 160, 140) : new Color(70, 70, 70, 140);
}

public static Color buttonHoverBg() {
return isLight() ? new Color(130, 130, 130, 140) : new Color(120, 120, 120, 140);
}

public static Color themeBtnBg() {
return isLight() ? new Color(255, 255, 255, 180) : new Color(0, 0, 0, 150);
}

public static Color themeBtnText() {
return isLight() ? new Color(30, 30, 30) : new Color(200, 200, 200);
}

public static Color modeSelectBg() {
return isLight() ? new Color(40, 40, 40) : new Color(52, 52, 52);
}
}
Loading
Loading