mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
85e05732b2
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: da08d022 SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN 0cef14e4 Remove draft API from selectEntities CraftBukkit Changes:a46fdbc6
Remove outdated build delay.3697519b
SPIGOT-4708: Fix ExactChoice recipes neglecting material9ead7009
SPIGOT-4677: Add minecraft.admin.command_feedback permissionc3749a23
Remove the Damage tag from items when it is 0.f74c7b95
SPIGOT-4706: Can't interact with active item494eef45
Mention requirement of JIRA ticket for bug fixes51d62dec
SPIGOT-4702: Exception when middle clicking certain slotsbe557e69
SPIGOT-4700: Add PlayerFishEvent.State.REEL_IN
63 lines
No EOL
4.7 KiB
Diff
63 lines
No EOL
4.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Anthony MacAllister <anthonymmacallister@gmail.com>
|
|
Date: Thu, 26 Jul 2018 15:30:03 -0400
|
|
Subject: [PATCH] EntityTransformedEvent
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
|
index 141c17bf80..dde9f1e61e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
|
@@ -0,0 +0,0 @@ public class EntityMushroomCow extends EntityCow {
|
|
if (CraftEventFactory.callEntityTransformEvent(this, entitycow, EntityTransformEvent.TransformReason.SHEARED).isCancelled()) {
|
|
return false;
|
|
}
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitycow.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.SHEARED).callEvent()) return false; // Paper
|
|
this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED);
|
|
|
|
this.die(); // CraftBukkit - from above
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 78acac4ca7..f01e776fe5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -0,0 +0,0 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
|
if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
|
|
return;
|
|
}
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitywitch.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.LIGHTNING).callEvent()) return; // Paper
|
|
this.world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
|
|
// CraftBukkit end
|
|
this.die();
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index 7a943a6c27..7998b80c17 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
|
return;
|
|
}
|
|
// CraftBukkit end
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityzombie.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.DROWNED).callEvent()) return; // Paper
|
|
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.DROWNED); // CraftBukkit - added spawn reason
|
|
this.die();
|
|
}
|
|
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
|
if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) {
|
|
return;
|
|
}
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityvillager.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.INFECTED).callEvent()) return; // Paper
|
|
this.world.kill(entityvillager); // CraftBukkit - from above
|
|
this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
|
|
// CraftBukkit end
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
index 670e38eb8e..359ac8b88c 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
@@ -0,0 +0,0 @@ public class EntityZombieVillager extends EntityZombie {
|
|
if (CraftEventFactory.callEntityTransformEvent(this, entityvillager, EntityTransformEvent.TransformReason.CURED).isCancelled()) {
|
|
return;
|
|
}
|
|
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityvillager.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.CURED).callEvent()) return; // Paper
|
|
this.world.kill(this); // CraftBukkit - from above
|
|
this.world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason
|
|
// CraftBukkit end
|
|
--
|