File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/launch/java/baritone/launch/mixins Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 26
26
import net .minecraft .client .KeyMapping ;
27
27
import net .minecraft .client .player .LocalPlayer ;
28
28
import net .minecraft .world .entity .player .Abilities ;
29
- import net .minecraft .world .item .ElytraItem ;
30
- import net .minecraft .world .item .ItemStack ;
31
29
import org .spongepowered .asm .mixin .Mixin ;
32
30
import org .spongepowered .asm .mixin .injection .At ;
33
31
import org .spongepowered .asm .mixin .injection .Inject ;
@@ -112,14 +110,14 @@ private void updateRidden(CallbackInfo cb) {
112
110
method = "aiStep" ,
113
111
at = @ At (
114
112
value = "INVOKE" ,
115
- target = "net/minecraft/world/item/ElytraItem.isFlyEnabled( Lnet/minecraft/world/item/ItemStack; )Z"
113
+ target = "Lnet/minecraft/client/player/LocalPlayer;tryToStartFallFlying( )Z"
116
114
)
117
115
)
118
- private boolean isFlyEnabled ( ItemStack stack ) {
119
- IBaritone baritone = BaritoneAPI .getProvider ().getBaritoneForPlayer (( LocalPlayer ) ( Object ) this );
116
+ private boolean tryToStartFallFlying ( final LocalPlayer instance ) {
117
+ IBaritone baritone = BaritoneAPI .getProvider ().getBaritoneForPlayer (instance );
120
118
if (baritone != null && baritone .getPathingBehavior ().isPathing ()) {
121
119
return false ;
122
120
}
123
- return ElytraItem . isFlyEnabled ( stack );
121
+ return instance . tryToStartFallFlying ( );
124
122
}
125
123
}
You can’t perform that action at this time.
0 commit comments