Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
etianl authored Oct 30, 2022
1 parent b5b84fd commit 29ba1a2
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [GriefWaffen](https://github.com/CuteNoobCodes/GriefWaffen-public)
- [Frostburn Client](https://github.com/evaan/FrostBurn)
- [Banana](https://github.com/Bennooo/banana-for-everyone)
- [1.17 Crafting Dupe](https://github.com/B2H990/NUMA-117-Crafting-Dupe/)
<div align="left">
<p>This modpack would not have been possible without you
</p>
Expand All @@ -24,7 +25,8 @@
- **ExplosionAura:** Spawns creepers at your position that explode as you move. Like a bigger, more laggy Nuker module for creative mode. The use of the module Velocity is recommended to avoid being thrown around.
- **FireballClicker:** Shoots fireballs wherever you click (Credits to GriefWaffen)
- **FireballRain+:** Rains whatever entities you desire from a list similar to Boom (Credits to Griefwaffen (Or Allah-Hack? I have reason to believe it came from there)) It used to only rain fireballs, but I didn't think that was fun enough so I added the things put in Boom.
- **HandOfGod:** Deletes the world around you as you fly. It deletes when you press forward, jump, or crouch. Operator status required.
- **HandOfGod:** Deletes the world around you as you fly, and as you click. It deletes when you press the directional keys, or when you click it fills with the specified block. Operator status required.
- **Inventory Dupe (1.17):** Duplicates things in your crafting slots when the module is enabled and the Dupe button is pressed in your inventory. (Credit to ItsVen and Da0neDatGotAway for original creation of the dupe, and to B2H990 for making the fabric mod.)
- **Phase:** Allows you to phase through blocks vertically, and through thin blocks horizontally such as doors and world border (Credits to Meteor-Rejects) Please add this back it's not too terrible.
- **ShulkerDupe:** Duplicates the contents of a shulker when opening. Only works on Vanilla, Forge, and Fabric servers 1.19 and below. Use multiconnect or viafabric (Credits to Allah-Hack)
- **Voider:** Replaces the world from the top down (Credits to Allah-Hack) I only added options to set max and minimum height for voiding, and instead of just air it can do water and lava now too.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn_mappings=1.19.2+build.1
loader_version=0.14.9

# Mod Properties
mod_version=0.1.2
mod_version=0.1.3
maven_group=pwn.noobs
archives_base_name=trouser-streak

Expand Down
1 change: 1 addition & 0 deletions src/main/java/pwn/noobs/trouserstreak/Trouser.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void onInitialize() {
Modules.get().add(new Voider());
Modules.get().add(new HandOfGod());
Modules.get().add(new ExplosionAura());
Modules.get().add(new DupeModule());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package pwn.noobs.trouserstreak.mixin;

import meteordevelopment.meteorclient.systems.modules.Modules;
import pwn.noobs.trouserstreak.modules.*;
import net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen;
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
import net.minecraft.client.gui.screen.recipebook.RecipeBookProvider;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.screen.PlayerScreenHandler;
import net.minecraft.screen.slot.Slot;
import net.minecraft.screen.slot.SlotActionType;
import net.minecraft.text.Text;
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(InventoryScreen.class)
public abstract class InventoryScreenMixin extends AbstractInventoryScreen<PlayerScreenHandler> implements RecipeBookProvider {
public InventoryScreenMixin(PlayerScreenHandler container, PlayerInventory playerInventory, Text name) {
super(container, playerInventory, name);
}

@Inject(method = {"init"}, at = { @At("TAIL") })
protected void init(final CallbackInfo ci) {
if(Modules.get().isActive(DupeModule.class)) {
addDrawableChild(new ButtonWidget(x + 124, height / 2 - 24, 48, 20, Text.literal("1.17Dupe"), b -> dupe()));
}
}

private void dupe()
{
Slot outputSlot = handler.slots.get(0);
onMouseClick(outputSlot, outputSlot.id, 0, SlotActionType.THROW);
}
}
46 changes: 46 additions & 0 deletions src/main/java/pwn/noobs/trouserstreak/modules/DupeModule.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package pwn.noobs.trouserstreak.modules;

import meteordevelopment.meteorclient.events.entity.DropItemsEvent;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
import meteordevelopment.meteorclient.events.meteor.MouseButtonEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.mixin.CloseHandledScreenC2SPacketAccessor;
import meteordevelopment.meteorclient.mixin.HandledScreenAccessor;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.misc.Keybind;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import meteordevelopment.meteorclient.utils.network.MeteorExecutor;
import meteordevelopment.meteorclient.utils.player.*;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.network.packet.c2s.play.CloseHandledScreenC2SPacket;
import net.minecraft.screen.GenericContainerScreenHandler;
import net.minecraft.screen.ScreenHandler;
import net.minecraft.screen.slot.Slot;
import net.minecraft.screen.slot.SlotActionType;
import org.lwjgl.glfw.GLFW;
import pwn.noobs.trouserstreak.Trouser;

import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

public class DupeModule extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();


public DupeModule() {
super(Trouser.Main, "1.17InventoryDupe", "Enable/Disable 1.17 InvDupe button.");
}

}
3 changes: 2 additions & 1 deletion src/main/resources/streak.mixins.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"required": true,
"package": "pwn.noobs.trouserstreak.mixins",
"package": "pwn.noobs.trouserstreak.mixin",
"compatibilityLevel": "JAVA_17",
"client": [
],
"injectors": {
"defaultRequire": 1
},
"mixins": [
"InventoryScreenMixin"
]
}

0 comments on commit 29ba1a2

Please sign in to comment.