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;
|
|
|
|
import net.minecraftforge.eventbus.api.Event;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.client.renderer.entity.RenderLivingBase;
|
2013-06-30 12:50:11 +00:00
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
2013-05-08 23:30:59 +00:00
|
|
|
|
2018-06-11 01:12:46 +00:00
|
|
|
public abstract class RenderLivingEvent<T extends EntityLivingBase> extends net.minecraftforge.eventbus.api.Event
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
2016-03-24 08:44:52 +00:00
|
|
|
private final EntityLivingBase entity;
|
|
|
|
private final RenderLivingBase<T> renderer;
|
2017-06-06 00:43:37 +00:00
|
|
|
private final float partialRenderTick;
|
2016-03-24 08:44:52 +00:00
|
|
|
private final double x;
|
|
|
|
private final double y;
|
|
|
|
private final double z;
|
2013-05-08 23:30:59 +00:00
|
|
|
|
2017-06-06 00:43:37 +00:00
|
|
|
public RenderLivingEvent(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z)
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
|
|
|
this.entity = entity;
|
|
|
|
this.renderer = renderer;
|
2017-06-06 00:43:37 +00:00
|
|
|
this.partialRenderTick = partialRenderTick;
|
2013-12-25 09:03:19 +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 EntityLivingBase getEntity() { return entity; }
|
|
|
|
public RenderLivingBase<T> getRenderer() { return renderer; }
|
2017-06-06 00:43:37 +00:00
|
|
|
public float getPartialRenderTick() { return partialRenderTick; }
|
2016-03-24 08:44:52 +00:00
|
|
|
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
|
2015-11-27 03:38:21 +00:00
|
|
|
public static class Pre<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
2013-07-26 04:38:17 +00:00
|
|
|
{
|
2017-06-06 00:43:37 +00:00
|
|
|
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
2013-07-26 04:38:17 +00:00
|
|
|
}
|
2015-11-27 03:38:21 +00:00
|
|
|
public static class Post<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
2013-07-26 04:38:17 +00:00
|
|
|
{
|
2017-06-06 00:43:37 +00:00
|
|
|
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
2013-07-26 04:38:17 +00:00
|
|
|
}
|
2013-05-08 23:30:59 +00:00
|
|
|
|
2015-11-27 03:38:21 +00:00
|
|
|
public abstract static class Specials<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
2017-06-06 00:43:37 +00:00
|
|
|
public Specials(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, 0, x, y, z); }
|
2013-05-08 23:30:59 +00:00
|
|
|
|
2018-06-11 01:12:46 +00:00
|
|
|
@net.minecraftforge.eventbus.api.Cancelable
|
2015-11-27 03:38:21 +00:00
|
|
|
public static class Pre<T extends EntityLivingBase> extends Specials<T>
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
2016-03-01 12:58:03 +00:00
|
|
|
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
2013-05-08 23:30:59 +00:00
|
|
|
}
|
2015-11-27 03:38:21 +00:00
|
|
|
public static class Post<T extends EntityLivingBase> extends Specials<T>
|
2013-05-08 23:30:59 +00:00
|
|
|
{
|
2017-06-06 00:43:37 +00:00
|
|
|
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
2013-05-08 23:30:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|