Minecraft区块收割等级限制

问题描述

我正在编码一个《我的世界》 mod,我试图让我的方块掉落物只有在被开采时收获水平为2或更高(铁或更高)时才会被掠夺。我将收获水平设置为2,但是仍然可以用拳头将其挖掘。为什么是这样?这是我的代码块。

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.ToolType;

public class RubyBlock extends Block {
public RubyBlock(){
 super(Properties.create(Material.IRON)
    .hardnessAndResistance(5.0f,6.0f)
     .sound(SoundType.METAL)
     .harvestLevel(2)


            .harvestTool(ToolType.PICKAXE)






    );

}

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)