mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-21 20:56:45 +01:00
parent
b5ecd214ef
commit
04eefaef79
@ -1,4 +1,5 @@
|
|||||||
Version 2.2.027
|
Version 2.2.027
|
||||||
|
Fixed Ricocheted arrows losing some data after a ricochet
|
||||||
Fixed concurrency issue with Folia regarding locale strings
|
Fixed concurrency issue with Folia regarding locale strings
|
||||||
Fixed concurrency issue with Folia regarding COTW summons
|
Fixed concurrency issue with Folia regarding COTW summons
|
||||||
|
|
||||||
|
@ -64,10 +64,17 @@ public class CrossbowsManager extends SkillManager {
|
|||||||
|
|
||||||
// Spawn new arrow with the reflected direction
|
// Spawn new arrow with the reflected direction
|
||||||
Arrow spawnedArrow = originalArrow.getWorld().spawnArrow(origin, reflectedDirection, 1, 1);
|
Arrow spawnedArrow = originalArrow.getWorld().spawnArrow(origin, reflectedDirection, 1, 1);
|
||||||
|
// copy some properties from the old arrow
|
||||||
|
spawnedArrow.setShooter(originalArrowShooter);
|
||||||
|
spawnedArrow.setCritical(originalArrow.isCritical());
|
||||||
|
spawnedArrow.setPierceLevel(originalArrow.getPierceLevel());
|
||||||
|
spawnedArrow.setPickupStatus(originalArrow.getPickupStatus());
|
||||||
|
spawnedArrow.setKnockbackStrength(originalArrow.getKnockbackStrength());
|
||||||
|
|
||||||
|
// copy metadata from old arrow
|
||||||
ProjectileUtils.copyArrowMetadata(pluginRef, originalArrow, spawnedArrow);
|
ProjectileUtils.copyArrowMetadata(pluginRef, originalArrow, spawnedArrow);
|
||||||
originalArrow.remove();
|
originalArrow.remove();
|
||||||
// copy metadata from old arrow
|
// add important metadata to new arrow
|
||||||
spawnedArrow.setShooter(originalArrowShooter);
|
|
||||||
spawnedArrow.setMetadata(MetadataConstants.METADATA_KEY_BOUNCE_COUNT,
|
spawnedArrow.setMetadata(MetadataConstants.METADATA_KEY_BOUNCE_COUNT,
|
||||||
new FixedMetadataValue(pluginRef, bounceCount + 1));
|
new FixedMetadataValue(pluginRef, bounceCount + 1));
|
||||||
spawnedArrow.setMetadata(MetadataConstants.METADATA_KEY_SPAWNED_ARROW,
|
spawnedArrow.setMetadata(MetadataConstants.METADATA_KEY_SPAWNED_ARROW,
|
||||||
|
Loading…
Reference in New Issue
Block a user