mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 01:03:44 +01:00 
			
		
		
		
	fix trickshot not applying potion effects or custom effects
This commit is contained in:
		| @@ -2,6 +2,7 @@ Version 2.2.036 | |||||||
|     Fixed a bug where Chimaera Wing could cause an exception when used |     Fixed a bug where Chimaera Wing could cause an exception when used | ||||||
|     Fixed bug where Mob Spawners could drop in Blast Mining (thanks TomBock) |     Fixed bug where Mob Spawners could drop in Blast Mining (thanks TomBock) | ||||||
|     Fixed Spectral Arrows not granting XP for Archery or Crossbows (thanks broccolai) |     Fixed Spectral Arrows not granting XP for Archery or Crossbows (thanks broccolai) | ||||||
|  |     Fixed bug where Trickshot arrows would lose their potion or custom effects | ||||||
|     Added locale strings for /mcmmo help command (thanks Griffeng) |     Added locale strings for /mcmmo help command (thanks Griffeng) | ||||||
|  |  | ||||||
| Version 2.2.035 | Version 2.2.035 | ||||||
|   | |||||||
| @@ -74,6 +74,16 @@ public class CrossbowsManager extends SkillManager { | |||||||
|         spawnedArrow.setPickupStatus(originalArrow.getPickupStatus()); |         spawnedArrow.setPickupStatus(originalArrow.getPickupStatus()); | ||||||
|         spawnedArrow.setKnockbackStrength(originalArrow.getKnockbackStrength()); |         spawnedArrow.setKnockbackStrength(originalArrow.getKnockbackStrength()); | ||||||
|  |  | ||||||
|  |         if (originalArrow.getBasePotionType() != null) { | ||||||
|  |             spawnedArrow.setBasePotionType(originalArrow.getBasePotionType()); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (originalArrow.hasCustomEffects()) { | ||||||
|  |             for (var effect : originalArrow.getCustomEffects()) { | ||||||
|  |                 spawnedArrow.addCustomEffect(effect, true); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // copy metadata from old arrow |         // copy metadata from old arrow | ||||||
|         ProjectileUtils.copyArrowMetadata(pluginRef, originalArrow, spawnedArrow); |         ProjectileUtils.copyArrowMetadata(pluginRef, originalArrow, spawnedArrow); | ||||||
|         originalArrow.remove(); |         originalArrow.remove(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nossr50
					nossr50