Skip to content

Commit

Permalink
0.4.5 Fix oldchunks in the newchunks, TPFly update
Browse files Browse the repository at this point in the history
**0.4.5**
-Fixed the lack of oldchunks in NewerNewChunks. 
-If using AutoDrop and selecting a slot to drop, it now returns back to the slot that was previously selected after dropping.
-TPFly cleanup a bunch of junk code.
-Finally cancelled the last of the movement other than setPosition (Teleporting).
-Allow TPfly to work in non-solid blocks excluding lava, so you don't get stuck on silly things like grass.
  • Loading branch information
etianl authored Mar 17, 2023
1 parent b5f4a4c commit 222cafd
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 136 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In no particular order
- **Airstrike+:** Rains whatever entities you desire from a list similar to Boom. It used to only rain fireballs, that's all I changed. (Credits to Allah-Hack)
- **AnHero:** Become An Hero! (A quick way back to spawn.) (Credits to etianl :D)
- **AutoBuild:** Places blocks according to selection in a 5x5 grid. You can draw pictures with it! (Credits to Banana) I modified it so it places lengthways infront of you. This way you can draw stairs and place them infront of you, hop up em and keep going.
- **AutoDrop:** Drops the stack in your selected slot automatically, or you can choose a slot to dump. You can shift click your inventory items to slot one to dump your trash easily. (Credits to etianl :D)
- **AutoDrop:** Drops the stack in your selected slot automatically, or you can choose a slot to dump. You can shift click your inventory items to dump your trash easily. (Credits to etianl :D)
- **AutoLavaCaster** Simple timer based bot for lavacasting. Aim at the top of the block you want to cast on and activate the module. It places lava, then after an amount of time removes the lava, places the water after a specified delay, removes it after a specified delay, it will build the mountain upward, tower you up and repeat. Position yourself on a block above and diagonally, mostly perpendicular from the targeted block for best results. Use the ".lavacalc" command to determine roughly how long lava will take to finish. (Credits to etianl :D)
- *AutoLavaCaster Notes:*
- The EstimateLavaTimer estimates lava time automatically based on a 45 degree staircase from your Y level down to sea level, or Y-60 if you are below sea level.
Expand Down Expand Up @@ -71,7 +71,7 @@ In no particular order
- **RedstoneNuker:** It's just the regular Nuker module from Meteor client, customized for only breaking things that generate redstone signals. Also with included AutoTool. To keep you safer when placing lots of TNT. (Credits to Meteor Client for Nuker code, and AutoTool code inthere.)
- **ShulkerDupe:** Duplicates the contents of a shulker when pressing "Dupe" or "Dupe All" in the shulker menu. Only works on Vanilla, Forge, and Fabric servers 1.19 and below. Use multiconnect or viafabric (Credits to Allah-Hack, I just brought back the buttons, and make it dupe slot1 as well.)
- **Teleport:** Sets your position ontop of targeted block, within a possible reach of 64 blocks. Rarely can cause damage, be careful. ***EXPERIMENTAL*** (Credits to etianl :D)
- **TPFly:** It is a purely setPos based flight. Based off the ClickTP code, credits to Meteor for that. ***EXPERIMENTAL, movement is a little weird lol.*** (Credits to etianl :D)
- **TPFly:** It is a purely setPos based flight. PointAndFly mode is based off the ClickTP and AirPlace code, credits to Meteor for that. ***EXPERIMENTAL, movement is a little weird lol.*** (Credits to etianl :D)
- **TrouserFlight:** I just added a Normal mode antikick for Velocity flight cuz missing at the time.
- **Voider+:** Replaces the world from the top down. (Credits to Allah-Hack) I added a 3x3 voiding script, a TP foward option for deleting strips, as well as options to set max and minimum height for voiding, and instead of just air it can do water and lava now too.

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.19.3+build.3
loader_version=0.14.11

# Mod Properties
mod_version=0.4.4-1.19.3
mod_version=0.4.5-1.19.3
maven_group=pwn.noobs
archives_base_name=1trouser-streak

Expand Down
39 changes: 32 additions & 7 deletions src/main/java/pwn/noobs/trouserstreak/modules/AutoDrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,49 @@ public class AutoDrop extends Module {

public AutoDrop() {super(Trouser.Main, "auto-drop", "Drops the stack in your selected slot automatically");}
private int ticks=0;
private int previousslot=0;

@EventHandler
private void onPostTick(TickEvent.Post event) {
ticks++;
if (tool.get() == true){
if (!(mc.player.getMainHandStack().getItem() instanceof BucketItem || mc.player.getMainHandStack().getItem() instanceof FlintAndSteelItem || mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() instanceof ShearsItem)) {
if (dropthisslot.get() && !mc.player.getInventory().getStack(dropslot.get()-1).isEmpty()){
if (ticks==1){mc.player.getInventory().selectedSlot = dropslot.get()-1;}
ticks++;
if (ticks==1){
previousslot=mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = dropslot.get()-1;
}
else if (ticks==2){mc.player.dropSelectedItem(true);}
else if (ticks>=2){ticks=0;}
} else if (!dropthisslot.get()) mc.player.dropSelectedItem(true);
else if (ticks>=2){
mc.player.getInventory().selectedSlot = previousslot;
ticks=0;
}
}
if (dropthisslot.get() && mc.player.getInventory().getStack(dropslot.get()-1).isEmpty() && ticks>=2){
mc.player.getInventory().selectedSlot = previousslot;
ticks=0;
}
if (!dropthisslot.get()) mc.player.dropSelectedItem(true);
}else if (mc.player.getMainHandStack().getItem() instanceof BucketItem || mc.player.getMainHandStack().getItem() instanceof FlintAndSteelItem || mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() instanceof ShearsItem){}
}
else {
if (dropthisslot.get() && !mc.player.getInventory().getStack(dropslot.get()-1).isEmpty()){
if (ticks==1){mc.player.getInventory().selectedSlot = dropslot.get()-1;}
ticks++;
if (ticks==1){
previousslot=mc.player.getInventory().selectedSlot;
mc.player.getInventory().selectedSlot = dropslot.get()-1;
}
else if (ticks==2){mc.player.dropSelectedItem(true);}
else if (ticks>=2){ticks=0;}
} else if (!dropthisslot.get()) mc.player.dropSelectedItem(true);
else if (ticks>=2){
mc.player.getInventory().selectedSlot = previousslot;
ticks=0;
}
}
if (dropthisslot.get() && mc.player.getInventory().getStack(dropslot.get()-1).isEmpty() && ticks>=2){
mc.player.getInventory().selectedSlot = previousslot;
ticks=0;
}
if (!dropthisslot.get()) mc.player.dropSelectedItem(true);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ else if (event.packet instanceof ChunkDataS2CPacket && mc.world != null) {
for (int z = 0; z < 16; z++) {
FluidState fluid = chunk.getFluidState(x, y, z);

if (!fluid.isEmpty() && !fluid.isStill() && !olderoldChunks.contains(chunkPos)) {
if (!fluid.isEmpty() && !fluid.isStill() || !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)) {
oldChunks.add(oldpos);
if (save.get()){
saveOldChunkData();
Expand Down
Loading

0 comments on commit 222cafd

Please sign in to comment.