athrane / bassebombecraft

Bassebombecraft Minecraft Mod
https://www.curseforge.com/minecraft/mc-mods/bassebombecraft
GNU General Public License v3.0
0 stars 0 forks source link

Remove type cast hack from ContagionEffect #1265

Closed athrane closed 2 years ago

athrane commented 2 years ago

Affected code:

    /**
     * Create AOE effect operators: 
     */
    static Supplier<Operator2> splAoeEffectOp = () -> {

        // IsEffectActive2 + AddEffect2: HACK to type cast from entity to living entity
        Function<Ports, LivingEntity> fnGetTarget = p -> (LivingEntity) applyV(getFnGetEntity2(), p);

and:

    /**
     * Create AOE effect operators.
     */
    static Supplier<Operator2> splAoeEffectOp2 = () -> {

        // IsEffectActive2 + AddEffect2: HACK to type cast from entity to living entity
        Function<Ports, LivingEntity> fnGetTarget = p -> (LivingEntity) applyV(getFnGetEntity2(), p);
athrane commented 2 years ago

Resolved with commit: https://github.com/athrane/bassebombecraft/commit/f5bee227a4bdd08919ef4cbe67de94309fc9fc3d