From 58d6b80f4f1ae2d0f20ac493fe9a1d6a5c19f857 Mon Sep 17 00:00:00 2001 From: leijurv Date: Fri, 18 Aug 2023 19:21:50 -0700 Subject: [PATCH 1/3] baritone elytra selling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 11a12e822..c990292fc 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Baritone is the pathfinding system used in [Impact](https://impactclient.net/) s | [1.19.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-forge-1.9.3.jar) | [1.19.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-fabric-1.9.3.jar) | | [1.20.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-forge-1.10.1.jar) | [1.20.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-fabric-1.10.1.jar) | -**Message for 2b2t players looking for 1.19/1.20 Baritone** Download it from right above ^. But also please check back in a few days for Baritone Elytra ([vid 1](https://youtu.be/4bGGPo8yiHo) [vid 2](https://www.youtube.com/watch?v=pUN9nmINe3I)), which will be ported to 1.19/1.20 soon! It will work on 2b2t with its anticheat, that was the whole point of Baritone Elytra (it's fully vanilla compatible). Also join [**the discord**](http://discord.gg/s6fRBAUpmr). Thanks! +**Message for 2b2t players looking for 1.19/1.20 Baritone** If you like, please try the beta for Baritone Elytra for 2b2t 1.19.4, find it in #announcements of [the Baritone discord](http://discord.gg/s6fRBAUpmr). If you have to see it to believe it, watch [this YouTube video](https://youtu.be/NnSlQi-68eQ). **How to immediately get started:** Type `#goto 1000 500` in chat to go to x=1000 z=500. Type `#mine diamond_ore` to mine diamond ore. Type `#stop` to stop. For more, read [the usage page](USAGE.md) and/or watch this [tutorial playlist](https://www.youtube.com/playlist?list=PLnwnJ1qsS7CoQl9Si-RTluuzCo_4Oulpa). Also try `#elytra` for Elytra flying in the Nether using fireworks. From e063475ebd5dc180880846ad1a3c7e10a0a209bb Mon Sep 17 00:00:00 2001 From: leijurv Date: Fri, 18 Aug 2023 19:22:40 -0700 Subject: [PATCH 2/3] list 1.20 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c990292fc..3f2923f92 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Baritone is the pathfinding system used in [Impact](https://impactclient.net/) s | [1.19.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-forge-1.9.3.jar) | [1.19.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-fabric-1.9.3.jar) | | [1.20.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-forge-1.10.1.jar) | [1.20.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-fabric-1.10.1.jar) | -**Message for 2b2t players looking for 1.19/1.20 Baritone** If you like, please try the beta for Baritone Elytra for 2b2t 1.19.4, find it in #announcements of [the Baritone discord](http://discord.gg/s6fRBAUpmr). If you have to see it to believe it, watch [this YouTube video](https://youtu.be/NnSlQi-68eQ). +**Message for 2b2t players looking for 1.19/1.20 Baritone** If you like, please try the beta for Baritone Elytra for 2b2t, find it in #announcements of [the Baritone discord](http://discord.gg/s6fRBAUpmr). It supports 1.19.4 and 1.20.1, Forge or Fabric. If you have to see it to believe it, watch [this YouTube video](https://youtu.be/NnSlQi-68eQ). **How to immediately get started:** Type `#goto 1000 500` in chat to go to x=1000 z=500. Type `#mine diamond_ore` to mine diamond ore. Type `#stop` to stop. For more, read [the usage page](USAGE.md) and/or watch this [tutorial playlist](https://www.youtube.com/playlist?list=PLnwnJ1qsS7CoQl9Si-RTluuzCo_4Oulpa). Also try `#elytra` for Elytra flying in the Nether using fireworks. From c4f33b72c24d658ccc569994d62004afdebcaa90 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 20 Aug 2023 11:53:54 -0700 Subject: [PATCH 3/3] check chunk load in sepples --- build.gradle | 2 +- src/main/java/baritone/process/elytra/ElytraBehavior.java | 3 ++- .../java/baritone/process/elytra/NetherPathfinderContext.java | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b981972d3..75d17fb02 100755 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,7 @@ allprojects { // The following line declares the yarn mappings you may select this one as well. // mappings "net.fabricmc:yarn:1.17.1+build.32:v2" //launchImplementation('dev.babbaj:nether-pathfinder:1.3.0') - implementation 'dev.babbaj:nether-pathfinder:1.3.0' + implementation 'dev.babbaj:nether-pathfinder:1.4' } tasks.withType(JavaCompile).configureEach { diff --git a/src/main/java/baritone/process/elytra/ElytraBehavior.java b/src/main/java/baritone/process/elytra/ElytraBehavior.java index 127f90131..a0763095d 100644 --- a/src/main/java/baritone/process/elytra/ElytraBehavior.java +++ b/src/main/java/baritone/process/elytra/ElytraBehavior.java @@ -42,6 +42,7 @@ import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.inventory.ClickType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.chunk.ChunkSource; import net.minecraft.world.level.chunk.LevelChunk; @@ -302,7 +303,7 @@ public final class ElytraBehavior implements Helper { int rangeStartIncl = playerNear; int rangeEndExcl = playerNear; - while (rangeEndExcl < path.size() && ctx.world().isLoaded(path.get(rangeEndExcl))) { + while (rangeEndExcl < path.size() && context.hasChunk(new ChunkPos(path.get(rangeEndExcl)))) { rangeEndExcl++; } // rangeEndExcl now represents an index either not in the path, or just outside render distance diff --git a/src/main/java/baritone/process/elytra/NetherPathfinderContext.java b/src/main/java/baritone/process/elytra/NetherPathfinderContext.java index de666a0a8..aa9f4965a 100644 --- a/src/main/java/baritone/process/elytra/NetherPathfinderContext.java +++ b/src/main/java/baritone/process/elytra/NetherPathfinderContext.java @@ -60,6 +60,10 @@ public final class NetherPathfinderContext { this.executor = Executors.newSingleThreadExecutor(); } + public boolean hasChunk(ChunkPos pos) { + return NetherPathfinder.hasChunkFromJava(this.context, pos.x, pos.z); + } + public void queueCacheCulling(int chunkX, int chunkZ, int maxDistanceBlocks, BlockStateOctreeInterface boi) { this.executor.execute(() -> { synchronized (this.cullingLock) {