@@ -13,8 +13,8 @@
|
||||
|
||||
public class EntityEnderPearl extends EntityProjectileThrowable {
|
||||
|
||||
@@ -65,21 +71,35 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) entityliving;
|
||||
@@ -37,21 +43,35 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) entity;
|
||||
|
||||
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
||||
- if (this.random.nextFloat() < 0.05F && this.world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING)) {
|
||||
@@ -34,29 +34,29 @@
|
||||
|
||||
- entityendermite.setPlayerSpawned(true);
|
||||
+ entityendermite.setPlayerSpawned(true);
|
||||
entityendermite.setPositionRotation(entityliving.locX(), entityliving.locY(), entityliving.locZ(), entityliving.yaw, entityliving.pitch);
|
||||
entityendermite.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch);
|
||||
- this.world.addEntity(entityendermite);
|
||||
- }
|
||||
+ this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
|
||||
+ }
|
||||
|
||||
- if (entityliving.isPassenger()) {
|
||||
- entityliving.stopRiding();
|
||||
+ if (entityliving.isPassenger()) {
|
||||
+ entityliving.stopRiding();
|
||||
- if (entity.isPassenger()) {
|
||||
- entity.stopRiding();
|
||||
+ if (entity.isPassenger()) {
|
||||
+ entity.stopRiding();
|
||||
+ }
|
||||
+
|
||||
+ entityplayer.playerConnection.teleport(teleEvent.getTo());
|
||||
+ entityliving.fallDistance = 0.0F;
|
||||
+ entity.fallDistance = 0.0F;
|
||||
+ CraftEventFactory.entityDamage = this;
|
||||
+ entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||
+ entity.damageEntity(DamageSource.FALL, 5.0F);
|
||||
+ CraftEventFactory.entityDamage = null;
|
||||
}
|
||||
-
|
||||
- entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||
- entityliving.fallDistance = 0.0F;
|
||||
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||
- entity.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||
- entity.fallDistance = 0.0F;
|
||||
- entity.damageEntity(DamageSource.FALL, 5.0F);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else if (entityliving != null) {
|
||||
entityliving.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||
} else if (entity != null) {
|
||||
entity.enderTeleportTo(this.locX(), this.locY(), this.locZ());
|
||||
|
||||
Reference in New Issue
Block a user