File tree Expand file tree Collapse file tree
src/launch/java/baritone/launch/mixins Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import net .minecraft .client .KeyMapping ;
2727import net .minecraft .client .player .LocalPlayer ;
2828import net .minecraft .world .entity .player .Abilities ;
29- import net .minecraft .world .item .ElytraItem ;
30- import net .minecraft .world .item .ItemStack ;
3129import org .spongepowered .asm .mixin .Mixin ;
3230import org .spongepowered .asm .mixin .injection .At ;
3331import org .spongepowered .asm .mixin .injection .Inject ;
@@ -112,14 +110,14 @@ private void updateRidden(CallbackInfo cb) {
112110 method = "aiStep" ,
113111 at = @ At (
114112 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"
116114 )
117115 )
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 );
120118 if (baritone != null && baritone .getPathingBehavior ().isPathing ()) {
121119 return false ;
122120 }
123- return ElytraItem . isFlyEnabled ( stack );
121+ return instance . tryToStartFallFlying ( );
124122 }
125123}
You can’t perform that action at this time.
0 commit comments