3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

SPIGOT-1468: ENDER_PEARL SpawnReason

Dieser Commit ist enthalten in:
md_5 2016-07-01 12:30:28 +10:00
Ursprung 3804ba654e
Commit 56813c7fff

Datei anzeigen

@ -1,18 +1,19 @@
--- a/net/minecraft/server/EntityEnderPearl.java --- a/net/minecraft/server/EntityEnderPearl.java
+++ b/net/minecraft/server/EntityEnderPearl.java +++ b/net/minecraft/server/EntityEnderPearl.java
@@ -1,5 +1,11 @@ @@ -1,5 +1,12 @@
package net.minecraft.server; package net.minecraft.server;
+// CraftBukkit start +// CraftBukkit start
+import org.bukkit.Bukkit; +import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.event.entity.CreatureSpawnEvent;
+import org.bukkit.event.player.PlayerTeleportEvent; +import org.bukkit.event.player.PlayerTeleportEvent;
+// CraftBukkit end +// CraftBukkit end
+ +
public class EntityEnderPearl extends EntityProjectile { public class EntityEnderPearl extends EntityProjectile {
private EntityLiving d; private EntityLiving d;
@@ -55,21 +61,35 @@ @@ -55,21 +62,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()) {
@ -37,7 +38,7 @@
+ +
+ entityendermite.a(true); + entityendermite.a(true);
+ entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch); + entityendermite.setPositionRotation(entityliving.locX, entityliving.locY, entityliving.locZ, entityliving.yaw, entityliving.pitch);
+ this.world.addEntity(entityendermite); + this.world.addEntity(entityendermite, CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
+ } + }
+ +
+ if (entityliving.isPassenger()) { + if (entityliving.isPassenger()) {