2013-03-23 16:59:06 +00:00
|
|
|
package net.minecraftforge.event.entity.living;
|
|
|
|
|
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.minecraftforge.fml.common.eventhandler.Cancelable;
|
2013-06-30 12:50:11 +00:00
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
2013-03-23 16:59:06 +00:00
|
|
|
|
|
|
|
/**
|
2013-03-23 18:12:42 +00:00
|
|
|
* Event for when an Enderman teleports or an ender pearl is used. Can be used to either modify the target position, or cancel the teleport outright.
|
2013-03-23 16:59:06 +00:00
|
|
|
* @author Mithion
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
@Cancelable
|
2013-03-23 20:56:01 +00:00
|
|
|
public class EnderTeleportEvent extends LivingEvent
|
|
|
|
{
|
|
|
|
|
2016-03-24 08:44:52 +00:00
|
|
|
private double targetX;
|
|
|
|
private double targetY;
|
|
|
|
private double targetZ;
|
|
|
|
private float attackDamage;
|
2013-03-23 20:56:01 +00:00
|
|
|
|
2013-06-30 12:50:11 +00:00
|
|
|
public EnderTeleportEvent(EntityLivingBase entity, double targetX, double targetY, double targetZ, float attackDamage)
|
2013-03-23 16:59:06 +00:00
|
|
|
{
|
|
|
|
super(entity);
|
2016-03-24 08:44:52 +00:00
|
|
|
this.setTargetX(targetX);
|
|
|
|
this.setTargetY(targetY);
|
|
|
|
this.setTargetZ(targetZ);
|
|
|
|
this.setAttackDamage(attackDamage);
|
2013-03-23 20:56:01 +00:00
|
|
|
}
|
2016-03-24 08:44:52 +00:00
|
|
|
|
|
|
|
public double getTargetX() { return targetX; }
|
|
|
|
public void setTargetX(double targetX) { this.targetX = targetX; }
|
|
|
|
public double getTargetY() { return targetY; }
|
|
|
|
public void setTargetY(double targetY) { this.targetY = targetY; }
|
|
|
|
public double getTargetZ() { return targetZ; }
|
|
|
|
public void setTargetZ(double targetZ) { this.targetZ = targetZ; }
|
|
|
|
public float getAttackDamage() { return attackDamage; }
|
|
|
|
public void setAttackDamage(float attackDamage) { this.attackDamage = attackDamage; }
|
2013-03-23 16:59:06 +00:00
|
|
|
}
|