HarryPotterSpells

HarryPotterSpells

59.3k Downloads

Replace FireworkEffectPlayer.playFireworks with non NMS solution

jacklin213 opened this issue ยท 2 comments

commented

public static void playFirework(World world, Location loc, FireworkEffect fe) throws Exception {

This method has 2 other overrides that do not use NMS, check to see if the above is still being used and deprecate if not. If it is, see if it can be migrated to the below methods instead

public static void playFirework(Location location, FireworkEffect effect, int power) {

public static void playFirework(Location location, FireworkEffect effect) {

commented

Only 2 occurrences: https://github.com/search?q=repo%3AHarryPotterSpells%2FHarryPotterSpells%20FireworkEffectPlayer%20&type=code

  1. FireworkEffectPlayer.playFirework(loc.getWorld(), loc, effect);

    This will need to be updated to use a one of the non NMS overrides

  2. FireworkEffectPlayer.playFirework(entity.getLocation(), effect);

    This firework effect is fine.

commented

Turns out the specific register method (below) that uses the FireworkEffectPlayer.playFirework with NMS solution isn't actually being used anywhere now, we can probably deprecate

public void register(final Player caster, final SpellHitEvent onHit, final double spellSpeed, final FireworkEffect effect) {