    001package net.minecraft.entity.ai;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import net.minecraft.block.Block;
    006import net.minecraft.entity.item.EntityMinecart;
    007import net.minecraft.nbt.NBTTagCompound;
    008import net.minecraft.tileentity.MobSpawnerBaseLogic;
    009import net.minecraft.world.World;
    010
    011public class EntityMinecartMobSpawner extends EntityMinecart
    012{
    013    private final MobSpawnerBaseLogic field_98040_a = new EntityMinecartMobSpawnerLogic(this);
    014
    015    public EntityMinecartMobSpawner(World par1World)
    016    {
    017        super(par1World);
    018    }
    019
    020    public EntityMinecartMobSpawner(World par1World, double par2, double par4, double par6)
    021    {
    022        super(par1World, par2, par4, par6);
    023    }
    024
    025    public int func_94087_l()
    026    {
    027        return 4;
    028    }
    029
    030    public Block func_94093_n()
    031    {
    032        return Block.mobSpawner;
    033    }
    034
    035    /**
    036     * (abstract) Protected helper method to read subclass entity data from NBT.
    037     */
    038    protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
    039    {
    040        super.readEntityFromNBT(par1NBTTagCompound);
    041        this.field_98040_a.func_98270_a(par1NBTTagCompound);
    042    }
    043
    044    /**
    045     * (abstract) Protected helper method to write subclass entity data to NBT.
    046     */
    047    protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
    048    {
    049        super.writeEntityToNBT(par1NBTTagCompound);
    050        this.field_98040_a.func_98280_b(par1NBTTagCompound);
    051    }
    052
    053    @SideOnly(Side.CLIENT)
    054    public void handleHealthUpdate(byte par1)
    055    {
    056        this.field_98040_a.func_98268_b(par1);
    057    }
    058
    059    /**
    060     * Called to update the entity's position/logic.
    061     */
    062    public void onUpdate()
    063    {
    064        super.onUpdate();
    065        this.field_98040_a.func_98278_g();
    066    }
    067
    068    @SideOnly(Side.CLIENT)
    069    public MobSpawnerBaseLogic func_98039_d()
    070    {
    071        return this.field_98040_a;
    072    }
    073}