mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 8d036cea Expose the internal current tick 0c715390 [PATCH] bounding box check for hanging entities (#2664) 527073aa Update config version 0d3b35c3 Rename baby zombie movement config option
33 lines
1.4 KiB
Diff
33 lines
1.4 KiB
Diff
From b47b58dad8826e0d9c701a76764d50962b619bd1 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
|
|
|