use of pokefenn.totemic.item.equipment.weapon.ItemBaykokBow in project Totemic by TeamTotemic.
the class GameOverlay method onFOVUpdate.
@SubscribeEvent
public void onFOVUpdate(FOVUpdateEvent event) {
EntityPlayer player = Minecraft.getMinecraft().player;
if (player.isHandActive() && player.getActiveItemStack().getItem() instanceof ItemBaykokBow) {
int bowTicks = player.getItemInUseMaxCount();
float modifier = bowTicks / 20.0F;
if (modifier > 1.0F)
modifier = 1.0F;
else
modifier = modifier * modifier;
event.setNewfov(event.getFov() * (1.0F - 0.15F * modifier));
}
}
Aggregations