[Bleeding] Add experimental support for entity portal traveling
This commit is contained in:
@@ -3,6 +3,8 @@ package net.minecraft.server;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit
|
||||
|
||||
public class BlockEnderPortal extends BlockContainer {
|
||||
|
||||
public static boolean a = false;
|
||||
@@ -38,6 +40,10 @@ public class BlockEnderPortal extends BlockContainer {
|
||||
|
||||
public void a(World world, int i, int j, int k, Entity entity) {
|
||||
if (entity.vehicle == null && entity.passenger == null && !world.isStatic) {
|
||||
// CraftBukkit start - Entity in portal
|
||||
EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), i, j, k));
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
// CraftBukkit end
|
||||
entity.b(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user