Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
big chungus
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoworange420 committed Dec 19, 2022
1 parent 5447ebf commit 8e9dad2
Show file tree
Hide file tree
Showing 34 changed files with 577 additions and 322 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/snoworange/mousse/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.Display;


//hi
@Mod(modid = Main.MOD_ID, name = Main.NAME, version = Main.VERSION, acceptedMinecraftVersions = "[1.12.2]")
public class Main {

Expand All @@ -38,7 +38,7 @@ public class Main {

public static final String MOD_ID = "mousse";
public static final String NAME = "Mousse";
public static final String VERSION = "v0.7.4";
public static final String VERSION = "v0.8.0";

public static Minecraft mc = Minecraft.getMinecraft();

Expand Down Expand Up @@ -66,7 +66,7 @@ public void init(FMLPreInitializationEvent event) {
themeManager = new ThemeManager();

ClickGUI = new KeyBinding("ClickGUI", Keyboard.KEY_NONE, "Mousse");
ShulkerPeek = new KeyBinding("ShulkerPreview Peek Binding", Keyboard.KEY_RCONTROL, "Mousse");
ShulkerPeek = new KeyBinding("ShulkerPreview Peek Binding", Keyboard.KEY_NONE, "Mousse");

ClientRegistry.registerKeyBinding(ClickGUI);
ClientRegistry.registerKeyBinding(ShulkerPeek);
Expand Down Expand Up @@ -104,7 +104,7 @@ public static void sendMessage(String msg) {

if (Minecraft.getMinecraft().world == null || Minecraft.getMinecraft().player == null) return;

Minecraft.getMinecraft().player.sendMessage(new TextComponentString( ChatFormatting.RESET + "[" + Main.NAME + "] " + msg));
Minecraft.getMinecraft().player.sendMessage(new TextComponentString( ChatFormatting.DARK_GREEN + "[" + Main.NAME + "] " + ChatFormatting.RESET + msg));
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.snoworange.mousse.event.listeners;

import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Cancelable
public class RenderPortalOverlayEvent extends Event {

public float timeInPortal;
public ScaledResolution scaledRes;
public CallbackInfo ci;

public RenderPortalOverlayEvent(float timeInPortal, ScaledResolution scaledRes, CallbackInfo ci) {
this.timeInPortal = timeInPortal;
this.scaledRes = scaledRes;
this.ci = ci;
}
}
11 changes: 11 additions & 0 deletions src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiChat.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.snoworange.mousse.mixin.mixins;

import com.snoworange.mousse.Main;
import com.snoworange.mousse.command.CommandManager;
import com.snoworange.mousse.module.modules.render.CleanGUI;
import com.snoworange.mousse.util.render.RenderUtils2;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiChat;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.Shadow;
import net.minecraft.client.gui.GuiTextField;
Expand All @@ -23,4 +27,11 @@ public void drawScreen(final int mouseX, final int mouseY, final float partialTi
RenderUtils2.drawChatboxOutline();
}
}

@Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V"))
private void drawRectBackgroundClean(int left, int top, int right, int bottom, int color) {
if (!Main.moduleManager.getModule("CleanGUI").isEnabled()) {
Gui.drawRect(left, top, right, bottom, color);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.snoworange.mousse.mixin.mixins;

import com.snoworange.mousse.event.listeners.RenderPortalOverlayEvent;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.common.MinecraftForge;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin({GuiIngame.class})
public class MixinGuiIngame {

@Inject(at = @At("HEAD"), method = {"renderPortal"}, cancellable = true)
public void onRenderPortalOverlay(float timeInPortal, ScaledResolution scaledRes, CallbackInfo ci) {
final RenderPortalOverlayEvent event = new RenderPortalOverlayEvent(timeInPortal, scaledRes, ci);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
ci.cancel();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class MixinGuiMainMenu extends GuiScreen {
@Inject(method = {"drawScreen"}, at = {@At("TAIL")}, cancellable = true)
public void drawText(int mouseX, int mouseY, float partialTicks, CallbackInfo ci) {
FontRenderer fr = mc.fontRenderer;
fr.drawStringWithShadow(Main.NAME + " by Jonakip, Snoworange & Huub", 2, 12, -1);
fr.drawStringWithShadow(Main.NAME + " by Snoworange and Huub", 2, 12, -1);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.snoworange.mousse.mixin.mixins;

import com.snoworange.mousse.Main;
import com.snoworange.mousse.module.modules.render.ShulkerPreview;
import com.snoworange.mousse.module.modules.misc.Tooltip;
import com.snoworange.mousse.util.render.ParticleUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
Expand Down Expand Up @@ -45,8 +45,8 @@ private void drawWorldBackgroundWrapper(final int tint, final CallbackInfo ci) {

@Inject(method = { "renderToolTip" }, at = { @At("HEAD") }, cancellable = true)
public void renderToolTip(final ItemStack itemStack, final int x, final int y, final CallbackInfo ci) {
if (Main.moduleManager.getModule("ShulkerPreview").isEnabled()) {
ShulkerPreview.renderToolTip(itemStack, x, y, ci);
if (Main.moduleManager.getModule("Tooltip").isEnabled() && Tooltip.shulker.isEnable()) {
Tooltip.renderShulker(itemStack, x, y, ci);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.snoworange.mousse.mixin.mixins;

import com.snoworange.mousse.Main;
import com.snoworange.mousse.module.modules.misc.Tooltip;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ItemStack.class)
public class MixinItemStack {

//Impact skid lmfao

@Redirect(
method = {"getTooltip"},
at = @At(
value = "INVOKE",
target = "net/minecraft/item/ItemStack.isItemDamaged()Z"
)
)
private boolean isItemDamaged(ItemStack itemStack) {
try {
if (Main.moduleManager.getModule("Tooltip").isEnabled() && Tooltip.alwaysDura.isEnable()) {
return true;
}
} catch (NullPointerException nullPointerException) {
Main.sendMessage(nullPointerException.toString());
nullPointerException.printStackTrace();
}

return itemStack.isItemDamaged();
}
}
//moice
24 changes: 19 additions & 5 deletions src/main/java/com/snoworange/mousse/module/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import com.mojang.realmsclient.gui.ChatFormatting;
import com.snoworange.mousse.Main;
import com.snoworange.mousse.setting.Setting;
import com.snoworange.mousse.util.chat.ChatUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.MinecraftForge;

import java.util.ArrayList;
Expand All @@ -19,7 +21,7 @@ public abstract class Module {
public boolean toggled;

public int type;
public List<Setting> settings = new ArrayList<Setting>();
public List<Setting<?>> settings = new ArrayList<Setting<?>>();

public Minecraft mc = Minecraft.getMinecraft();

Expand Down Expand Up @@ -121,15 +123,23 @@ public final void toggle() {

public void onEnable() {
MinecraftForge.EVENT_BUS.register(this);

if (Main.moduleManager.getModule("Announcer").isToggled() && !Objects.equals(this.name, "ShulkerPeek") && !Objects.equals(this.name, "GuiTheme")) {
Main.sendMessage(this.name + ChatFormatting.GREEN + " enabled." + ChatFormatting.RESET);

if (mc.world != null) {
ChatUtils.sendMessage("{}" + TextFormatting.GREEN + " enabled.", this.name);
}
}
}

public void onDisable() {
MinecraftForge.EVENT_BUS.register(this);

if (Main.moduleManager.getModule("Announcer").isToggled() && !Objects.equals(this.name, "ShulkerPeek") && !Objects.equals(this.name, "GuiTheme")) {
Main.sendMessage(this.name + ChatFormatting.RED + " disabled." + ChatFormatting.RESET);

if (mc.world != null) {
ChatUtils.sendMessage("{}" + TextFormatting.RED + " disabled.", this.name);
}
}
}

Expand Down Expand Up @@ -171,7 +181,11 @@ public void init() {

}

public Setting getSettingByName(final String s) {
return this.settings.stream().findFirst().orElse(null);
}

public void addSetting(Setting... settings) {
this.settings.addAll(Arrays.asList(settings));
this.settings.addAll(Arrays.<Setting<?>>asList(settings));
}
}
}
22 changes: 14 additions & 8 deletions src/main/java/com/snoworange/mousse/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.snoworange.mousse.module.modules.movement.*;
import com.snoworange.mousse.module.modules.player.*;
import com.snoworange.mousse.module.modules.render.*;
import com.snoworange.mousse.module.modules.system.GuiTheme;
import com.snoworange.mousse.module.modules.system.HUD;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
Expand Down Expand Up @@ -46,6 +47,7 @@ public ModuleManager() {
modules.add(new ThreadAura());
modules.add(new Info32k());
modules.add(new AutoCrystal());
modules.add(new AutoTotem());

//EXPLOIT
modules.add(new SecretClose());
Expand Down Expand Up @@ -76,8 +78,7 @@ public ModuleManager() {
modules.add(new DiscordRPC());
modules.add(new Announcer());
modules.add(new GuiTheme());
//modules.add(new TrueDurability());
//modules.add(new DebugModule());
modules.add(new Tooltip());

//RENDER
modules.add(new ShulkerPeek());
Expand All @@ -86,7 +87,7 @@ public ModuleManager() {
modules.add(new LightningBolt());
modules.add(new HopperRadius());
modules.add(new Particles());
modules.add(new ShulkerPreview());
modules.add(new SelectionHighlight());

//WORK IN PROGRESS

Expand Down Expand Up @@ -129,11 +130,16 @@ public static List<Module> getModulesByCategory(Category c) {

@SubscribeEvent
public void onTick(TickEvent.ClientTickEvent event) {
modules.forEach(module -> {
if (module.isEnabled()) {
module.onTick();
}
});
try {
modules.forEach(module -> {
if (module.isEnabled()) {
module.onTick();
}
});
} catch (Exception e) {
e.printStackTrace();
Main.sendMessage(e.toString());
}
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class AimDispenser32k extends Module {

public AimDispenser32k() {
super("AimDispenser32k", "old auto32k lol", Category.COMBAT);
super("Aim32k", "old auto32k lol", Category.COMBAT);
}

BlockPos obsidianPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public void onEnable() {
}
}

/*
@SubscribeEvent
public void onPacketSend(final PacketEvent.Send event) {
if (event.getPacket() instanceof CPacketUseEntity) {
Expand All @@ -67,14 +66,10 @@ public void onPacketSend(final PacketEvent.Send event) {
final Entity target = packet.getEntityFromWorld((World) mc.world);
if (target instanceof EntityPlayer) {
AutoEz.targets.put(target.getName(), (EntityPlayer)target);
Main.sendMessage("Found target!");
}
}
}
}
*/

@SubscribeEvent
public void onLivingUpdateEvent(LivingEvent.LivingUpdateEvent event) {
if (this.toggled && event.getEntityLiving() instanceof EntityPlayer) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.snoworange.mousse.module.modules.combat;

import com.snoworange.mousse.module.Category;
import com.snoworange.mousse.module.Module;
import com.snoworange.mousse.util.entity.InventoryUtils;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.init.Items;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

public class AutoTotem extends Module {

public AutoTotem() {
super("AutoTotem", "totem", Category.COMBAT);
}

@Override
public void onEnable() {
super.onEnable();
}

@Override
public void onDisable() {
super.onDisable();
}

@SubscribeEvent
public void onFastTick(TickEvent event) {
if (this.isEnabled()) {

if (mc.world != null && mc.player != null && mc.player.getHeldItemOffhand().getItem() != Items.TOTEM_OF_UNDYING && !(mc.currentScreen instanceof GuiContainer)) {
int totemSlot = InventoryUtils.findInv(Items.TOTEM_OF_UNDYING);
if (totemSlot != -1) {
InventoryUtils.swapItem(totemSlot, 45);
}
}
}
}
}
Loading

0 comments on commit 8e9dad2

Please sign in to comment.