Class EntityBoat

java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityBoat

public class EntityBoat extends Entity
  • Constructor Details

    • EntityBoat

      public EntityBoat(World par1World)
    • EntityBoat

      public EntityBoat(World par1World, double par2, double par4, double par6)
  • Method Details

    • canTriggerWalking

      protected boolean canTriggerWalking()
      returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops
      Overrides:
      canTriggerWalking in class Entity
    • entityInit

      protected void entityInit()
      Specified by:
      entityInit in class Entity
    • getCollisionBox

      public AxisAlignedBB getCollisionBox(Entity par1Entity)
      Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be pushable on contact, like boats or minecarts.
      Overrides:
      getCollisionBox in class Entity
    • getBoundingBox

      public AxisAlignedBB getBoundingBox()
      returns the bounding box for this entity
      Overrides:
      getBoundingBox in class Entity
    • canBePushed

      public boolean canBePushed()
      Returns true if this entity should push and be pushed by other entities when colliding.
      Overrides:
      canBePushed in class Entity
    • getMountedYOffset

      public double getMountedYOffset()
      Returns the Y offset from the entity's position for any entity riding this one.
      Overrides:
      getMountedYOffset in class Entity
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class Entity
    • performHurtAnimation

      public void performHurtAnimation()
      Setups the entity to do the hurt animation. Only used by packets in multiplayer.
      Overrides:
      performHurtAnimation in class Entity
    • canBeCollidedWith

      public boolean canBeCollidedWith()
      Returns true if other Entities should be prevented from moving through this Entity.
      Overrides:
      canBeCollidedWith in class Entity
    • setPositionAndRotation2

      public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
      Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, posY, posZ, yaw, pitch
      Overrides:
      setPositionAndRotation2 in class Entity
    • setVelocity

      public void setVelocity(double par1, double par3, double par5)
      Sets the velocity to the args. Args: x, y, z
      Overrides:
      setVelocity in class Entity
    • onUpdate

      public void onUpdate()
      Called to update the entity's position/logic.
      Overrides:
      onUpdate in class Entity
    • updateRiderPosition

      public void updateRiderPosition()
      Overrides:
      updateRiderPosition in class Entity
    • writeEntityToNBT

      protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to write subclass entity data to NBT.
      Specified by:
      writeEntityToNBT in class Entity
    • readEntityFromNBT

      protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Specified by:
      readEntityFromNBT in class Entity
    • getShadowSize

      public float getShadowSize()
      Overrides:
      getShadowSize in class Entity
    • interactFirst

      public boolean interactFirst(EntityPlayer par1EntityPlayer)
      First layer of player interaction
      Overrides:
      interactFirst in class Entity
    • setDamageTaken

      public void setDamageTaken(float par1)
      Sets the damage taken from the last hit.
    • getDamageTaken

      public float getDamageTaken()
      Gets the damage taken from the last hit.
    • setTimeSinceHit

      public void setTimeSinceHit(int par1)
      Sets the time to count down from since the last time entity was hit.
    • getTimeSinceHit

      public int getTimeSinceHit()
      Gets the time since the last hit.
    • setForwardDirection

      public void setForwardDirection(int par1)
      Sets the forward direction of the entity.
    • getForwardDirection

      public int getForwardDirection()
      Gets the forward direction of the entity.
    • func_70270_d

      public void func_70270_d(boolean par1)
    • canCollideWithEntity

      public boolean canCollideWithEntity(Entity entity)
      Overrides:
      canCollideWithEntity in class Entity
    • fall

      protected void fall(float fFallDistance)
      Description copied from class: Entity
      Called when the mob is falling. Calculates and applies fall damage.
      Overrides:
      fall in class Entity
    • breakBoat

      public void breakBoat()
    • onBlockDispenserConsume

      public boolean onBlockDispenserConsume(BlockDispenserBlock blockDispenser, BlockDispenserTileEntity tileEentityDispenser)
      Description copied from class: Entity
      Called when block dispenser tries to eat this entity, return true if the Dispenser should stop looking for more stuff to consume
      Overrides:
      onBlockDispenserConsume in class Entity