Начинающий
- Статус
- Оффлайн
- Регистрация
- 21 Ноя 2021
- Сообщения
- 64
- Реакции
- 1
- Выберите загрузчик игры
- Fabric
Для начала напишем миксин:
затем напишем модуль (адаптируйте под свой чит)
джавассс:
@Mixin(TextVisitFactory.class)
public class TextVisitFactoryInvoke {
@Unique
private static boolean renderaahh = false;
@Inject(
method = "visitFormatted(Ljava/lang/String;ILnet/minecraft/text/Style;Lnet/minecraft/text/CharacterVisitor;)Z",
at = @At("HEAD"),
cancellable = true
)
private static void adjustText(String text, int startIndex, Style style, CharacterVisitor visitor, CallbackInfoReturnable<Boolean> cir) {
if (text.contains("Статус:") && style.getFont() != null && style.getFont().equals(Identifier.of("minecraft:default"))) {
renderaahh = true;
TextVisitFactory.visitFormatted(text, startIndex, style, style, visitor);
cir.setReturnValue(true);
return;
}
if (renderaahh && style.getFont() != null && style.getFont().equals(Identifier.of("custom:groups/default"))) {
StreamerMode streamerMode = (StreamerMode) Pasxalka.getInstance().getModuleRepository().find(StreamerMode.class);
String dooo = "default";
if (streamerMode.getEnabled())
{
dooo = streamerMode.getResourceKey();
}
Style newStyle = style.withFont(Identifier.of("custom:groups/" + dooo));
TextVisitFactory.visitFormatted(text, startIndex, newStyle, newStyle, visitor);
renderaahh = false;
cir.setReturnValue(true);
return;
}
if (!text.equals("Статус: ") && renderaahh) {
renderaahh = false;
}
TextVisitFactory.visitFormatted(text, startIndex, style, style, visitor);
cir.setReturnValue(true);
}
}
затем напишем модуль (адаптируйте под свой чит)
джависсс:
ModeSetting mode = new ModeSetting(Text.of("Донат"), null, () -> true)
.set("Игрок", "Гидра", "Цербер", "Тритон", "Феникс", "Пандар", "Жара", "Холод", "Кронос", "Лето", "Зима", "Фобос", "Арес", "Аристократ", "Ютубер", "Хелпер", "Ст Хелпер", "Модер", "Ст Модер", "Админ")
.register(this);
public StreamerMode() {
super(Text.of("StreamerMode"), null, Category.Miscellaneous);
}
public String getResourceKey()
{
switch (mode.getValue())
{
case "Гидра": return "hydra";
case "Цербер": return "cerberus";
case "Тритон": return "triton";
case "Феникс": return "phoenix";
case "Пандар": return "pandar";
case "Жара": return "heat";
case "Холод": return "cold";
case "Кронос": return "kronos";
case "Лето": return "summer";
case "Зима": return "winter";
case "Фобос": return "phobos";
case "Арес": return "ares";
case "Аристократ": return "aristocrat";
case "Ютубер": return "youtuber";
case "Хелпер": return "helper";
case "Ст Хелпер": return "shelper";
case "Модер": return "moder";
case "Ст Модер": return "smoder";
case "Админ": return "admin";
default: return "default";
}
}