mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Update to 1.15
This commit is contained in:
32
patches/server/0077-Add-ThrownEggHatchEvent.patch
Normal file
32
patches/server/0077-Add-ThrownEggHatchEvent.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From b7c9459f996473f158443a5ba5879e5959add149 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 970f9109d9..a6212dc597 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
|
||||
|
||||
Reference in New Issue
Block a user