mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 11:25:55 +03:00
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/item/EntityFireworkRocket.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityFireworkRocket.java
|
|
@@ -22,9 +22,9 @@
|
|
|
|
public class EntityFireworkRocket extends Entity
|
|
{
|
|
- private static final DataParameter<Optional<ItemStack>> FIREWORK_ITEM = EntityDataManager.<Optional<ItemStack>>createKey(EntityFireworkRocket.class, DataSerializers.OPTIONAL_ITEM_STACK);
|
|
+ public static final DataParameter<Optional<ItemStack>> FIREWORK_ITEM = EntityDataManager.<Optional<ItemStack>>createKey(EntityFireworkRocket.class, DataSerializers.OPTIONAL_ITEM_STACK);
|
|
private int fireworkAge;
|
|
- private int lifetime;
|
|
+ public int lifetime;
|
|
|
|
public EntityFireworkRocket(World worldIn)
|
|
{
|
|
@@ -132,7 +132,7 @@
|
|
|
|
if (!this.worldObj.isRemote && this.fireworkAge > this.lifetime)
|
|
{
|
|
- this.worldObj.setEntityState(this, (byte)17);
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) this.worldObj.setEntityState(this, (byte)17); // CraftBukkit
|
|
this.setDead();
|
|
}
|
|
}
|