Use ? super in Consumer/Predicate API (#9939)

This commit is contained in:
Jake Potrebic
2023-11-25 15:03:02 -08:00
parent 3d12fa65fa
commit cea171de11
13 changed files with 186 additions and 223 deletions

View File

@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@NotNull
public <T extends Projectile> T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity);
+
+ // Paper start
+ // Paper start - add consumer to launchProjectile
+ /**
+ * Launches a {@link Projectile} from the ProjectileSource with an
+ * initial velocity, with the supplied function run before the
@@ -29,7 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param function the function to be run before the entity is spawned
+ * @return the launched projectile
+ */
+ @NotNull
+ public <T extends Projectile> T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity, @Nullable java.util.function.Consumer<T> function);
+ // Paper end
+ <T extends Projectile> @NotNull T launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity, java.util.function.@Nullable Consumer<? super T> function);
+ // Paper end - add consumer to launchProjectile
}