Fix Entity Teleportation and cancel velocity if teleported
Uses correct setPositionRotation for Entity teleporting instead of setLocation as this is how Vanilla teleports entities. Cancel any pending motion when teleported.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
|
||||
@@ -80,7 +80,9 @@
|
||||
@@ -79,8 +79,11 @@
|
||||
}
|
||||
|
||||
DragonFireball dragonFireball = new DragonFireball(world, this.dragon, vec34.normalize());
|
||||
+ dragonFireball.preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported
|
||||
dragonFireball.moveTo(o, p, q, 0.0F, 0.0F);
|
||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper - EnderDragon Events
|
||||
world.addFreshEntity(dragonFireball);
|
||||
|
||||
Reference in New Issue
Block a user