Example usage for net.minecraftforge.client.event FOVUpdateEvent setNewfov

List of usage examples for net.minecraftforge.client.event FOVUpdateEvent setNewfov

Introduction

In this page you can find the example usage for net.minecraftforge.client.event FOVUpdateEvent setNewfov.

Prototype

public void setNewfov(float newfov) 

Source Link

Usage

From source file:com.elytradev.thermionics.Thermionics.java

License:Open Source License

@SubscribeEvent
@SideOnly(Side.CLIENT)//from w  w  w .j a va2  s. co m
public void updateFOV(FOVUpdateEvent event) {
    if (event.getEntity().getActivePotionEffect(Thermionics.POTION_EFFORTLESS_SPEED) != null) {
        event.setNewfov(1.0f);
    }
}

From source file:com.teambrmodding.neotech.events.PlayerUpdateEvent.java

License:Creative Commons License

@SubscribeEvent
public void updateFOV(FOVUpdateEvent event) {
    if (dontChangeFOV) {
        dontChangeFOV = false;/* w w w  .  ja v a2 s .  c om*/
        event.setNewfov(1.0F);
    }
}