mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-27 10:23:52 -07:00
#724: Re-implement player portal event search radius and creation API
This also fixes that the nether/end portals would be created even if the event was cancelled as well as that the EntityPortalEvent would be called for player portal usage which is not according to its API specification By: Phoenix616 <max@themoep.de>
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
--- a/net/minecraft/server/ShapeDetectorShape.java
|
||||
+++ b/net/minecraft/server/ShapeDetectorShape.java
|
||||
@@ -6,8 +6,12 @@
|
||||
@@ -1,13 +1,21 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import org.bukkit.craftbukkit.event.CraftPortalEvent; // CraftBukkit
|
||||
+
|
||||
public class ShapeDetectorShape {
|
||||
|
||||
public final Vec3D position;
|
||||
public final Vec3D velocity;
|
||||
public final float yaw;
|
||||
public final float pitch;
|
||||
+ // CraftBukkit start
|
||||
+ public final WorldServer world;
|
||||
+ public final CraftPortalEvent portalEventInfo;
|
||||
|
||||
- public ShapeDetectorShape(Vec3D vec3d, Vec3D vec3d1, float f, float f1) {
|
||||
+ public ShapeDetectorShape(Vec3D vec3d, Vec3D vec3d1, float f, float f1, WorldServer world) {
|
||||
+ public ShapeDetectorShape(Vec3D vec3d, Vec3D vec3d1, float f, float f1, WorldServer world, CraftPortalEvent portalEventInfo) {
|
||||
+ this.world = world;
|
||||
+ this.portalEventInfo = portalEventInfo;
|
||||
+ // CraftBukkit end
|
||||
this.position = vec3d;
|
||||
this.velocity = vec3d1;
|
||||
|
Reference in New Issue
Block a user