Skip to content

Commit

Permalink
0.6.2 NewerNewChunks crashfixes, SuperInstaMine module
Browse files Browse the repository at this point in the history
**SuperInstaMine added**
- **ORIGINAL INSTAMINE FROM REJECTS WORKS BETTER THAN THIS ONE OVERALL, download meteor rejects for that!**
- This SuperInstaMine originated from the Meteor Rejects Instamine. (Credits to Meteor Rejects for the original code.)
- SuperInstaMine spams the server with block start break and stop break packets
- It works best against easy-breaking blocks. (it can bug out a little against tough blocks)
- I added an option called "Break Modes (Range)" which allows you to break more than one block at a time with SuperInstaMine. The option adjusts the positioning and range of the block breaking.
- Made Only Pick option also made false by default.

**NewerNewChunks fixes**
- TickExploit made better, now more chunks with blocks experiencing random tick updates are flagged. (You will get a more clear picture showing where the newchunks are as a result.)
- Fixed a crash occuring when loading a world you haven't been to with the NewerNewChunks module on.
- Fixed another crash occuring when loading data in some cases.
  • Loading branch information
etianl authored Jul 10, 2023
1 parent 81f1d1e commit f3d10ed
Show file tree
Hide file tree
Showing 5 changed files with 1,032 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ This will return the lowest block placed with AutoMountain until AutoLavacast is
-------------------------------------------------------------------------------------
- **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.)
- **SuperInstaMine:** This SuperInstaMine originated from the Meteor Rejects Instamine. I added an option called "Break Modes (Range)" which allows you to break more than one block at a time with SuperInstaMine. This option works best against easy-breaking blocks. The option adjusts the positioning and range of the block breaking. (Credits to Meteor Rejects for the original code.) **ORIGINAL INSTAMINE FROM REJECTS WORKS BETTER THAN THIS ONE OVERALL, download meteor rejects for that!**
- **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. 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)
- **TrailMaker:** Leaves blocks behind you in a trail. Has a place delay option to spread placement further apart. Select the blocks you want to use in the block list setting for it to work. (Credits to etianl :D)
Expand All @@ -113,8 +114,7 @@ This will return the lowest block placed with AutoMountain until AutoLavacast is
- **AutoMountain Bugs**
- Some blocks may cause Automountain to attempt to build while not actually placing anything (Torches, walls, and doors did this until I fixed). If a block does not work please make an issue so I can correct it.
- **More Bugs**
- BaseFinder can cause chunks to load a bit more slowly due to the immense amount of block checking it has to do.
- NewerNewChunks can rarely boot you from the server when going through a nether portal. (something to do with newchunk loading for the dimension you are entering, I'm not entirely sure.)
- NewerNewChunks can rarely boot you from the server when going back and forth through a nether portal. For example, it sometimes may boot you if you just came out of a portal then you re-enter it immediately after exiting.
- .newchunkcount command shows exactly the chunks that are saved in chunk data, so when you are in normal mode or flowbelowY0 mode the returned values are not exactly in correlation to what is rendered on screen.
- NewerNewChunks has to be turned on atleast once prior to running .newchunkcount for the counter to work even if you already have data in that world.

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.1+build.9
loader_version=0.14.21

# Mod Properties
mod_version=0.6.1-1.20.1
mod_version=0.6.2-1.20.1
maven_group=pwn.noobs
archives_base_name=1trouser-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 @@ -39,6 +39,7 @@ public void onInitialize() {
Modules.get().add(new AutoDrop());
Modules.get().add(new AnHero());
Modules.get().add(new RedstoneNuker());
Modules.get().add(new SuperInstaMine());
Modules.get().add(new AirstrikePlus());
Modules.get().add(new BoomPlus());
Modules.get().add(new VoiderPlus());
Expand Down
94 changes: 69 additions & 25 deletions src/main/java/pwn/noobs/trouserstreak/modules/NewerNewChunks.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,30 @@ private void onPreTick(TickEvent.Pre event) {
} else if (!load.get()){
loadingticks=0;
}
if (!Files.exists(Paths.get("NewChunks/"+serverip+"/"+world+"/OldChunkData.txt"))){
File file = new File("NewChunks/"+serverip+"/"+world+"/OldChunkData.txt");
try {
file.createNewFile();
} catch (IOException e) {}
}
if (!Files.exists(Paths.get("NewChunks/"+serverip+"/"+world+"/NewChunkData.txt"))){
File file = new File("NewChunks/"+serverip+"/"+world+"/NewChunkData.txt");
try {
file.createNewFile();
} catch (IOException e) {}
}
if (!Files.exists(Paths.get("NewChunks/"+serverip+"/"+world+"/FlowIsBelowY0ChunkData.txt"))){
File file = new File("NewChunks/"+serverip+"/"+world+"/FlowIsBelowY0ChunkData.txt");
try {
file.createNewFile();
} catch (IOException e) {}
}
if (!Files.exists(Paths.get("NewChunks/"+serverip+"/"+world+"/TickExploitChunkData.txt"))){
File file = new File("NewChunks/"+serverip+"/"+world+"/TickExploitChunkData.txt");
try {
file.createNewFile();
} catch (IOException e) {}
}
if (chunkcounter=true){
chunkcounterticks++;
if (chunkcounterticks>=1){
Expand Down Expand Up @@ -427,7 +451,7 @@ private void onRender(Render3DEvent event) {
if (newChunksLineColor.get().a > 5 || newChunksSideColor.get().a > 5) {
synchronized (newChunks) {
for (ChunkPos c : newChunks) {
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (c != null && mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
render(new Box(c.getStartPos().add(0, renderHeight.get(), 0), c.getStartPos().add(16, renderHeight.get(), 16)), newChunksSideColor.get(), newChunksLineColor.get(), shapeMode.get(), event);
}
}
Expand All @@ -436,7 +460,7 @@ private void onRender(Render3DEvent event) {
if (olderoldChunksLineColor.get().a > 5 || olderoldChunksSideColor.get().a > 5) {
synchronized (olderoldChunks) {
for (ChunkPos c : olderoldChunks) {
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (c != null && mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (detectmode.get()== DetectMode.Advanced) {
render(new Box(c.getStartPos().add(0, renderHeight.get(), 0), c.getStartPos().add(16, renderHeight.get(), 16)), olderoldChunksSideColor.get(), olderoldChunksLineColor.get(), shapeMode.get(), event);
} else if (detectmode.get()== DetectMode.Normal) {
Expand All @@ -451,7 +475,7 @@ private void onRender(Render3DEvent event) {
if (tickexploitChunksLineColor.get().a > 5 || tickexploitChunksSideColor.get().a > 5) {
synchronized (tickexploitChunks) {
for (ChunkPos c : tickexploitChunks) {
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (c != null && mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (detectmode.get()== DetectMode.Advanced && tickexploit.get()) {
render(new Box(c.getStartPos().add(0, renderHeight.get(), 0), c.getStartPos().add(16, renderHeight.get(), 16)), tickexploitChunksSideColor.get(), tickexploitChunksLineColor.get(), shapeMode.get(), event);
} else if ((detectmode.get()== DetectMode.Normal) && tickexploit.get()) {
Expand All @@ -469,7 +493,7 @@ private void onRender(Render3DEvent event) {
if (oldChunksLineColor.get().a > 5 || oldChunksSideColor.get().a > 5){
synchronized (oldChunks) {
for (ChunkPos c : oldChunks) {
if (mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
if (c != null && mc.getCameraEntity().getBlockPos().isWithinDistance(c.getStartPos(), renderDistance.get()*16)) {
render(new Box(c.getStartPos().add(0, renderHeight.get(), 0), c.getStartPos().add(16, renderHeight.get(), 16)), oldChunksSideColor.get(), oldChunksLineColor.get(), shapeMode.get(), event);
}
}
Expand Down Expand Up @@ -521,9 +545,9 @@ else if (event.packet instanceof BlockUpdateS2CPacket) {
saveTickExploitChunkData();
}
} else if (packet.getState().hasRandomTicks() && !tickexploitChunks.contains(chunkPos) && !oldChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !newChunks.contains(chunkPos)){
oldChunks.add(chunkPos);
tickexploitChunks.add(chunkPos);
if (save.get()){
saveOldChunkData();
saveTickExploitChunkData();
}
}
}
Expand Down Expand Up @@ -589,11 +613,17 @@ private void loadData() {

for (String line : allLines) {
String s = line;
if (s !=null){
String[] array = s.split(", ");
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]",""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]",""));
oldpos = new ChunkPos(X,Z);
oldChunks.add(oldpos);
if (array.length==2) {
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]", ""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]", ""));
oldpos = new ChunkPos(X, Z);
if (!oldChunks.contains(oldpos) && !tickexploitChunks.contains(oldpos) && !olderoldChunks.contains(oldpos) && !newChunks.contains(oldpos)) {
oldChunks.add(oldpos);
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
Expand All @@ -603,12 +633,17 @@ private void loadData() {

for (String line : allLines) {
String s = line;
if (s !=null){
String[] array = s.split(", ");
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]",""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]",""));
chunkPos = new ChunkPos(X,Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)){
newChunks.add(chunkPos);}
if (array.length==2) {
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]", ""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]", ""));
chunkPos = new ChunkPos(X, Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)) {
newChunks.add(chunkPos);
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
Expand All @@ -618,12 +653,17 @@ private void loadData() {

for (String line : allLines) {
String s = line;
if (s !=null){
String[] array = s.split(", ");
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]",""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]",""));
chunkPos = new ChunkPos(X,Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)){
olderoldChunks.add(chunkPos);}
if (array.length==2) {
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]", ""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]", ""));
chunkPos = new ChunkPos(X, Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)) {
olderoldChunks.add(chunkPos);
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
Expand All @@ -633,12 +673,16 @@ private void loadData() {

for (String line : allLines) {
String s = line;
if (s !=null){
String[] array = s.split(", ");
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]",""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]",""));
chunkPos = new ChunkPos(X,Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)){
tickexploitChunks.add(chunkPos );
if (array.length==2) {
int X = Integer.parseInt(array[0].replaceAll("\\[", "").replaceAll("\\]", ""));
int Z = Integer.parseInt(array[1].replaceAll("\\[", "").replaceAll("\\]", ""));
chunkPos = new ChunkPos(X, Z);
if (!tickexploitChunks.contains(chunkPos) && !newChunks.contains(chunkPos) && !olderoldChunks.contains(chunkPos) && !oldChunks.contains(chunkPos)) {
tickexploitChunks.add(chunkPos);
}
}
}
}
} catch (IOException e) {
Expand Down
Loading

0 comments on commit f3d10ed

Please sign in to comment.