mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 05:31:32 +01:00
SPIGOT-2953: Set damager for fireworks
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e6b0af2e55
commit
2b518036f5
1 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,14 @@
|
||||||
--- a/net/minecraft/server/EntityFireworks.java
|
--- a/net/minecraft/server/EntityFireworks.java
|
||||||
+++ b/net/minecraft/server/EntityFireworks.java
|
+++ b/net/minecraft/server/EntityFireworks.java
|
||||||
@@ -117,8 +117,12 @@
|
@@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
||||||
|
|
||||||
|
public class EntityFireworks extends Entity {
|
||||||
|
|
||||||
|
@@ -117,8 +118,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
||||||
|
@ -15,3 +23,13 @@
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -136,7 +141,9 @@
|
||||||
|
|
||||||
|
if (f > 0.0F) {
|
||||||
|
if (this.e != null) {
|
||||||
|
+ CraftEventFactory.entityDamage = this; // CraftBukkit
|
||||||
|
this.e.damageEntity(DamageSource.t, (float) (5 + nbttaglist.size() * 2));
|
||||||
|
+ CraftEventFactory.entityDamage = null; // CraftBukkit
|
||||||
|
}
|
||||||
|
|
||||||
|
double d0 = 5.0D;
|
||||||
|
|
Loading…
Add table
Reference in a new issue