Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
35 Zeilen
2.0 KiB
Diff
35 Zeilen
2.0 KiB
Diff
From 90a35f26fc719b3fb0debe1d9718e82618304e46 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 b36dcb4d7d..268e4996bc 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
|
@@ -138,8 +138,19 @@ 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;
|
|
+ }
|
|
|
|
- entity.enderTeleportTo((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D);
|
|
+ entity.enderTeleportTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ());
|
|
+ // Paper end - EntityTeleportEndGatewayEvent
|
|
}
|
|
|
|
this.f();
|
|
--
|
|
2.18.0
|
|
|