Skip to content

Commit

Permalink
Fix Zhongli shield onhit duration error
Browse files Browse the repository at this point in the history
  • Loading branch information
TaoismDeepLake committed May 12, 2022
1 parent c87f3fe commit 277ee06
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.util.Collection;

import static com.deeplake.genshin12.util.CommonDef.TICK_PER_SECOND;
import static net.minecraftforge.fml.common.eventhandler.Event.Result.*;

@Mod.EventBusSubscriber(modid = Reference.MOD_ID)
Expand Down Expand Up @@ -75,7 +76,7 @@ public static void jadeShieldFortify(LivingHurtEvent evt) {
//Fortified characters have 5% increased Shield Strength.
//Can stack up to 5 times, and lasts until the Jade Shield disappears
//Fortify times = 0,1,2,3,4,5
int dura = hurtOne.getActivePotionEffect(ModPotions.JADE_SHIELD).getDuration();
float dura = (float) hurtOne.getActivePotionEffect(ModPotions.JADE_SHIELD).getDuration() / TICK_PER_SECOND;
EntityUtil.ApplyBuff(hurtOne, ModPotions.JADE_SHIELD, buffLevel, dura);//actually +1 level
}
}
Expand Down

0 comments on commit 277ee06

Please sign in to comment.