Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

protected Projectile(EntityType<? extends Projectile> type, Level level) {
super(type, level);
@@ -51,12 +_,25 @@
@@ -51,12 +_,29 @@

protected void setOwner(@Nullable EntityReference<Entity> owner) {
this.owner = owner;
Expand All @@ -21,6 +21,10 @@

+ // Paper start - Refresh ProjectileSource for projectiles
+ public void refreshProjectileSource(boolean fillCache) {
+ // Prevent async owner lookup during world gen,
+ // saved structures with entity inside will cause this to throw an exception.
+ // In this situation, owner lookup will be handled by CB's AbstractProjecile#getShooter
+ if (this.generation) return;
+ if (fillCache) {
+ this.getOwner();
+ }
Expand Down
Loading