@@ -1,19 +1,19 @@
|
||||
--- a/net/minecraft/server/EntityEnderPearl.java
|
||||
+++ b/net/minecraft/server/EntityEnderPearl.java
|
||||
@@ -1,5 +1,12 @@
|
||||
@@ -1,6 +1,12 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
|
||||
public class EntityEnderPearl extends EntityProjectile {
|
||||
|
||||
private EntityLiving d;
|
||||
@@ -59,21 +66,35 @@
|
||||
@@ -61,21 +67,35 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) entityliving;
|
||||
|
||||
if (entityplayer.playerConnection.a().isConnected() && entityplayer.world == this.world && !entityplayer.isSleeping()) {
|
||||
@@ -23,6 +23,10 @@
|
||||
- entityendermite.a(true);
|
||||
- entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
|
||||
- this.world.addEntity(entityendermite);
|
||||
- }
|
||||
-
|
||||
- if (entityliving.isPassenger()) {
|
||||
- entityliving.stopRiding();
|
||||
+ // CraftBukkit start - Fire PlayerTeleportEvent
|
||||
+ org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
|
||||
+ org.bukkit.Location location = getBukkitEntity().getLocation();
|
||||
@@ -52,10 +56,6 @@
|
||||
+ CraftEventFactory.entityDamage = null;
|
||||
}
|
||||
-
|
||||
- if (entityliving.isPassenger()) {
|
||||
- entityliving.stopRiding();
|
||||
- }
|
||||
-
|
||||
- entityliving.enderTeleportTo(this.locX, this.locY, this.locZ);
|
||||
- entityliving.fallDistance = 0.0F;
|
||||
- entityliving.damageEntity(DamageSource.FALL, 5.0F);
|
||||
|
||||
Reference in New Issue
Block a user