@@ -1,22 +1,22 @@
|
||||
--- a/net/minecraft/server/BlockEnderPortal.java
|
||||
+++ b/net/minecraft/server/BlockEnderPortal.java
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+import org.bukkit.event.entity.EntityPortalEnterEvent; // CraftBukkit
|
||||
+
|
||||
public class BlockEnderPortal extends BlockTileEntity {
|
||||
|
||||
protected static final AxisAlignedBB a = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.75D, 1.0D);
|
||||
@@ -37,6 +39,10 @@
|
||||
protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 12.0D, 16.0D);
|
||||
@@ -28,6 +30,10 @@
|
||||
|
||||
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
|
||||
if (!world.isClientSide && !entity.isPassenger() && !entity.isVehicle() && entity.bf() && entity.getBoundingBox().c(iblockdata.e(world, blockposition).a(blockposition))) {
|
||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (!world.isClientSide && !entity.isPassenger() && !entity.isVehicle() && entity.bm() && VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.g(world, blockposition), OperatorBoolean.AND)) {
|
||||
+ // CraftBukkit start - Entity in portal
|
||||
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
+ world.getServer().getPluginManager().callEvent(event);
|
||||
+ // CraftBukkit end
|
||||
entity.b(1);
|
||||
entity.d(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user