Class EntityMinecart

    • Constructor Detail

      • EntityMinecart

        public EntityMinecart​(World worldIn)
      • EntityMinecart

        public EntityMinecart​(World worldIn,
                              double x,
                              double y,
                              double z)
    • Method Detail

      • 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 entity)
        + 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
      • 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 damagesource,
                                        float f)
        + Called when the entity is attacked.
        Overrides:
        attackEntityFrom in class Entity
      • killMinecart

        public void killMinecart​(DamageSource parDamageSource)
      • 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
      • setDead

        public void setDead()
        + Will get destroyed next tick.
        Overrides:
        setDead in class Entity
      • onUpdate

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

        protected double getMaximumSpeed()
        + Get's the maximum speed for a minecart
      • onActivatorRailPass

        public void onActivatorRailPass​(int x,
                                        int y,
                                        int z,
                                        boolean receivingPower)
        + Called every tick the minecart is on an activator rail. Args: x, y, z, is the rail receiving power
      • moveDerailedMinecart

        protected void moveDerailedMinecart()
        + Moves a minecart that is not attached to a rail
      • func_180460_a

        protected void func_180460_a​(BlockPos parBlockPos,
                                     IBlockState parIBlockState)
      • applyDrag

        protected void applyDrag()
      • setPosition

        public void setPosition​(double d0,
                                double d1,
                                double d2)
        + Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
        Overrides:
        setPosition in class Entity
      • func_70495_a

        public Vec3 func_70495_a​(double parDouble1,
                                 double parDouble2,
                                 double parDouble3,
                                 double parDouble4)
      • func_70489_a

        public Vec3 func_70489_a​(double parDouble1,
                                 double parDouble2,
                                 double parDouble3)
      • readEntityFromNBT

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

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

        public void applyEntityCollision​(Entity entity)
        + Applies a velocity to each of the entities pushing them away from each other. Args: entity
        Overrides:
        applyEntityCollision in class Entity
      • setPositionAndRotation2

        public void setPositionAndRotation2​(double d0,
                                            double d1,
                                            double d2,
                                            float f,
                                            float f1,
                                            int i,
                                            boolean var10)
        Overrides:
        setPositionAndRotation2 in class Entity
      • setVelocity

        public void setVelocity​(double d0,
                                double d1,
                                double d2)
        + Sets the velocity to the args. Args: x, y, z
        Overrides:
        setVelocity in class Entity
      • setDamage

        public void setDamage​(float parFloat1)
        + Sets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over 40.
      • getDamage

        public float getDamage()
        + Gets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over 40.
      • setRollingAmplitude

        public void setRollingAmplitude​(int parInt1)
        + Sets the rolling amplitude the cart rolls while being attacked.
      • getRollingAmplitude

        public int getRollingAmplitude()
        + Gets the rolling amplitude the cart rolls while being attacked.
      • setRollingDirection

        public void setRollingDirection​(int parInt1)
        + Sets the rolling direction the cart rolls while being attacked. Can be 1 or -1.
      • getRollingDirection

        public int getRollingDirection()
        + Gets the rolling direction the cart rolls while being attacked. Can be 1 or -1.
      • getDefaultDisplayTile

        public IBlockState getDefaultDisplayTile()
      • getDisplayTileOffset

        public int getDisplayTileOffset()
      • getDefaultDisplayTileOffset

        public int getDefaultDisplayTileOffset()
      • func_174899_a

        public void func_174899_a​(IBlockState parIBlockState)
      • setDisplayTileOffset

        public void setDisplayTileOffset​(int parInt1)
      • hasDisplayTile

        public boolean hasDisplayTile()
      • setHasDisplayTile

        public void setHasDisplayTile​(boolean parFlag)
      • setCustomNameTag

        public void setCustomNameTag​(java.lang.String s)
        + Sets the custom name tag for this entity
        Overrides:
        setCustomNameTag in class Entity
      • getName

        public java.lang.String getName()
        + Gets the name of this command sender (usually username, but possibly "Rcon")
        Specified by:
        getName in interface IWorldNameable
        Overrides:
        getName in class Entity