mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 22:18:58 +01:00
Fix a mistake in EntityEnderPearl causing a double teleport
This commit is contained in:
parent
3f534696a3
commit
6f032cdc8a
1 changed files with 12 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
||||||
public class EntityEnderPearl extends EntityProjectile {
|
public class EntityEnderPearl extends EntityProjectile {
|
||||||
|
|
||||||
private EntityLiving d;
|
private EntityLiving d;
|
||||||
@@ -51,13 +57,35 @@
|
@@ -51,21 +57,35 @@
|
||||||
EntityPlayer entityplayer = (EntityPlayer) entityliving;
|
EntityPlayer entityplayer = (EntityPlayer) entityliving;
|
||||||
|
|
||||||
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
||||||
|
@ -50,7 +50,15 @@
|
||||||
+ entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
+ entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||||
+ CraftEventFactory.entityDamage = null;
|
+ CraftEventFactory.entityDamage = null;
|
||||||
}
|
}
|
||||||
|
-
|
||||||
|
- if (entityliving.isPassenger()) {
|
||||||
|
- this.stopRiding();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
|
||||||
|
- entityliving.fallDistance = 0.0F;
|
||||||
|
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
}
|
||||||
if (entityliving.isPassenger()) {
|
} else if (entityliving != null) {
|
||||||
this.stopRiding();
|
entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
|
||||||
|
|
Loading…
Add table
Reference in a new issue