This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
generated from MeteorDevelopment/meteor-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crash attempt with ThunderHack client
- Loading branch information
Showing
14 changed files
with
75 additions
and
318 deletions.
There are no files selected for viewing
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
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
62 changes: 62 additions & 0 deletions
62
src/main/java/nekiplay/meteorplus/features/modules/ChatPrefix.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package nekiplay.meteorplus.features.modules; | ||
|
||
import meteordevelopment.meteorclient.settings.ColorSetting; | ||
import meteordevelopment.meteorclient.settings.Setting; | ||
import meteordevelopment.meteorclient.settings.SettingGroup; | ||
import meteordevelopment.meteorclient.settings.StringSetting; | ||
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import meteordevelopment.meteorclient.utils.player.ChatUtils; | ||
import meteordevelopment.meteorclient.utils.render.color.SettingColor; | ||
import nekiplay.meteorplus.MeteorPlusAddon; | ||
import net.minecraft.text.MutableText; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.text.TextColor; | ||
import net.minecraft.util.Formatting; | ||
|
||
public class ChatPrefix extends Module { | ||
public ChatPrefix() { | ||
super(MeteorPlusAddon.CATEGORY, "chat-prefix", "prefix for enabling and disabling Meteor+ modules."); | ||
} | ||
private final SettingGroup sgGeneral = settings.getDefaultGroup(); | ||
private final Setting<String> prefix = sgGeneral.add(new StringSetting.Builder() | ||
.name("prefix") | ||
.description("Which prefix to be displayed for Meteor+ modules.") | ||
.defaultValue("Meteor+") | ||
.onChanged(reload -> setPrefixes()) | ||
.build() | ||
); | ||
|
||
private final Setting<SettingColor> prefixColor = sgGeneral.add(new ColorSetting.Builder() | ||
.name("color") | ||
.description("Which color to use for the prefix.") | ||
.defaultValue(new SettingColor(0, 198, 77, 255)) | ||
.build() | ||
); | ||
|
||
@Override | ||
public void onActivate() { | ||
setPrefixes(); | ||
} | ||
|
||
@Override | ||
public void onDeactivate() { | ||
ChatUtils.unregisterCustomPrefix("nekiplay.meteorplus.features.modules"); | ||
} | ||
|
||
public void setPrefixes() { | ||
if (isActive()) { | ||
ChatUtils.registerCustomPrefix("nekiplay.meteorplus.features.modules", this::getPrefix); | ||
} | ||
} | ||
|
||
public Text getPrefix() { | ||
MutableText value = Text.literal(prefix.get()); | ||
MutableText prefix = Text.literal(""); | ||
value.setStyle(value.getStyle().withColor(TextColor.fromRgb(prefixColor.get().getPacked()))); | ||
prefix.setStyle(prefix.getStyle().withFormatting(Formatting.GRAY)) | ||
.append(Text.literal("[")) | ||
.append(value) | ||
.append(Text.literal("] ")); | ||
return prefix; | ||
} | ||
} |
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
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
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
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
42 changes: 0 additions & 42 deletions
42
src/main/java/nekiplay/meteorplus/mixin/meteorclient/FontsMixin.java
This file was deleted.
Oops, something went wrong.
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
134 changes: 0 additions & 134 deletions
134
src/main/java/nekiplay/meteorplus/mixinclasses/CustomTextRendererV2.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.