Class EntityMinecartHopper

All Implemented Interfaces:
Hopper, IInventory

public class EntityMinecartHopper extends EntityMinecartContainer implements Hopper
  • Constructor Details

    • EntityMinecartHopper

      public EntityMinecartHopper(World par1World)
    • EntityMinecartHopper

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

    • getMinecartType

      public int getMinecartType()
      Specified by:
      getMinecartType in class EntityMinecart
    • getDefaultDisplayTile

      public Block getDefaultDisplayTile()
      Overrides:
      getDefaultDisplayTile in class EntityMinecart
    • getDefaultDisplayTileOffset

      public int getDefaultDisplayTileOffset()
      Overrides:
      getDefaultDisplayTileOffset in class EntityMinecart
    • getSizeInventory

      public int getSizeInventory()
      Returns the number of slots in the inventory.
      Specified by:
      getSizeInventory in interface IInventory
    • interactFirst

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

      public void onActivatorRailPass(int par1, int par2, int par3, boolean par4)
      Called every tick the minecart is on an activator rail.
      Overrides:
      onActivatorRailPass in class EntityMinecart
    • getBlocked

      public boolean getBlocked()
      Get whether this hopper minecart is being blocked by an activator rail.
    • setBlocked

      public void setBlocked(boolean par1)
      Set whether this hopper minecart is being blocked by an activator rail.
    • getWorldObj

      public World getWorldObj()
      Returns the worldObj for this tileEntity.
      Specified by:
      getWorldObj in interface Hopper
    • getXPos

      public double getXPos()
      Gets the world X position for this hopper entity.
      Specified by:
      getXPos in interface Hopper
    • getYPos

      public double getYPos()
      Gets the world Y position for this hopper entity.
      Specified by:
      getYPos in interface Hopper
    • getZPos

      public double getZPos()
      Gets the world Z position for this hopper entity.
      Specified by:
      getZPos in interface Hopper
    • onUpdate

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

      public boolean func_96112_aD()
    • killMinecart

      public void killMinecart(DamageSource par1DamageSource)
      Overrides:
      killMinecart in class EntityMinecartContainer
    • writeEntityToNBT

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

      protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readEntityFromNBT in class EntityMinecartContainer
    • setTransferTicker

      public void setTransferTicker(int par1)
      Sets the transfer ticker, used to determine the delay between transfers.
    • canTransfer

      public boolean canTransfer()
      Returns whether the hopper cart can currently transfer an item.