Ломание + горение блока

397
8
33
Итак, есть простое ломание блока, верно. А как сделать так, чтобы топором он ломался с иной скоростью?
А еще... Не подскажите ли, как сделать, чтобы блок горел?

1.6.4
 
MrUser написал(а):
Итак, есть простое ломание блока, верно. А как сделать так, чтобы топором он ломался с иной скоростью?
А еще... Не подскажите ли, как сделать, чтобы блок горел?

1.6.4
Скорость добычи блока различными предметами:
Код:
    /**
     * Sets or removes the tool and level required to harvest this block.
     *
     * @param toolClass Class
     * @param level Harvest level:
     *     Wood:    0
     *     Stone:   1
     *     Iron:    2
     *     Diamond: 3
     *     Gold:    0
     * @param state The specific state.
     */
    public void setHarvestLevel(String toolClass, int level, IBlockState state)
    {
        int idx = this.getMetaFromState(state);
        this.harvestTool[idx] = toolClass;
        this.harvestLevel[idx] = level;
    }

Горение блока
Код:
    /**
     * Determines if this block should set fire and deal fire damage
     * to entities coming into contact with it.
     *
     * @param world The current world
     * @param pos Block position in world
     * @return True if the block should deal damage
     */
    public boolean isBurning(IBlockAccess world, BlockPos pos)
    {
        return true;
    }
 
кстати, такой блок можно будет сунуть в печку))
 
Назад
Сверху