@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityFireworks.java
|
||||
+++ b/net/minecraft/server/EntityFireworks.java
|
||||
@@ -3,12 +3,13 @@
|
||||
@@ -3,6 +3,7 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.OptionalInt;
|
||||
@@ -8,14 +8,7 @@
|
||||
|
||||
public class EntityFireworks extends Entity implements IProjectile {
|
||||
|
||||
public static final DataWatcherObject<ItemStack> FIREWORK_ITEM = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.g);
|
||||
private static final DataWatcherObject<OptionalInt> c = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.r);
|
||||
- private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i);
|
||||
+ public static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); // PAIL
|
||||
private int ticksFlown;
|
||||
public int expectedLifespan;
|
||||
private EntityLiving ridingEntity;
|
||||
@@ -133,7 +134,11 @@
|
||||
@@ -130,7 +131,11 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide && this.ticksFlown > this.expectedLifespan) {
|
||||
@@ -28,7 +21,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +151,11 @@
|
||||
@@ -143,7 +148,11 @@
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY && !this.world.isClientSide) {
|
||||
@@ -38,13 +31,13 @@
|
||||
+ this.explode();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else if (this.z) {
|
||||
} else if (this.w) {
|
||||
BlockPosition blockposition;
|
||||
|
||||
@@ -158,7 +167,11 @@
|
||||
@@ -155,7 +164,11 @@
|
||||
|
||||
this.world.getType(blockposition).a(this.world, blockposition, (Entity) this);
|
||||
if (this.l()) {
|
||||
if (this.hasExplosions()) {
|
||||
- this.explode();
|
||||
+ // CraftBukkit start
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
|
||||
@@ -54,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +197,9 @@
|
||||
@@ -181,7 +194,9 @@
|
||||
|
||||
if (f > 0.0F) {
|
||||
if (this.ridingEntity != null) {
|
||||
@@ -64,7 +57,7 @@
|
||||
}
|
||||
|
||||
double d0 = 5.0D;
|
||||
@@ -211,7 +226,9 @@
|
||||
@@ -208,7 +223,9 @@
|
||||
if (flag) {
|
||||
float f1 = f * (float) Math.sqrt((5.0D - (double) this.g(entityliving)) / 5.0D);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user