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

Commit

Permalink
wait why didnt i push it?
Browse files Browse the repository at this point in the history
  • Loading branch information
Snoworange420 committed Dec 9, 2022
1 parent 25e0a7a commit 17288a0
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/snoworange/mousse/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.1";
public static final String VERSION = "v0.7.4";

public static Minecraft mc = Minecraft.getMinecraft();

Expand Down Expand Up @@ -114,4 +114,4 @@ public void displayGuiScreen(TickEvent.ClientTickEvent event) {
mc.displayGuiScreen(new ClickGui());
}
}
}
}
7 changes: 2 additions & 5 deletions src/main/java/com/snoworange/mousse/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import net.minecraftforge.fml.common.gameevent.TickEvent;

import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;

import static com.snoworange.mousse.Main.mc;

Expand All @@ -41,9 +39,8 @@ public ModuleManager() {
modules.add(new Criticals());
modules.add(new AutoArmor());
modules.add(new FastAura());
modules.add(new AutoAuto32k());
modules.add(new Grab32k());
modules.add(new Auto32k2019());
modules.add(new AimDispenser32k());
modules.add(new Notify32k());
modules.add(new Dispenser32kRewrite());
modules.add(new ThreadAura());
Expand All @@ -64,7 +61,7 @@ public ModuleManager() {
modules.add(new ReverseStep());
modules.add(new ShiftSpam());
modules.add(new IceSpeed());
modules.add(new Rubberband());
modules.add(new MotionTP32k());

//PLAYER
modules.add(new NoFall());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class Dispenser32kRewrite extends Module {
BooleanSetting autoClose;
BooleanSetting autoDisable;
BooleanSetting refillShulker;
BooleanSetting select32kSlot;

public Dispenser32kRewrite() {
super("Dispenser32kNew", "rewrite", Category.COMBAT);
Expand All @@ -61,8 +62,9 @@ public void init() {
autoClose = new BooleanSetting("Auto Close", true);
autoDisable = new BooleanSetting("Auto Disable", true);
refillShulker = new BooleanSetting("Refill Shulker", true);
select32kSlot = new BooleanSetting("Select 32k Slot", false);

addSetting(silent, swing, rotate, smartRedstone, autoClose, autoDisable, refillShulker);
addSetting(silent, swing, rotate, smartRedstone, autoClose, autoDisable, refillShulker, select32kSlot);
}

@Override
Expand All @@ -74,7 +76,6 @@ public void onEnable() {
redstonePos = null;
tempBasePos = null;
dispenserDirection = null;
placeVertically = false;
}

@Override
Expand All @@ -85,7 +86,7 @@ public void onDisable() {
}

@SubscribeEvent
public void onTick(TickEvent.PlayerTickEvent event) {
public void onTick(TickEvent.ClientTickEvent event) {
if (this.isEnabled()) {

if (mc.player == null || mc.world == null) return;
Expand Down Expand Up @@ -116,7 +117,7 @@ public void onTick(TickEvent.PlayerTickEvent event) {
shulkerIndex = i;
}

if (itemStack.getItem().equals(Items.DIAMOND_SWORD) && EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, itemStack) >= Short.MAX_VALUE) {
if (itemStack.getItem().equals(Items.DIAMOND_SWORD) && EnchantmentHelper.getEnchantmentLevel(Enchantments.SHARPNESS, itemStack) >= Enchantments.SHARPNESS.getMaxLevel()) {
enchantedSwordIndex = i;
}
}
Expand All @@ -140,30 +141,22 @@ public void onTick(TickEvent.PlayerTickEvent event) {

if (stage == 0) {

//placin' time
//Normal placement
if (basePos == null) {
for (int j = 0; j < 3; j++) {
if (basePos == null) {

if (j == 0) {
searchBestPlacement();
}
searchBestPlacement();

//1 tick later then common placement, need fix
if (j == 1) {
searchBestPlacementVertically();
}
//search if we can place vertically when after searching for invalid placement
if (basePos == null) {
searchBestPlacementVertically();

//2 tick :skull:
if (j == 2) {
//if even thats not possible place block and continue
if (basePos == null) {

//place block if we cant find any possible placements
update(dispenserIndex);
placeBlock(tempBasePos);
//place block so we can place (?)
update(dispenserIndex);
placeBlock(tempBasePos);

//1 tick faster boi
searchBestPlacement();
}
searchBestPlacement();
}
}
}
Expand Down Expand Up @@ -350,6 +343,12 @@ public void onTick(TickEvent.PlayerTickEvent event) {
}
}

if (select32kSlot.isEnable() && airIndex != -1) {
mc.player.connection.sendPacket(new CPacketHeldItemChange(airIndex));
mc.player.inventory.currentItem = airIndex;
mc.playerController.updateController();
}

mc.playerController.windowClick(mc.player.openContainer.windowId, enchantedSwordIndex, airIndex == -1 ? mc.player.inventory.currentItem : airIndex, ClickType.SWAP, mc.player);
Main.sendMessage("32k found in slot " + enchantedSwordIndex);

Expand Down Expand Up @@ -406,13 +405,20 @@ public void searchBestPlacement() {
|| mc.world.getBlockState(blockPos.up().south()).isFullBlock()
|| mc.world.getBlockState(blockPos.up().west()).isFullBlock()
|| mc.world.getBlockState(blockPos.up().down()).isFullBlock()
)
&& (mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).north()).isFullBlock()
|| mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).east()).isFullBlock()
|| mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).south()).isFullBlock()
|| mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).west()).isFullBlock()
|| mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).down()).isFullBlock()
)
&& (smartRedstone.isEnable() ? (
mc.world.getBlockState(blockPos.up().north()).getBlock() instanceof BlockAir
|| mc.world.getBlockState(blockPos.up().east()).getBlock() instanceof BlockAir
|| mc.world.getBlockState(blockPos.up().south()).getBlock() instanceof BlockAir
|| mc.world.getBlockState(blockPos.up().west()).getBlock() instanceof BlockAir
) : mc.world.getBlockState(blockPos.up(2)).getBlock() instanceof BlockAir)
) : mc.world.getBlockState(blockPos.up(2)).getBlock() instanceof BlockAir
)
&& mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction)).getBlock() instanceof BlockAir
&& mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).up()).getBlock() instanceof BlockAir
&& !(mc.world.getBlockState(getBlockPosFromDirection(blockPos, direction).north()).getBlock().equals(Blocks.REDSTONE_BLOCK)
Expand Down Expand Up @@ -492,7 +498,12 @@ public void searchBestPlacementVertically() {
)
&& mc.world.getBlockState(blockPos.down()).getBlock() instanceof BlockAir
&& mc.world.getBlockState(blockPos.down(2)).getBlock() instanceof BlockAir
&& mc.world.getBlockState(blockPos.down(3)).isFullBlock()
&& (mc.world.getBlockState(blockPos.down(2).north()).isFullBlock()
|| mc.world.getBlockState(blockPos.down(2).east()).isFullBlock()
|| mc.world.getBlockState(blockPos.down(2).south()).isFullBlock()
|| mc.world.getBlockState(blockPos.down(2).west()).isFullBlock()
|| mc.world.getBlockState(blockPos.down(3)).isFullBlock()
)
&& !(mc.world.getBlockState(blockPos.down(2).north()).getBlock().equals(Blocks.REDSTONE_BLOCK)
|| mc.world.getBlockState(blockPos.down(2).east()).getBlock().equals(Blocks.REDSTONE_BLOCK)
|| mc.world.getBlockState(blockPos.down(2).south()).getBlock().equals(Blocks.REDSTONE_BLOCK)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package com.snoworange.mousse.module.modules.movement;

import com.snoworange.mousse.module.Category;
import com.snoworange.mousse.module.Module;
import com.snoworange.mousse.setting.settings.BooleanSetting;
import com.snoworange.mousse.setting.settings.NumberSetting;
import net.minecraft.network.play.client.CPacketPlayer;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;

public class MotionTP32k extends Module {

public MotionTP32k() {
super("32kMotionTP", "just modifies your motionY and stuff so you rubberband", Category.MOVEMENT);
}

public boolean startFlag;
public int delay = 0;

BooleanSetting invalidpacket;
NumberSetting teleportDelay;

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

startFlag = false;
}

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

startFlag = true;
delay = 0;
}

@Override
public void init() {
super.init();

teleportDelay = new NumberSetting("Motion Length Ticks", 5, 0, 1, 1);
invalidpacket = new BooleanSetting("Invalid Packet", false);
addSetting(teleportDelay, invalidpacket);
}

@SubscribeEvent
public void onTick(TickEvent.ClientTickEvent event) {

if (startFlag) {
mc.player.motionY = 4;

++delay;

if (delay >= teleportDelay.getValue()) {
startFlag = false;

if (invalidpacket.isEnable()) mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, 1337.0, mc.player.posZ, mc.player.onGround));
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "mousse",
"name": "Mousse",
"description": "Advanced utility mod for Minecraft 1.12.2",
"version": "0.6.3",
"version": "0.7.4",
"mcversion": "1.12.2",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit 17288a0

Please sign in to comment.