Skip to content

Commit

Permalink
0.8.8 Added .clearram command + LavaAura update
Browse files Browse the repository at this point in the history
- Added the GarbageCleanerCommand which is accessable by typing ".cleanram". It cleans the RAM of useless junk and may be very handy for improving performance after chunk tracing for a while and can be used to clear other lag. (credits to [ogmur](https://www.youtube.com/@Ogmur) for writing this)
- Changed the default "Don't Burn Range" in LavaAura to 3 from 2.25 because it's safer.
- Added a tickdelay option to LavaAura to help you conserve flints when trying the "Burn Everything" option.
- Made LavaAura only target lava source blocks for pickup because it was rotating to and trying to snatch up flowing lava with the bucket.
  • Loading branch information
etianl authored Feb 28, 2024
1 parent 43ce594 commit 3d5007b
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 49 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ This will return the lowest block placed with AutoMountain until AutoLavacast is
- **CrashCommand:** Crashes other players out using a nasty particle effect. Requires OP status. Credits to [aaaasdfghjkllll](https://github.com/aaaasdfghjkllll)
- **ExplosionAura:** Spawns creepers at your position as you move that explode instantly. Like a bigger, more laggy Nuker module for creative mode. The use of the module Velocity is recommended to avoid being thrown around. (Credits to etianl :D)
- **FlightAntikick:** Moves you down on a tick-based timer. Added in to substitute the lack of a "Normal" mode antikick for velocity flight in MeteorClient (not a great antikick it's just something). Bind it to the same key as Flight. (Credits to etianl :D)
- **GarbageCleanerCommand:** Accessable by typing ".cleanram". It cleans the RAM of useless junk and may be very handy for improving performance after chunk tracing for a while and can be used to clear other lag. (credits to [ogmur](https://www.youtube.com/@Ogmur) for writing this)
- **HandOfGod:** Runs the "/fill" command on the world around you or around everyone else in different ways as you move around, and as you click. Destroy and modify the world with ease! Operator status required. (Credits to etianl :D)
- **Inventory Dupe (1.17):** Duplicates things in your crafting slots when the module is enabled and the Dupe button is pressed in your inventory. Only works on Minecraft servers on the version 1.17, not any version before or after.(Credit to ItsVen and Da0neDatGotAway for original creation of the dupe, and to B2H990 for making the fabric mod. Credits to etianl for porting to Meteor.)
- **InstaKill:** Shoots arrows and tridents with incredible power and velocity. Enabling multiple buttons causes the amount of packets to add up. (Credits to Saturn5Vfive)
Expand Down
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.20.4+build.3
loader_version=0.15.3

# Mod Properties
mod_version=0.8.7-1.20.4
mod_version=0.8.8-1.20.4
maven_group=pwn.noobs
archives_base_name=1trouser-streak

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
package pwn.noobs.trouserstreak.commands;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.text.Text;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class GarbageCleanerCommand extends Command {
public GarbageCleanerCommand() {
super("cleanram", "Clears garbage from RAM."); // Courtesy of youtube.com/@ogmur
}

@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
{
ChatUtils.sendMsg(Text.of("Cleaning RAM."));}
System.gc();
{
ChatUtils.sendMsg(Text.of("RAM Cleared."));}
return SINGLE_SUCCESS;
});
}
}
package pwn.noobs.trouserstreak.commands;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import net.minecraft.text.Text;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class GarbageCleanerCommand extends Command {
public GarbageCleanerCommand() {
super("cleanram", "Clears garbage from RAM."); // Courtesy of youtube.com/@ogmur
}

@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
{
ChatUtils.sendMsg(Text.of("Cleaning RAM."));}
System.gc();
{
ChatUtils.sendMsg(Text.of("RAM Cleared."));}
return SINGLE_SUCCESS;
});
}
}
75 changes: 55 additions & 20 deletions src/main/java/pwn/noobs/trouserstreak/modules/LavaAura.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.Items;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
Expand Down Expand Up @@ -86,11 +87,20 @@ public class LavaAura extends Module {
private final Setting<Double> noburnrange = sgGeneral.add(new DoubleSetting.Builder()
.name("Dont Burn Range")
.description("Range around player to not burn.")
.defaultValue(2.25)
.defaultValue(3)
.min(0)
.sliderRange(0, 10)
.build()
);
public final Setting<Integer> placelavatickdelay = sgLAVA.add(new IntSetting.Builder()
.name("Lava Placement Tick Delay")
.description("Tick Delay for lava placement")
.defaultValue(0)
.min(0)
.sliderMax(20)
.visible(() -> mode.get() == Mode.LAVA)
.build()
);
public final Setting<Boolean> pickup = sgLAVA.add(new BoolSetting.Builder()
.name("Pickup Lava")
.description("pickup lava after placing")
Expand All @@ -107,6 +117,15 @@ public class LavaAura extends Module {
.visible(() -> pickup.get() && mode.get() == Mode.LAVA)
.build()
);
public final Setting<Integer> placefiretickdelay = sgFIRE.add(new IntSetting.Builder()
.name("Fire Placement Tick Delay")
.description("Tick Delay for fire placement")
.defaultValue(0)
.min(0)
.sliderMax(20)
.visible(() -> mode.get() == Mode.FIRE)
.build()
);
public final Setting<Boolean> extinguish = sgFIRE.add(new BoolSetting.Builder()
.name("Extinguish Fire")
.description("extinguish fire after placing")
Expand Down Expand Up @@ -185,13 +204,14 @@ public LavaAura() {
private Set<BlockPos> lavaPlaced = new HashSet<>();
private int ticks = 0;
private int fireticks = 0;
private int placementTicks = 0;
@EventHandler
private void onTick(TickEvent.Pre event) {
if (!mc.player.isAlive() || PlayerUtils.getGameMode() == GameMode.SPECTATOR) return;
if (pauseOnLag.get() && TickRate.INSTANCE.getTimeSinceLastTick() >= 1f) return;
float originalYaw = mc.player.getYaw();
float originalPitch = mc.player.getPitch();

placementTicks++;
// Convert the Iterable to a List and then stream it
List<Entity> targetedEntities = new ArrayList<>();
for (Entity entity : this.mc.world.getEntities()) {
Expand Down Expand Up @@ -236,9 +256,16 @@ private void onTick(TickEvent.Pre event) {
if (mc.world.getBlockState(targetBlockPos).getBlock() != Blocks.WATER && mc.world.getBlockState(targetBlockPos).getBlock() != Blocks.LAVA) {
Block blockBelow = mc.world.getBlockState(targetBlockPos.down()).getBlock();
if (mode.get() == Mode.LAVA) {
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
if (nolavaburning.get() && !entity.isOnFire()) placeLava();
else if (!nolavaburning.get()) placeLava();
if (nolavaburning.get() && !entity.isOnFire() && placementTicks >= placelavatickdelay.get()){
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
placeLava();
placementTicks=0;
}
else if (!nolavaburning.get() && placementTicks >= placelavatickdelay.get()){
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
placeLava();
placementTicks=0;
}
} else if ((!mc.player.isSneaking() &&
!(blockBelow instanceof AbstractFurnaceBlock ||
blockBelow instanceof AbstractSignBlock ||
Expand Down Expand Up @@ -289,10 +316,13 @@ private void onTick(TickEvent.Pre event) {
blockBelow instanceof WallHangingSignBlock) &&
!blockHasOnUseMethod(mc.world.getBlockState(targetBlockPos).getBlock()) && mode.get() == Mode.FIRE) ||
mc.player.isSneaking() && mode.get() == Mode.FIRE) {
if (!norotate.get())
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
if (noburnburning.get() && !entity.isOnFire()) placeFire(targetBlockPos);
else if (!noburnburning.get()) placeFire(targetBlockPos);
if (placementTicks >= placefiretickdelay.get()){
if (!norotate.get())
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
if (noburnburning.get() && !entity.isOnFire()) placeFire(targetBlockPos);
else if (!noburnburning.get()) placeFire(targetBlockPos);
placementTicks=0;
}
}
}

Expand Down Expand Up @@ -358,10 +388,13 @@ private void onTick(TickEvent.Pre event) {
(mc.player.isSneaking() &&
mc.world.getBlockState(targetBlockPos).getBlock() != Blocks.WATER &&
mc.world.getBlockState(targetBlockPos).getBlock() != Blocks.LAVA)) {
if (!norotate.get())
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
if (noburnburning.get() && !entity.isOnFire()) placeFire(targetBlockPos);
else if (!noburnburning.get()) placeFire(targetBlockPos);
if (placementTicks >= placefiretickdelay.get()){
if (!norotate.get())
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, targetPos);
if (noburnburning.get() && !entity.isOnFire()) placeFire(targetBlockPos);
else if (!noburnburning.get()) placeFire(targetBlockPos);
placementTicks=0;
}
}
}
}
Expand All @@ -388,9 +421,10 @@ private void onTick(TickEvent.Pre event) {

// Check if the block has not had lava placed on it
if (!lavaPlaced.contains(blockPos)) {
if (mode.get() == Mode.LAVA) {
if (mode.get() == Mode.LAVA && placementTicks >= placelavatickdelay.get()) {
mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()));
placeLava();
lavaPlaced.add(blockPos);
} else if (mode.get() == Mode.FIRE) {
Block blockBelow = mc.world.getBlockState(blockPos.down()).getBlock();

Expand Down Expand Up @@ -443,13 +477,14 @@ private void onTick(TickEvent.Pre event) {
blockBelow instanceof TrapdoorBlock ||
blockBelow instanceof WallHangingSignBlock) &&
!blockHasOnUseMethod(mc.world.getBlockState(blockPos).getBlock())) || mc.player.isSneaking()) {
if (!norotate.get())mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()));
placeFire(blockPos.up());
if (placementTicks >= placefiretickdelay.get()){
if (!norotate.get())mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()));
placeFire(blockPos.up());
placementTicks=0;
lavaPlaced.add(blockPos);
}
}
};

// Add the block to the set to indicate that lava has been placed on it
lavaPlaced.add(blockPos);
}
}
}
Expand Down Expand Up @@ -526,7 +561,7 @@ private void pickUpLavaOnTick() {
BlockState blockState = mc.world.getBlockState(blockPos);
double distance = mc.player.getPos().distanceTo(blockPos.toCenterPos());
if (distance <= range.get()) {
if (blockState.getBlock() == Blocks.LAVA) {
if (blockState.getFluidState().isOf(Fluids.LAVA)) {
// Perform a raycast to check for obstructions
BlockHitResult blockHitResult = mc.world.raycast(new RaycastContext(
mc.player.getCameraPosVec(1.0f),
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "streak-addon",
"version": "0.8.7",
"version": "0.8.8",
"name": "TrouserStreak",
"description": "Trouser-Streak is a compilation of modules, updated to the latest version and optimized for maximum grief. I did not make all of these.",
"authors": [
Expand Down

0 comments on commit 3d5007b

Please sign in to comment.