geforkt von Mirrors/Paper
fix a mis-applied hunk in Projectile
Dieser Commit ist enthalten in:
Ursprung
8cca65b8ac
Commit
de10a277e2
@ -139,7 +139,7 @@
|
||||
Executor dispatcher,
|
||||
LevelStorageSource.LevelStorageAccess levelStorageAccess,
|
||||
- ServerLevelData serverLevelData,
|
||||
+ PrimaryLevelData serverLevelData, // CraftBukkit
|
||||
+ net.minecraft.world.level.storage.PrimaryLevelData serverLevelData, // CraftBukkit
|
||||
ResourceKey<Level> dimension,
|
||||
LevelStem levelStem,
|
||||
ChunkProgressListener progressListener,
|
||||
|
@ -78,30 +78,20 @@
|
||||
factory.create(level, owner, spawnedFrom),
|
||||
level,
|
||||
spawnedFrom,
|
||||
@@ -200,7 +_,22 @@
|
||||
float velocity,
|
||||
float inaccuracy
|
||||
@@ -206,7 +_,12 @@
|
||||
public static <T extends Projectile> T spawnProjectileUsingShoot(
|
||||
T projectile, ServerLevel level, ItemStack spawnedFrom, double x, double y, double z, float velocity, float inaccuracy
|
||||
) {
|
||||
- return spawnProjectile(factory.create(level, owner, spawnedFrom), level, spawnedFrom, projectile -> projectile.shoot(x, y, z, velocity, inaccuracy));
|
||||
+ // Paper start - fixes and addition to spawn reason API
|
||||
+ return Projectile.spawnProjectileUsingShootDelayed(factory, level, spawnedFrom, owner, x, y, z, velocity, inaccuracy).spawn();
|
||||
- return spawnProjectile(projectile, level, spawnedFrom, projectile1 -> projectile.shoot(x, y, z, velocity, inaccuracy));
|
||||
+ // Paper start - fixes and addition to spawn reason API
|
||||
+ return spawnProjectileUsingShootDelayed(projectile, level, spawnedFrom, x, y, z, velocity, inaccuracy).spawn();
|
||||
+ }
|
||||
+ public static <T extends Projectile> Delayed<T> spawnProjectileUsingShootDelayed(
|
||||
+ Projectile.ProjectileFactory<T> factory,
|
||||
+ ServerLevel level,
|
||||
+ ItemStack spawnedFrom,
|
||||
+ LivingEntity owner,
|
||||
+ double x,
|
||||
+ double y,
|
||||
+ double z,
|
||||
+ float velocity,
|
||||
+ float inaccuracy
|
||||
+ ) {
|
||||
+ return spawnProjectileDelayed(factory.create(level, owner, spawnedFrom), level, spawnedFrom, projectile -> projectile.shoot(x, y, z, velocity, inaccuracy));
|
||||
+ // Paper end - fixes and addition to spawn reason API
|
||||
+ public static <T extends Projectile> Delayed<T> spawnProjectileUsingShootDelayed(T projectile, ServerLevel level, ItemStack spawnedFrom, double x, double y, double z, float velocity, float inaccuracy) {
|
||||
+ return spawnProjectileDelayed(projectile, level, spawnedFrom, projectile1 -> projectile.shoot(x, y, z, velocity, inaccuracy));
|
||||
+ // Paper end - fixes and addition to spawn reason API
|
||||
}
|
||||
|
||||
public static <T extends Projectile> T spawnProjectileUsingShoot(
|
||||
public static <T extends Projectile> T spawnProjectile(T projectile, ServerLevel level, ItemStack spawnedFrom) {
|
||||
@@ -214,11 +_,45 @@
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren