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

Commit be75d11

Browse files
author
Snoworange420
committed
je moerde
1 parent ca506db commit be75d11

File tree

12 files changed

+195
-44
lines changed

12 files changed

+195
-44
lines changed

src/main/java/com/snoworange/mousse/Main.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class Main {
2929
public static ModuleManager moduleManager;
3030
public static Hud hud;
3131
public static KeyBinding ClickGUI;
32+
public static KeyBinding ShulkerPeek;
3233
public static ThemeManager themeManager;
3334
public static CommandManager commandManager;
3435
public static ClickGui clickgui;
@@ -37,7 +38,7 @@ public class Main {
3738

3839
public static final String MOD_ID = "mousse";
3940
public static final String NAME = "Mousse";
40-
public static final String VERSION = "v0.6.2";
41+
public static final String VERSION = "v0.6.3";
4142

4243
public static Minecraft mc = Minecraft.getMinecraft();
4344

@@ -65,7 +66,10 @@ public void init(FMLPreInitializationEvent event) {
6566
themeManager = new ThemeManager();
6667

6768
ClickGUI = new KeyBinding("ClickGUI", Keyboard.KEY_NONE, "Mousse");
69+
ShulkerPeek = new KeyBinding("ShulkerPreview Peek Binding", Keyboard.KEY_RCONTROL, "Mousse");
70+
6871
ClientRegistry.registerKeyBinding(ClickGUI);
72+
ClientRegistry.registerKeyBinding(ShulkerPeek);
6973

7074
this.initFilesystem();
7175
}

src/main/java/com/snoworange/mousse/mixin/mixins/MixinGuiNewChat.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.spongepowered.asm.mixin.Shadow;
1010
import org.spongepowered.asm.mixin.injection.At;
1111
import org.spongepowered.asm.mixin.injection.Redirect;
12+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1213

1314
import java.util.List;
1415

@@ -20,9 +21,9 @@ public abstract class MixinGuiNewChat {
2021
@Shadow @Final private List<ChatLine> drawnChatLines;
2122

2223
@Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V"))
23-
private void drawRectBackgroundClean(int left, int top, int right, int bottom, int color) {
24-
if (!Main.moduleManager.getModule("CleanGUI").isToggled()) {
25-
Gui.drawRect(left, top, right, bottom, color);
24+
private void drawRectBackgroundClean(int left, int top, int right, int bottom, int color, CallbackInfo callbackInfo) {
25+
if (Main.moduleManager.getModule("CleanGUI").isEnabled()) {
26+
callbackInfo.cancel();
2627
}
2728
}
2829
}

src/main/java/com/snoworange/mousse/module/Module.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ public Module(String name, String description, Category category, int type) {
4343
init();
4444
}
4545

46+
public Module(String name, String description, Category category, int type, boolean toggled) {
47+
super();
48+
this.name = name;
49+
this.description = description;
50+
this.key = 0;
51+
this.category = category;
52+
this.toggled = toggled;
53+
init();
54+
}
55+
56+
public int getType() {
57+
return this.type;
58+
}
59+
4660
public String getName() {
4761
return this.name;
4862
}
@@ -79,6 +93,10 @@ public boolean isDisabled() {
7993
return !toggled;
8094
}
8195

96+
public boolean hasSettings() {
97+
return this.settings.size() > 0;
98+
}
99+
82100
public void setToggled(boolean toggled) {
83101
if (toggled) {
84102
if (!this.toggled) {

src/main/java/com/snoworange/mousse/module/ModuleManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.snoworange.mousse.module.modules.movement.*;
1010
import com.snoworange.mousse.module.modules.player.*;
1111
import com.snoworange.mousse.module.modules.render.*;
12+
import com.snoworange.mousse.module.modules.system.HUD;
1213
import net.minecraft.client.Minecraft;
1314
import net.minecraft.entity.Entity;
1415
import net.minecraft.entity.player.EntityPlayer;
@@ -46,6 +47,7 @@ public ModuleManager() {
4647
modules.add(new Notify32k());
4748
//modules.add(new Dispenser32kRewrite());
4849
modules.add(new ThreadAura());
50+
modules.add(new Info32k());
4951

5052
//EXPLOIT
5153
modules.add(new SecretClose());
@@ -63,6 +65,7 @@ public ModuleManager() {
6365
modules.add(new ReverseStep());
6466
modules.add(new ShiftSpam());
6567
modules.add(new IceSpeed());
68+
modules.add(new Rubberband());
6669

6770
//PLAYER
6871
modules.add(new NoFall());
@@ -90,6 +93,10 @@ public ModuleManager() {
9093

9194
//WORK IN PROGRESS
9295

96+
97+
//System
98+
modules.add(new HUD());
99+
93100
instance = this;
94101
}
95102

src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32k.java

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343

4444
public class Dispenser32k extends Module {
4545

46+
//Obfed (fr)
47+
4648
public BlockPos placedPos;
4749
public BlockPos redstonePos;
4850
public BlockPos renderHopperPos;
@@ -94,7 +96,7 @@ public void init() {
9496
blockShulker = new BooleanSetting("Block Shulker", false);
9597
disableOnDeath = new BooleanSetting("Disable on Death", true);
9698

97-
addSetting(autoClose, /* redstoneDelay, */ fastHopper, allowVertical, renderCircle, silentSwap, swapToSuperweaponIndex, speed, autoDisable, openHopperWithPacket, disableOnDeath);
99+
addSetting(autoClose, /* redstoneDelay, */ fastHopper, allowVertical, renderCircle, silentSwap, swapToSuperweaponIndex, speed, autoDisable, openHopperWithPacket, disableOnDeath, blockShulker);
98100
}
99101

100102
@Override
@@ -622,6 +624,47 @@ public void onUpdate(LivingEvent.LivingUpdateEvent event) {
622624

623625
placedHopper = true;
624626

627+
//obi
628+
if (blockShulker.enable) {
629+
630+
if (mc.world.getBlockState(closestHopperPos.up()).getBlock() instanceof BlockShulkerBox && !mc.world.getBlockState(closestHopperPos.up(2)).isFullBlock()) {
631+
632+
if (obsidianIndex != -1) {
633+
mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex));
634+
635+
if (!silentSwap.enable) {
636+
mc.player.inventory.currentItem = obsidianIndex;
637+
}
638+
639+
mc.playerController.updateController();
640+
641+
placeBlock(closestHopperPos.up(2));
642+
} else if (dispenserIndex != -1) {
643+
mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex));
644+
645+
if (!silentSwap.enable) {
646+
mc.player.inventory.currentItem = dispenserIndex;
647+
}
648+
649+
mc.playerController.updateController();
650+
651+
placeBlock(closestHopperPos.up(2));
652+
} else if (redstoneIndex != -1) {
653+
mc.player.connection.sendPacket(new CPacketHeldItemChange(redstoneIndex));
654+
655+
if (!silentSwap.enable) {
656+
mc.player.inventory.currentItem = redstoneIndex;
657+
}
658+
659+
mc.playerController.updateController();
660+
661+
placeBlock(closestHopperPos.up(2));
662+
} else {
663+
Main.sendMessage("bruh");
664+
}
665+
}
666+
}
667+
625668
//open hopper
626669

627670
if (openHopperWithPacket.enable) {
@@ -653,6 +696,50 @@ public void onUpdate(LivingEvent.LivingUpdateEvent event) {
653696
}
654697
}
655698

699+
if (fastHopper.enable && closestHopperPos != null) {
700+
if (mc.world.getBlockState(closestHopperPos.up()).getBlock() instanceof BlockShulkerBox) {
701+
702+
if (!mc.world.getBlockState(closestHopperPos.up(2)).isFullBlock()) {
703+
//obi
704+
if (blockShulker.enable) {
705+
if (obsidianIndex != -1) {
706+
mc.player.connection.sendPacket(new CPacketHeldItemChange(obsidianIndex));
707+
708+
if (!silentSwap.enable) {
709+
mc.player.inventory.currentItem = obsidianIndex;
710+
}
711+
712+
mc.playerController.updateController();
713+
714+
placeBlock(closestHopperPos.up(2));
715+
} else if (dispenserIndex != -1) {
716+
mc.player.connection.sendPacket(new CPacketHeldItemChange(dispenserIndex));
717+
718+
if (!silentSwap.enable) {
719+
mc.player.inventory.currentItem = dispenserIndex;
720+
}
721+
722+
mc.playerController.updateController();
723+
724+
placeBlock(closestHopperPos.up(2));
725+
} else if (redstoneIndex != -1) {
726+
mc.player.connection.sendPacket(new CPacketHeldItemChange(redstoneIndex));
727+
728+
if (!silentSwap.enable) {
729+
mc.player.inventory.currentItem = redstoneIndex;
730+
}
731+
732+
mc.playerController.updateController();
733+
734+
placeBlock(closestHopperPos.up(2));
735+
} else {
736+
Main.sendMessage("bruh");
737+
}
738+
}
739+
}
740+
}
741+
}
742+
656743
//Swap 32k
657744
if (enchantedSwordIndex == -1 && mc.player.openContainer != null && mc.player.openContainer instanceof ContainerHopper && mc.player.openContainer.inventorySlots != null && !mc.player.openContainer.inventorySlots.isEmpty()) {
658745
for (int i = 0; i < 5; i++) {

src/main/java/com/snoworange/mousse/module/modules/combat/Dispenser32kRewrite.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131

3232
public class Dispenser32kRewrite extends Module {
3333

34+
//TODO: this is broken why tf
35+
3436

3537
public int stage = 0;
3638
public BlockPos basePos;

src/main/java/com/snoworange/mousse/module/modules/player/Capes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public Capes() {
3131
public static final ResourceLocation SNOWORANGE_CAPE = new ResourceLocation("textures/snoworange_cape.png");
3232
public static final ResourceLocation JONAKIP_CAPE = new ResourceLocation("textures/jonakip_cape.png");
3333
public static final ResourceLocation HUUB_CAPE = new ResourceLocation("textures/huub_cape.png");
34-
public static final ResourceLocation ELMO_CAPE = new ResourceLocation("textures/elmo_cape.png");
34+
public static final ResourceLocation ELMO_CAPE = new ResourceLocation("textures/elmo_cape_fixed.png");
3535
public static final ResourceLocation PSEUDO_CAPE = new ResourceLocation("textures/pseudo_cape.png");
3636

3737
@Override

src/main/java/com/snoworange/mousse/module/modules/render/ShulkerPeek.java

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@
33
import com.snoworange.mousse.Main;
44
import com.snoworange.mousse.module.Category;
55
import com.snoworange.mousse.module.Module;
6+
import net.minecraft.block.Block;
7+
import net.minecraft.block.BlockChest;
8+
import net.minecraft.block.BlockDispenser;
9+
import net.minecraft.block.BlockDropper;
610
import net.minecraft.client.Minecraft;
11+
import net.minecraft.client.gui.GuiHopper;
712
import net.minecraft.client.gui.GuiScreen;
813
import net.minecraft.client.gui.inventory.GuiChest;
14+
import net.minecraft.client.gui.inventory.GuiDispenser;
15+
import net.minecraft.entity.player.InventoryPlayer;
16+
import net.minecraft.init.Blocks;
917
import net.minecraft.init.SoundEvents;
1018
import net.minecraft.inventory.IInventory;
1119
import net.minecraft.inventory.InventoryBasic;
1220
import net.minecraft.inventory.ItemStackHelper;
21+
import net.minecraft.item.Item;
1322
import net.minecraft.item.ItemShulkerBox;
1423
import net.minecraft.item.ItemStack;
1524
import net.minecraft.nbt.NBTTagCompound;
@@ -25,10 +34,10 @@ public ShulkerPeek() {
2534
super("ShulkerPeek", "", Category.RENDER, 1);
2635
}
2736

28-
private static InventoryBasic getFromItemNBT(NBTTagCompound tag) {
37+
public static InventoryBasic getFromItemNBT(NBTTagCompound tag) {
2938

30-
NonNullList items = NonNullList.withSize((int)27, (Object) ItemStack.EMPTY);
31-
String customName = "Shulker Box";
39+
NonNullList items = NonNullList.withSize((int) 27, (Object) ItemStack.EMPTY);
40+
String customName = "";
3241
if (tag.hasKey("Items", 9)) {
3342
ItemStackHelper.loadAllItems((NBTTagCompound) tag, (NonNullList) items);
3443
}
@@ -55,30 +64,28 @@ public void onDisable() {
5564
@SubscribeEvent
5665
public void onUpdate(LivingEvent.LivingUpdateEvent event) {
5766
if (this.toggled) {
58-
ItemStack stack = null;
59-
60-
if (mc.player.getHeldItemMainhand() == ItemStack.EMPTY) {
61-
if (!mc.player.getHeldItemOffhand().isEmpty() && mc.player.getHeldItemOffhand().getItem() instanceof ItemShulkerBox) {
62-
stack = mc.player.getHeldItemOffhand();
63-
} else {
64-
Main.sendMessage("Coudn't find shulker box in your hands!");
65-
}
66-
} else {
67-
stack = mc.player.getHeldItemMainhand();
68-
}
67+
ItemStack stack = mc.player.getHeldItemMainhand();
6968

7069
//Open shulker box
71-
if (stack != null && !stack.isEmpty() && stack.getItem() instanceof ItemShulkerBox) {
72-
if (stack.hasTagCompound()) {
73-
mc.displayGuiScreen((GuiScreen) new GuiChest((IInventory) mc.player.inventory, (IInventory) getFromItemNBT(stack.getTagCompound().getCompoundTag("BlockEntityTag"))));
74-
} else {
75-
mc.displayGuiScreen((GuiScreen) new GuiChest((IInventory) mc.player.inventory, (IInventory) new InventoryBasic("Shulker Box", true, 27)));
70+
if (!stack.isEmpty()) {
71+
if (stack.hasTagCompound() && stack.getTagCompound() != null)
72+
{
73+
if ((stack.getItem() instanceof ItemShulkerBox) || (stack.getItem().equals(Item.getItemFromBlock(Blocks.CHEST)))) {
74+
mc.displayGuiScreen((GuiScreen) new GuiChest((IInventory) mc.player.inventory, (IInventory) getFromItemNBT(stack.getTagCompound().getCompoundTag("BlockEntityTag"))));
75+
} else if (stack.getItem().equals(Item.getItemFromBlock(Blocks.DISPENSER)) || stack.getItem().equals(Item.getItemFromBlock(Blocks.DROPPER))) {
76+
mc.displayGuiScreen((GuiScreen) new GuiDispenser((InventoryPlayer) mc.player.inventory, (IInventory) getFromItemNBT(stack.getTagCompound().getCompoundTag("BlockEntityTag"))));
77+
} else if (stack.getItem().equals(Item.getItemFromBlock(Blocks.HOPPER))) {
78+
mc.displayGuiScreen((GuiScreen) new GuiHopper((InventoryPlayer) mc.player.inventory, (IInventory) getFromItemNBT(stack.getTagCompound().getCompoundTag("BlockEntityTag"))));
79+
}
7680
}
7781

82+
/*
7883
Main.sendMessage("Opened shulker box.");
7984
mc.world.playSound(mc.player, mc.player.posX, mc.player.posY, mc.player.posZ, SoundEvents.BLOCK_SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5f, 1.0f);
85+
86+
*/
8087
} else {
81-
Main.sendMessage("Coudn't find shulker box in your hands!");
88+
Main.sendMessage("Coudn't find any container in your hands!");
8289
}
8390

8491
disable();

src/main/java/com/snoworange/mousse/module/modules/render/ShulkerPreview.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
package com.snoworange.mousse.module.modules.render;
22

3+
import com.snoworange.mousse.Main;
34
import com.snoworange.mousse.module.Category;
45
import com.snoworange.mousse.module.Module;
56
import net.minecraft.client.Minecraft;
67
import net.minecraft.client.gui.Gui;
8+
import net.minecraft.client.gui.GuiScreen;
9+
import net.minecraft.client.gui.inventory.GuiChest;
710
import net.minecraft.client.renderer.GlStateManager;
811
import net.minecraft.client.renderer.RenderHelper;
12+
import net.minecraft.init.SoundEvents;
13+
import net.minecraft.inventory.IInventory;
14+
import net.minecraft.inventory.InventoryBasic;
915
import net.minecraft.inventory.ItemStackHelper;
16+
import net.minecraft.item.ItemShulkerBox;
1017
import net.minecraft.item.ItemStack;
1118
import net.minecraft.nbt.NBTTagCompound;
1219
import net.minecraft.util.NonNullList;
1320
import net.minecraft.util.ResourceLocation;
21+
import net.minecraft.util.SoundCategory;
1422
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1523

1624
public class ShulkerPreview extends Module {
1725

18-
private static final ResourceLocation SHULKER_GUI_TEXTURE = new ResourceLocation("textures/27slots.png");;
26+
private static final ResourceLocation SHULKER_GUI_TEXTURE = new ResourceLocation("textures/27slots.png");
1927

2028
public ShulkerPreview() {
2129
super("ShulkerPreview", "ur dad", Category.RENDER);
@@ -30,10 +38,6 @@ public void onEnable() {
3038
public void onDisable() {
3139
super.onDisable();
3240
}
33-
public static int itemX = 16;
34-
public static int itemY = -98;
35-
public static int itemTextureX = 8;
36-
public static int itemTextureY = -97;
3741

3842
public static Minecraft mc = Minecraft.getMinecraft();
3943

@@ -56,7 +60,7 @@ public static void renderToolTip(final ItemStack itemStack, final int n, final i
5660

5761
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
5862
mc.getTextureManager().bindTexture(SHULKER_GUI_TEXTURE);
59-
Gui.drawModalRectWithCustomSizedTexture(n + itemTextureX, n2 + itemTextureY, 0, 0, 256, 256, 256, 256);
63+
Gui.drawModalRectWithCustomSizedTexture(n + 8, n2 - 97, 0, 0, 256, 256, 256, 256);
6064

6165
GlStateManager.enableBlend();
6266
GlStateManager.enableAlpha();
@@ -67,8 +71,8 @@ public static void renderToolTip(final ItemStack itemStack, final int n, final i
6771

6872
for (int i = 0; i < nonnulllist.size(); ++i) {
6973

70-
final int iX = n + itemX + i % 9 * 18;
71-
final int iY = n2 + itemY + ((i / 9 + 1) * 18) + 1;
74+
final int iX = n + 16 + i % 9 * 18;
75+
final int iY = n2 - 98 + ((i / 9 + 1) * 18) + 1;
7276

7377
final ItemStack stack = (ItemStack) nonnulllist.get(i);
7478
mc.getRenderItem().renderItemAndEffectIntoGUI(stack, iX, iY);

0 commit comments

Comments
 (0)