Skip to content

Commit

Permalink
Remove unsafe generic cast
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSharp committed Jan 20, 2024
1 parent be1203f commit e7e434a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/baritone/process/ElytraProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ private ElytraProcess(Baritone baritone) {
baritone.getGameEventHandler().registerEventListener(this);
}

public static <T extends IElytraProcess> T create(final Baritone baritone) {
return (T) (NetherPathfinderContext.isSupported()
public static IElytraProcess create(final Baritone baritone) {
return NetherPathfinderContext.isSupported()
? new ElytraProcess(baritone)
: new NullElytraProcess(baritone));
: new NullElytraProcess(baritone);
}

@Override
Expand Down

0 comments on commit e7e434a

Please sign in to comment.