Skip to content

Commit

Permalink
update to 1.21.3, small crash fix
Browse files Browse the repository at this point in the history
***UPDATE TO 1.21.3***
- Support for Minecraft versions 1.21, and 1.20.6 have been dropped because they are older versions now. 
- Support for 1.20.4 will continue because of the need for that version when using the ForceOP sign exploit.
- Info regarding the ForceOP sign exploit is here: https://github.com/etianl/Trouser-Streak/releases/tag/v1.2.7

***Changes***
- The check for doDaylightCycle in the .world command has been removed in Trouser for Minecraft 1.21.3 due to code issues. Just look up at the sun or something.
- Added a Color setting for Boom+, Airstrike+, and NbtEditor to resolve a crash when incorrectly choosing a color.
  • Loading branch information
etianl authored Nov 18, 2024
1 parent b68d2e1 commit 4be6f0b
Show file tree
Hide file tree
Showing 30 changed files with 434 additions and 425 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ In no particular order
- Joining a server with HandOfGod or Voider already on causes the module to be turned off due to "Not being OP" even if you are an operator

## Requirements:
- If you are using Minecraft version **1.21.1**, then use the latest **MeteorClient Dev Build of v0.5.8**
- If you are using Minecraft version **1.20.6**, then use **MeteorClient "Full Release" v0.5.7**
- If you are using Minecraft version **1.21.3**, then use the latest **MeteorClient Dev Build of v0.5.9**
- If you are using Minecraft version **1.21.1**, then use **MeteorClient "Full Release" v0.5.8**
- Please try [ViaFabricPlus](https://github.com/FlorianMichael/ViaFabricPlus), which will let you connect to almost any version from a new version client.
- Don't forget to try updating any other mods you are using if your game is crashing.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_21
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.jvmargs=-Xmx2G

# Fabric (https://fabricmc.net/versions.html)
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.15.11
minecraft_version=1.21.3
yarn_mappings=1.21.3+build.2
loader_version=0.16.9

# Mod Properties
mod_version=1.2.7-1.21.1
mod_version=1.2.8-1.21.3
maven_group=pwn.noobs
archives_base_name=1trouser-streak

# Meteor (https://maven.meteordev.org/)
meteor_version=0.5.8-SNAPSHOT
meteor_version=0.5.9-SNAPSHOT
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), isopenair1.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), isopenair1.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand All @@ -64,7 +64,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), isopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), isopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand All @@ -91,7 +91,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), newopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), newopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), isopenair1.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < 4; packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), isopenair1.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand All @@ -62,7 +62,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), isopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < 4; packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), isopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand All @@ -88,7 +88,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
vehicle.setPosition(vehicle.getX(), newopenair2.getY(), vehicle.getZ());
}
for (int packetNumber = 0; packetNumber < 4; packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true));
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(true, mc.player.horizontalCollision));
}
player.setPosition(player.getX(), newopenair2.getY(), player.getZ());
return SINGLE_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
boolean foundAnyOre = false;
boolean isNewGeneration = false;
for (int x = 0; x < 16; x++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopY(); y++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopYInclusive(); y++) {
for (int z = 0; z < 16; z++) {
if (!foundAnyOre && isOreBlock(chunk.getBlockState(new BlockPos(x, y, z)).getBlock()) && mc.world.getRegistryKey() == World.OVERWORLD) {
foundAnyOre = true;
Expand All @@ -108,7 +108,6 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
ChatUtils.sendMsg(Text.of("Permission Level: "+mc.player.getPermissionLevel()));
ChatUtils.sendMsg(Text.of("Simulation Distance (chunks): "+mc.world.getSimulationDistance()));
ChatUtils.sendMsg(Text.of("Day Count: "+Math.floor(mc.world.getTime()/24000)));
ChatUtils.sendMsg(Text.of("DO_DAYLIGHT_CYCLE: "+mc.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)));
ChatUtils.sendMsg(Text.of("KnownPlayers (Names with a period are bedrock players): "+getKnownPlayers));
return SINGLE_SUCCESS;
});
Expand All @@ -129,7 +128,7 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
boolean foundAnyOre = false;
boolean isNewGeneration = false;
for (int x = 0; x < 16; x++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopY(); y++) {
for (int y = mc.world.getBottomY(); y < mc.world.getTopYInclusive(); y++) {
for (int z = 0; z < 16; z++) {
if (!foundAnyOre && isOreBlock(chunk.getBlockState(new BlockPos(x, y, z)).getBlock()) && mc.world.getRegistryKey().getValue().toString().toLowerCase().contains("overworld")) {
foundAnyOre = true;
Expand All @@ -152,7 +151,6 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
ChatUtils.sendMsg(Text.of("Permission Level: "+mc.player.getPermissionLevel()));
ChatUtils.sendMsg(Text.of("Simulation Distance (chunks): "+mc.world.getSimulationDistance()));
ChatUtils.sendMsg(Text.of("Day Count: "+Math.floor(mc.world.getTime()/24000)));
ChatUtils.sendMsg(Text.of("DO_DAYLIGHT_CYCLE: "+mc.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)));
ChatUtils.sendMsg(Text.of("KnownPlayers (Names with a period are bedrock players): "+getKnownPlayers));

String serverip;
Expand Down Expand Up @@ -191,8 +189,6 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
writer.write("\r\n"); // write new line
writer.write("Day Count: "+Math.floor(mc.world.getTime()/24000));
writer.write("\r\n"); // write new line
writer.write("DO_DAYLIGHT_CYCLE: "+mc.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE));
writer.write("\r\n"); // write new line
writer.write("KnownPlayers (Names with a period are bedrock players): "+getKnownPlayers);
writer.write("\r\n"); // write new line
writer.close();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pwn.noobs.trouserstreak.mixin;

import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
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;
Expand All @@ -17,7 +17,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(InventoryScreen.class)
public abstract class InventoryScreenMixin extends AbstractInventoryScreen<PlayerScreenHandler> implements RecipeBookProvider {
public abstract class InventoryScreenMixin extends HandledScreen<PlayerScreenHandler> implements RecipeBookProvider {
public InventoryScreenMixin(PlayerScreenHandler container, PlayerInventory playerInventory, Text name) {
super(container, playerInventory, name);
}
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/pwn/noobs/trouserstreak/modules/AirstrikePlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ public class AirstrikePlus extends Module {
.description("Name the Entity")
.defaultValue("MOUNTAINSOFLAVAINC")
.build());
private final Setting<String> nomcolor = sgGeneral.add(new StringSetting.Builder()
private final Setting<BoomPlus.ColorModes> nomcolor = sgGeneral.add(new EnumSetting.Builder<BoomPlus.ColorModes>()
.name("Custom Name Color")
.description("Color the Name")
.defaultValue("red")
.defaultValue(BoomPlus.ColorModes.red)
.build());
public enum ColorModes { aqua, black, blue, dark_aqua, dark_blue, dark_gray, dark_green, dark_purple, dark_red, gold, gray, green, italic, light_purple, red, white, yellow }
public final Setting<Boolean> randomnomcolor = sgGeneral.add(new BoolSetting.Builder()
.name("Rainbow Name Colors")
.description("Name Colors are randomly selected.")
Expand Down Expand Up @@ -390,7 +391,7 @@ public AirstrikePlus() {
Vec3d origin = null;
int i = 0;
private int mix=0;
private String namecolour = nomcolor.get();
private String namecolour = nomcolor.get().toString();
private NbtList speedlist = new NbtList();
private String entityName = entity.get().trim().replace(" ", "_");
private String customName = nom.get();
Expand Down Expand Up @@ -451,7 +452,7 @@ public void onTick(TickEvent.Post event) {
Random random = new Random();
int index = random.nextInt(colorCodes.length);
namecolour = colorCodes[index];
} else namecolour = nomcolor.get();
} else namecolour = nomcolor.get().toString();
ItemStack bomb = new ItemStack(Items.SALMON_SPAWN_EGG);
ItemStack bfr = mc.player.getMainHandStack();
BlockHitResult bhr = new BlockHitResult(mc.player.getPos().add(0, 1, 0), Direction.UP, new BlockPos(mc.player.getBlockPos().add(0, 1, 0)), false);
Expand Down Expand Up @@ -529,7 +530,7 @@ private void executeCommandsToCreateEntities() {
Random random = new Random();
int index = random.nextInt(colorCodes.length);
namecolour = colorCodes[index];
} else namecolour = nomcolor.get();
} else namecolour = nomcolor.get().toString();
speedlist.add(NbtDouble.of(0));
speedlist.add(NbtDouble.of(-speed.get()));
speedlist.add(NbtDouble.of(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class AutoDrop extends Module {

@EventHandler
private void onPreTick(TickEvent.Pre event) {
if (tool.get() == true && (mc.player.getMainHandStack().getItem() instanceof BucketItem || mc.player.getMainHandStack().getItem() instanceof FlintAndSteelItem || mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() instanceof ShearsItem))return;
if (tool.get() == true && (mc.player.getMainHandStack().getItem() instanceof BucketItem || mc.player.getMainHandStack().getItem() instanceof FlintAndSteelItem || mc.player.getMainHandStack().getItem() instanceof MiningToolItem || mc.player.getMainHandStack().getItem() instanceof ShearsItem))return;
if (dropthisslot.get() && !mc.player.getInventory().getStack(dropslot.get()-1).isEmpty()){
previousslot=mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = dropslot.get()-1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,10 @@ private boolean isInvalidBlock(ItemStack stack) {
|| ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralWallFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof DeadCoralFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof DeadCoralWallFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,10 @@ private boolean isInvalidBlock(ItemStack stack) {
|| ((BlockItem) stack.getItem()).getBlock() instanceof BellBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CarpetBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof ConduitBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralParentBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof CoralWallFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof DeadCoralFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof DeadCoralWallFanBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof TripwireHookBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof PointedDripstoneBlock
|| ((BlockItem) stack.getItem()).getBlock() instanceof TripwireBlock
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/pwn/noobs/trouserstreak/modules/BaseFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ else if (basefoundspamTicks >= bsefndtickdelay.get()) {
if (chunk != null && chunk.getStatus().isAtLeast(ChunkStatus.FULL)) {
Box chunkBox = new Box(
chunk.getPos().getStartX(), mc.world.getBottomY(), chunk.getPos().getStartZ(),
chunk.getPos().getEndX() + 1, mc.world.getTopY(), chunk.getPos().getEndZ() + 1
chunk.getPos().getEndX() + 1, mc.world.getTopYInclusive(), chunk.getPos().getEndZ() + 1
);
if (!baseChunks.contains(chunk.getPos())) {
AtomicInteger animalsFound = new AtomicInteger();
Expand Down Expand Up @@ -919,7 +919,7 @@ private void onReadPacket(PacketEvent.Receive event) {

if (bubblesFinder.get() || spawner.get() || signFinder.get() || portalFinder.get() || roofDetector.get() || bedrockfind.get() || skybuildfind.get() || Blawcks1.get().size()>0 || Blawcks2.get().size()>0 || Blawcks3.get().size()>0 || Blawcks4.get().size()>0 || Blawcks5.get().size()>0 || Blawcks6.get().size()>0 || Blawcks7.get().size()>0){
int Ymin = mc.world.getBottomY()+minY.get();
int Ymax = mc.world.getTopY()-maxY.get();
int Ymax = mc.world.getTopYInclusive()-maxY.get();
try {
Set<BlockPos> blockpositions1 = Collections.synchronizedSet(new HashSet<>());
Set<BlockPos> blockpositions2 = Collections.synchronizedSet(new HashSet<>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private void onTick(TickEvent.Pre event) {
for (int x = (int) (mc.player.getX() - placeRange.get()); x < mc.player.getX() + placeRange.get(); x++) {
for (int z = (int) (mc.player.getZ() - placeRange.get()); z < mc.player.getZ() + placeRange.get(); z++) {
assert mc.world != null;
for (int y = (int) Math.max(mc.world.getBottomY(), mc.player.getY() - placeRange.get()); y < Math.min(mc.world.getTopY(), mc.player.getY() + placeRange.get()); y++) {
for (int y = (int) Math.max(mc.world.getBottomY(), mc.player.getY() - placeRange.get()); y < Math.min(mc.world.getTopYInclusive(), mc.player.getY() + placeRange.get()); y++) {
bp.set(x, y, z);
if (!mc.world.getBlockState(bp).isAir()) blockPosArray.add(new BlockPos(bp));
}
Expand Down
Loading

0 comments on commit 4be6f0b

Please sign in to comment.