Skip to content

Commit

Permalink
Merge pull request #4247 from ZacSharp/pr/1.19.4/elytra/removeUnsafeCast
Browse files Browse the repository at this point in the history
Remove unsafe generic cast
  • Loading branch information
leijurv authored Jan 23, 2024
2 parents 0688a57 + e7e434a commit 48f309a
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 48f309a

Please sign in to comment.