2016-06-23 03:49:47 +00:00
|
|
|
/*
|
|
|
|
* Minecraft Forge
|
2019-02-10 22:57:03 +00:00
|
|
|
* Copyright (c) 2016-2019.
|
2016-06-23 03:49:47 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation version 2.1
|
|
|
|
* of the License.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2013-09-06 00:14:24 +00:00
|
|
|
package net.minecraftforge.client.event;
|
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2018-06-11 01:12:46 +00:00
|
|
|
import net.minecraftforge.eventbus.api.Event;
|
2013-09-06 00:14:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Author: MachineMuse (Claire Semple)
|
|
|
|
* Created: 6:07 PM, 9/5/13
|
|
|
|
*/
|
|
|
|
public class FOVUpdateEvent extends Event
|
|
|
|
{
|
2016-03-24 08:44:52 +00:00
|
|
|
private final EntityPlayer entity;
|
|
|
|
private final float fov;
|
|
|
|
private float newfov;
|
2013-09-06 00:14:24 +00:00
|
|
|
|
Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 03:56:35 +00:00
|
|
|
public FOVUpdateEvent(EntityPlayer entity, float fov)
|
2013-09-06 00:14:24 +00:00
|
|
|
{
|
|
|
|
this.entity = entity;
|
|
|
|
this.fov = fov;
|
2016-03-24 08:44:52 +00:00
|
|
|
this.setNewfov(fov);
|
|
|
|
}
|
|
|
|
|
|
|
|
public EntityPlayer getEntity()
|
|
|
|
{
|
|
|
|
return entity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public float getFov()
|
|
|
|
{
|
|
|
|
return fov;
|
|
|
|
}
|
|
|
|
|
|
|
|
public float getNewfov()
|
|
|
|
{
|
|
|
|
return newfov;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setNewfov(float newfov)
|
|
|
|
{
|
|
|
|
this.newfov = newfov;
|
2013-09-06 00:14:24 +00:00
|
|
|
}
|
|
|
|
}
|