Remove unsafe generic cast

This commit is contained in:
ZacSharp 2024-01-20 23:35:54 +01:00
parent be1203fabb
commit e7e434a95b
No known key found for this signature in database
GPG Key ID: 9453647B005083A3
1 changed files with 3 additions and 3 deletions

View File

@ -84,10 +84,10 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
baritone.getGameEventHandler().registerEventListener(this); baritone.getGameEventHandler().registerEventListener(this);
} }
public static <T extends IElytraProcess> T create(final Baritone baritone) { public static IElytraProcess create(final Baritone baritone) {
return (T) (NetherPathfinderContext.isSupported() return NetherPathfinderContext.isSupported()
? new ElytraProcess(baritone) ? new ElytraProcess(baritone)
: new NullElytraProcess(baritone)); : new NullElytraProcess(baritone);
} }
@Override @Override