Allow using old ender pearl behavior

When enabled, ender pearls will not load chunks and will save to the world instead of the player.

== AT ==
public net.minecraft.world.entity.projectile.Projectile cachedOwner
This commit is contained in:
Jason Penilla
2024-10-27 12:36:53 -07:00
parent 21f51ebd74
commit cf7a1191a9
3 changed files with 140 additions and 110 deletions

View File

@@ -75,6 +75,15 @@
break label30;
}
}
@@ -240,7 +252,7 @@
Entity entity = super.teleport(teleportTarget);
if (entity != null) {
- entity.placePortalTicket(BlockPos.containing(entity.position()));
+ if (!this.level().paperConfig().misc.legacyEnderPearlBehavior) entity.placePortalTicket(BlockPos.containing(entity.position())); // Paper - Allow using old ender pearl behavior
}
return entity;
@@ -248,7 +260,7 @@
@Override