mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Update entity data when attaching firework to entity
== AT == public net.minecraft.world.entity.projectile.FireworkRocketEntity DATA_ATTACHED_TO_TARGET
This commit is contained in:
parent
9f09c7a54d
commit
efc4457fa1
1 changed files with 4 additions and 0 deletions
|
@ -69,6 +69,10 @@ public class CraftFirework extends CraftProjectile implements Firework {
|
|||
}
|
||||
|
||||
this.getHandle().attachedToEntity = (entity != null) ? ((CraftLivingEntity) entity).getHandle() : null;
|
||||
// Paper start - update entity data
|
||||
this.getHandle().getEntityData().set(FireworkRocketEntity.DATA_ATTACHED_TO_TARGET,
|
||||
entity != null ? java.util.OptionalInt.of(entity.getEntityId()) : java.util.OptionalInt.empty());
|
||||
// Paper end - update entity data
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue