mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 4a97a7ca Add option to disable pillager patrols (#2626) 23e53aab Backport MC-160177 fix from 1.15 (#2702) 45089d59 Update upstream CB 761c24fa Fix stuck in sneak when changing worlds (MC-10657) (#2627)
33 lines
1.4 KiB
Diff
33 lines
1.4 KiB
Diff
From 802e64b9f8494e865901c339b040d3d72d94be40 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 19 Oct 2019 03:28:06 -0500
|
|
Subject: [PATCH] Add ThrownEggHatchEvent
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/EntityEgg.java | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java
|
|
index aedf2ce17d..e82798cf21 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEgg.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEgg.java
|
|
@@ -52,6 +52,15 @@ public class EntityEgg extends EntityProjectileThrowable {
|
|
hatchingType = event.getHatchingType();
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ net.pl3x.purpur.event.entity.ThrownEggHatchEvent event = new net.pl3x.purpur.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, b0, hatchingType);
|
|
+ event.callEvent();
|
|
+
|
|
+ b0 = event.getNumHatches();
|
|
+ hatching = event.isHatching();
|
|
+ hatchingType = event.getHatchingType();
|
|
+ // Purpur end
|
|
+
|
|
if (hatching) {
|
|
for (int i = 0; i < b0; ++i) {
|
|
Entity entity = world.getWorld().createEntity(new org.bukkit.Location(world.getWorld(), this.locX, this.locY, this.locZ, this.yaw, 0.0F), hatchingType.getEntityClass());
|
|
--
|
|
2.24.0.rc1
|
|
|