Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
899bc53b79
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: f47abd88 SPIGOT-6242: Fix some file line endings de96535b SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable CraftBukkit Changes: 4475707d SPIGOT-6244: /spawnpoint ignores angle 8b3b096d SPIGOT-6242: Fix some file line endings 4b33c749 SPIGOT-6186: Canceling a CreatureSpawnEvent results in a "Unable to summon entity due to duplicate UUIDs" error 2b3ca726 SPIGOT-6236: Vehicle passenger portal cooldown does not change
33 Zeilen
2.0 KiB
Diff
33 Zeilen
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sat, 9 Jun 2018 14:08:39 +0200
|
|
Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
index 6a0f7b02c5a2663bb7304a1f8c6cbf1603507d45..5550fd9ea6bcae07dcdf431322cb0da0b26a6d71 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
@@ -168,9 +168,20 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
|
|
|
}
|
|
// CraftBukkit end
|
|
+ // Paper start - EntityTeleportEndGatewayEvent - replicated from above
|
|
+ org.bukkit.craftbukkit.entity.CraftEntity bukkitEntity = entity.getBukkitEntity();
|
|
+ org.bukkit.Location location = new Location(world.getWorld(), (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
|
|
+ location.setPitch(bukkitEntity.getLocation().getPitch());
|
|
+ location.setYaw(bukkitEntity.getLocation().getYaw());
|
|
+
|
|
+ com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent event = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(MCUtil.toLocation(world, this.getPosition()).getBlock()));
|
|
+ if (!event.callEvent()) {
|
|
+ return;
|
|
+ }
|
|
+ // Paper end
|
|
|
|
entity1.resetPortalCooldown();
|
|
- entity1.enderTeleportAndLoad((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D);
|
|
+ entity1.enderTeleportAndLoad(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ()); // Paper
|
|
}
|
|
|
|
this.h();
|