use of mathax.client.systems.modules.client.ClientSpoof in project Client by MatHax.
the class ChatHudMixin method drawIcon.
private void drawIcon(MatrixStack matrices, String line, int y, float opacity) {
ClientSpoof cs = Modules.get().get(ClientSpoof.class);
if (getMatHax().matcher(line).find()) {
if (cs.changeChatFeedbackIcon())
RenderSystem.setShaderTexture(0, METEOR_CHAT_ICON);
else
RenderSystem.setShaderTexture(0, MATHAX_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 0);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
} else if (getMatHax2().matcher(line).find()) {
if (cs.changeChatFeedbackIcon())
RenderSystem.setShaderTexture(0, METEOR_CHAT_ICON);
else
RenderSystem.setShaderTexture(0, MATHAX_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 0);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
} else if (BARITONE_PREFIX_REGEX.matcher(line).find()) {
RenderSystem.setShaderTexture(0, BARITONE_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 10);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
} else if (BARITONE_PREFIX_REGEX_2.matcher(line).find()) {
RenderSystem.setShaderTexture(0, BARITONE_CHAT_ICON);
matrices.push();
RenderSystem.setShaderColor(1, 1, 1, opacity);
matrices.translate(0, y, 10);
matrices.scale(0.125f, 0.125f, 1);
DrawableHelper.drawTexture(matrices, 0, 0, 0f, 0f, 64, 64, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
matrices.pop();
return;
}
Identifier skin = getMessageTexture(line);
if (skin != null) {
RenderSystem.setShaderColor(1, 1, 1, opacity);
RenderSystem.setShaderTexture(0, skin);
DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 8.0F, 8.0F, 8, 8, 64, 64);
DrawableHelper.drawTexture(matrices, 0, y, 8, 8, 40.0F, 8.0F, 8, 8, 64, 64);
RenderSystem.setShaderColor(1, 1, 1, 1);
}
}
use of mathax.client.systems.modules.client.ClientSpoof in project Client by MatHax.
the class ChatUtils method getMatHaxPrefix.
private static BaseText getMatHaxPrefix() {
ClientSpoof cs = Modules.get().get(ClientSpoof.class);
BaseText text = new LiteralText("MatHax");
if (cs.changeChatFeedback())
text = new LiteralText(cs.chatFeedbackText.get());
BaseText prefix = new LiteralText("");
if (cs.changeChatFeedbackColor())
text.setStyle(text.getStyle().withColor(cs.chatFeedbackTextColor.get().getPacked()));
else
text.setStyle(text.getStyle().withColor(MatHax.INSTANCE.MATHAX_COLOR.getPacked()));
prefix.setStyle(prefix.getStyle().withFormatting(Formatting.GRAY));
prefix.append("[");
prefix.append(text);
prefix.append("] ");
return prefix;
}
use of mathax.client.systems.modules.client.ClientSpoof in project Client by MatHax.
the class MatHax method onInitializeClient.
@Override
public void onInitializeClient() {
// Instance
if (INSTANCE == null) {
INSTANCE = this;
return;
}
// Log
LOG.info("Initializing MatHax " + Version.getStylized() + " for Minecraft " + Version.getMinecraft() + "...");
// Global Minecraft client accessor
mc = MinecraftClient.getInstance();
// Icon & Title
WindowUtils.MatHax.setIcon();
WindowUtils.MatHax.setTitleLoading();
// Register event handlers
EVENT_BUS.registerLambdaFactory("mathax.client", (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup()));
// Pre-load
Systems.addPreLoadTask(() -> {
if (!FOLDER.exists()) {
FOLDER.getParentFile().mkdirs();
FOLDER.mkdir();
// ACTIVATE
// CAPES
Modules.get().get(CapesModule.class).forceToggle(true);
// DISCORD RPC
Modules.get().get(DiscordRPC.class).forceToggle(true);
// BACKGROUND
Modules.get().get(Background.class).forceToggle(true);
// MIDDLE CLICK FRIEND
Modules.get().get(MiddleClickFriend.class).forceToggle(true);
// VISIBILITY
// CLIENT SPOOF
Modules.get().get(ClientSpoof.class).setVisible(false);
// CAPES
Modules.get().get(CapesModule.class).setVisible(false);
// DISCORD RPC
Modules.get().get(DiscordRPC.class).setVisible(false);
// BACKGROUND
Modules.get().get(Background.class).setVisible(false);
// MIDDLE CLICK FRIEND
Modules.get().get(MiddleClickFriend.class).setVisible(false);
// ZOOM
Modules.get().get(Zoom.class).setVisible(false);
// KEYBINDS
// ZOOM
Modules.get().get(Zoom.class).keybind.set(KeyBind.fromKey(GLFW.GLFW_KEY_C));
// KEYBIND OPTIONS
// ZOOM
Modules.get().get(Zoom.class).toggleOnBindRelease = true;
// TOASTS
// ANCHOR AURA
Modules.get().get(AnchorAura.class).setToggleToast(true);
// BED AURA
Modules.get().get(BedAura.class).setToggleToast(true);
// CEV BREAKER
Modules.get().get(CEVBreaker.class).setToggleToast(true);
// CRYSTAL AURA
Modules.get().get(CrystalAura.class).setToggleToast(true);
// KILL AURA
Modules.get().get(KillAura.class).setToggleToast(true);
// MESSAGES
// ZOOM
Modules.get().get(Zoom.class).setToggleMessage(false);
}
// HUD
if (!Systems.get(HUD.class).getFile().exists())
Systems.get(HUD.class).reset.run();
});
// Pre init
Utils.init();
GL.init();
Shaders.init();
Renderer2D.init();
EntityShaders.initOutlines();
MatHaxExecutor.init();
BlockIterator.init();
EChestMemory.init();
Rotations.init();
Names.init();
FakeClientPlayer.init();
PostProcessRenderer.init();
Tabs.init();
GuiThemes.init();
Fonts.init();
DamageUtils.init();
BlockUtils.init();
Music.init();
// Register module categories
Categories.init();
// Load systems
Systems.init();
// Event bus
EVENT_BUS.subscribe(this);
// Sorting modules
Modules.get().sortModules();
// Load saves
Systems.load();
// Post init
Fonts.load();
GuiRenderer.init();
GuiThemes.postInit();
RainbowColors.init();
// Title
WindowUtils.MatHax.setTitleLoaded();
// Shutdown hook
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
DiscordRPC.disable();
Systems.save();
GuiThemes.save();
}));
// Icon & Title
ClientSpoof cs = Modules.get().get(ClientSpoof.class);
if (cs.isActive() && cs.changeWindowIcon())
WindowUtils.Meteor.setIcon();
else
WindowUtils.MatHax.setIcon();
if (cs.isActive() && cs.changeWindowTitle())
WindowUtils.Meteor.setTitle();
else
WindowUtils.MatHax.setTitle();
// Log
LOG.info("MatHax " + Version.getStylized() + " initialized for Minecraft " + Version.getMinecraft() + "!");
}
Aggregations