mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 23:45:44 +00:00
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
|
@@ -9,6 +9,8 @@
|
|
import net.minecraft.util.DamageSource;
|
|
import net.minecraft.util.MovingObjectPosition;
|
|
import net.minecraft.world.World;
|
|
+import net.minecraftforge.common.MinecraftForge;
|
|
+import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
|
|
|
public class EntityEnderPearl extends EntityThrowable
|
|
{
|
|
@@ -50,6 +52,9 @@
|
|
|
|
if (entityplayermp.field_71135_a.func_147362_b().func_150724_d() && entityplayermp.field_70170_p == this.field_70170_p)
|
|
{
|
|
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.field_70165_t, this.field_70163_u, this.field_70161_v, 5.0F);
|
|
+ if (!MinecraftForge.EVENT_BUS.post(event))
|
|
+ { // Don't indent to lower patch size
|
|
if (this.func_85052_h().func_70115_ae())
|
|
{
|
|
this.func_85052_h().func_70078_a((Entity)null);
|
|
@@ -58,6 +63,7 @@
|
|
this.func_85052_h().func_70634_a(this.field_70165_t, this.field_70163_u, this.field_70161_v);
|
|
this.func_85052_h().field_70143_R = 0.0F;
|
|
this.func_85052_h().func_70097_a(DamageSource.field_76379_h, 5.0F);
|
|
+ }
|
|
}
|
|
}
|
|
|