Remove Generic from ProjectileImpactEvent (#7959)

Generification of this event was half-done and has been aborted, leaving the generic parameter in place just creates confusion and crashes
This commit is contained in:
DaemonUmbra authored and GitHub committed 2021-07-29 19:10:35 -07:00
1 parent 80d08dbf3a
commit 30cfd848d8
3 files changed
+8 -8

No files matched your search

@@ -624,9 +624,9 @@ public class ForgeEventFactory
return event.getCharge();
}
public static <T extends Projectile> boolean onProjectileImpact(T projectile, HitResult ray)
public static boolean onProjectileImpact(Projectile projectile, HitResult ray)
{
return MinecraftForge.EVENT_BUS.post(new ProjectileImpactEvent<>(projectile, ray));
return MinecraftForge.EVENT_BUS.post(new ProjectileImpactEvent(projectile, ray));
}
public static LootTable loadLootTable(ResourceLocation name, LootTable table, LootTables lootTableManager)
@@ -35,12 +35,12 @@ import net.minecraftforge.eventbus.api.Cancelable;
* Killing or other handling of the entity after event cancellation is up to the modder.
*/
@Cancelable
public class ProjectileImpactEvent<T extends Projectile> extends EntityEvent
public class ProjectileImpactEvent extends EntityEvent
{
private final HitResult ray;
private final T projectile;
private final Projectile projectile;
public ProjectileImpactEvent(T projectile, HitResult ray)
public ProjectileImpactEvent(Projectile projectile, HitResult ray)
{
super(projectile);
this.ray = ray;
@@ -52,7 +52,7 @@ public class ProjectileImpactEvent<T extends Projectile> extends EntityEvent
return ray;
}
public T getProjectile()
public Projectile getProjectile()
{
return projectile;
}