Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
30 lines
1.6 KiB
Diff
30 lines
1.6 KiB
Diff
--- a/net/minecraft/world/entity/OminousItemSpawner.java
|
|
+++ b/net/minecraft/world/entity/OminousItemSpawner.java
|
|
@@ -77,7 +_,7 @@
|
|
entity = this.spawnProjectile(serverLevel, projectileItem, item);
|
|
} else {
|
|
entity = new ItemEntity(serverLevel, this.getX(), this.getY(), this.getZ(), item);
|
|
- serverLevel.addFreshEntity(entity);
|
|
+ serverLevel.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.OMINOUS_ITEM_SPAWNER); // Paper - fixes and addition to spawn reason API
|
|
}
|
|
|
|
serverLevel.levelEvent(3021, this.blockPosition(), 1);
|
|
@@ -91,7 +_,7 @@
|
|
ProjectileItem.DispenseConfig dispenseConfig = projectileItem.createDispenseConfig();
|
|
dispenseConfig.overrideDispenseEvent().ifPresent(i -> level.levelEvent(i, this.blockPosition(), 0));
|
|
Direction direction = Direction.DOWN;
|
|
- Projectile projectile = Projectile.spawnProjectileUsingShoot(
|
|
+ Projectile projectile = Projectile.spawnProjectileUsingShootDelayed( // Paper - fixes and addition to spawn reason API
|
|
projectileItem.asProjectile(level, this.position(), stack, direction),
|
|
level,
|
|
stack,
|
|
@@ -100,7 +_,7 @@
|
|
direction.getStepZ(),
|
|
dispenseConfig.power(),
|
|
dispenseConfig.uncertainty()
|
|
- );
|
|
+ ).spawn(org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.OMINOUS_ITEM_SPAWNER); // Paper - fixes and addition to spawn reason API
|
|
projectile.setOwner(this);
|
|
return projectile;
|
|
}
|