mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +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
70 lines
4.6 KiB
Diff
70 lines
4.6 KiB
Diff
From a088adbba3accae04e91e53618a5a71edb2b3c7f 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 5b856aea2f..13a6ddac59 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
|
@@ -43,7 +43,7 @@ public class EntityMushroomCow extends EntityCow {
|
|
if (this.hasCustomName()) {
|
|
entitycow.setCustomName(this.getCustomName());
|
|
}
|
|
-
|
|
+ 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);
|
|
|
|
for (int i = 0; i < 5; ++i) {
|
|
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
index 8fe68c2eb4..3b5d95945a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
|
@@ -623,7 +623,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
|
|
entitywitch.setCustomName(this.getCustomName());
|
|
entitywitch.setCustomNameVisible(this.getCustomNameVisible());
|
|
}
|
|
-
|
|
+ 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); // Paper - Added lightning spawn reason for this entity
|
|
this.die();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
index e5170bff5b..04d25ad76a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
|
@@ -234,7 +234,7 @@ public class EntityZombie extends EntityMonster {
|
|
entityzombie.setCustomName(this.getCustomName());
|
|
entityzombie.setCustomNameVisible(this.getCustomNameVisible());
|
|
}
|
|
-
|
|
+ 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();
|
|
}
|
|
@@ -393,6 +393,7 @@ public class EntityZombie extends EntityMonster {
|
|
entityzombievillager.setCustomNameVisible(entityvillager.getCustomNameVisible());
|
|
}
|
|
|
|
+ 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.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
|
|
this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0);
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
index bf136a6aa3..94bd3c5b37 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
|
@@ -130,7 +130,7 @@ public class EntityZombieVillager extends EntityZombie {
|
|
entityvillager.setCustomName(this.getCustomName());
|
|
entityvillager.setCustomNameVisible(this.getCustomNameVisible());
|
|
}
|
|
-
|
|
+ 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.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason
|
|
if (this.bD != null) {
|
|
EntityHuman entityhuman = this.world.b(this.bD);
|
|
--
|
|
2.18.0
|
|
|