File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
src/main/java/meteordevelopment/meteorclient Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1515import meteordevelopment .meteorclient .systems .modules .Categories ;
1616import meteordevelopment .meteorclient .systems .modules .Module ;
1717import meteordevelopment .meteorclient .systems .modules .Modules ;
18+ import meteordevelopment .meteorclient .utils .entity .EntityUtils ;
1819import meteordevelopment .orbit .EventHandler ;
1920import net .minecraft .entity .Entity ;
2021import net .minecraft .entity .LivingEntity ;
@@ -151,14 +152,17 @@ private void onTick(TickEvent.Pre event) {
151152 }
152153
153154 if (sendTimer <= 0 ) {
154- sendPackets = false ;
155-
156- if (attackPacket == null || swingPacket == null ) return ;
155+ if (attackPacket == null || swingPacket == null ) {
156+ sendPackets = false ;
157+ return ;
158+ }
157159 mc .getNetworkHandler ().sendPacket (attackPacket );
158160 mc .getNetworkHandler ().sendPacket (swingPacket );
159161
160162 attackPacket = null ;
161163 swingPacket = null ;
164+
165+ sendPackets = false ;
162166 } else {
163167 sendTimer --;
164168 }
@@ -177,6 +181,9 @@ private void sendPacket(double height) {
177181 }
178182
179183 private boolean skipCrit () {
184+ if (EntityUtils .isInCobweb (mc .player ) && (mode .get () == Mode .Jump || mode .get () == Mode .MiniJump ))
185+ return true ;
186+
180187 return !mc .player .isOnGround () || mc .player .isSubmergedInWater () || mc .player .isInLava () || mc .player .isClimbing ();
181188 }
182189
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ public static boolean isAboveWater(Entity entity) {
9292 return false ;
9393 }
9494
95+ public static boolean isInCobweb (Entity entity ) {
96+ return mc .world .getStatesInBoxIfLoaded (entity .getBoundingBox ()).anyMatch (state -> state .isOf (Blocks .COBWEB ));
97+ }
98+
9599 public static boolean isInRenderDistance (Entity entity ) {
96100 if (entity == null ) return false ;
97101 return isInRenderDistance (entity .getX (), entity .getZ ());
You can’t perform that action at this time.
0 commit comments