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-05-08 23:30:59 +00:00
|
|
|
package net.minecraftforge.client.event;
|
|
|
|
|
2018-06-11 01:12:46 +00:00
|
|
|
import net.minecraftforge.eventbus.api.Cancelable;
|
2013-05-08 23:30:59 +00:00
|
|
|
import net.minecraft.client.renderer.entity.RenderPlayer;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraftforge.event.entity.player.PlayerEvent;
|
|
|
|
|
2017-01-11 23:17:56 +00:00
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
|
2013-05-08 23:30:59 +00:00
|
|
|
public abstract class RenderPlayerEvent extends PlayerEvent
|
|
|
|
{
|
2016-03-24 08:44:52 +00:00
|
|
|
private final RenderPlayer renderer;
|
|
|
|
private final float partialRenderTick;
|
|
|
|
private final double x;
|
|
|
|
private final double y;
|
|
|
|
private final double z;
|
2013-05-08 23:30:59 +00:00
|
|
|
|
2015-04-03 20:11:43 +00:00
|
|
|
public RenderPlayerEvent(EntityPlayer player, RenderPlayer renderer, float partialRenderTick, double x, double y, double z)
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
|
|
|
super(player);
|
|
|
|
this.renderer = renderer;
|
2013-09-07 20:25:30 +00:00
|
|
|
this.partialRenderTick = partialRenderTick;
|
2015-04-03 20:11:43 +00:00
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
2013-05-08 23:30:59 +00:00
|
|
|
}
|
|
|
|
|
2016-03-24 08:44:52 +00:00
|
|
|
public RenderPlayer getRenderer() { return renderer; }
|
|
|
|
public float getPartialRenderTick() { return partialRenderTick; }
|
|
|
|
public double getX() { return x; }
|
|
|
|
public double getY() { return y; }
|
|
|
|
public double getZ() { return z; }
|
|
|
|
|
2018-06-11 01:12:46 +00:00
|
|
|
@net.minecraftforge.eventbus.api.Cancelable
|
2013-05-08 23:30:59 +00:00
|
|
|
public static class Pre extends RenderPlayerEvent
|
|
|
|
{
|
2015-04-03 20:11:43 +00:00
|
|
|
public Pre(EntityPlayer player, RenderPlayer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
2013-05-08 23:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static class Post extends RenderPlayerEvent
|
|
|
|
{
|
2015-04-03 20:11:43 +00:00
|
|
|
public Post(EntityPlayer player, RenderPlayer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
2015-04-04 21:30:23 +00:00
|
|
|
}
|
|
|
|
|
2018-09-22 10:40:22 +00:00
|
|
|
}
|