mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
20 lines
948 B
Diff
20 lines
948 B
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockEndPortal.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockEndPortal.java
|
|
@@ -19,6 +19,7 @@
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
+import org.bukkit.event.entity.EntityPortalEnterEvent;
|
|
|
|
public class BlockEndPortal extends BlockContainer
|
|
{
|
|
@@ -69,6 +70,8 @@
|
|
{
|
|
if (!worldIn.isRemote && !entityIn.isRiding() && !entityIn.isBeingRidden() && entityIn.isNonBoss() && entityIn.getEntityBoundingBox().intersects(state.getBoundingBox(worldIn, pos).offset(pos)))
|
|
{
|
|
+ EntityPortalEnterEvent event = new EntityPortalEnterEvent(entityIn.getBukkitEntity(), new org.bukkit.Location(worldIn.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
|
+ worldIn.getServer().getPluginManager().callEvent(event);
|
|
entityIn.changeDimension(1);
|
|
}
|
|
}
|