我的世界MC mod开发日志-开发

我的世界MC mod开发日志-Item物品添加1

视频https://space.bilibili.com/55964508
Q群528864733

Item物品添加
{建立模板}
{注册物品}
{物品信息}
{创造模式的 物品栏的图标}
Item物品事件-自己的物品
Item物品事件-世界的物品

 

 

 

{建立模板}

 
`common包下新建一个item包,然后新建类ItemBestSword。
我们让ItemBestSword继承ItemSword类。
import net.minecraft.item.ItemSword;

public class ItemBestSword extends ItemSword{    
    public ItemBestSword(){
        super(ToolMaterial.IRON);// 使用铁剑的参数?
    }}




`common包下新建一个item包,然后新建类Item_Other 
public class Item_Other extends Item {
//其它物品, 无属性的材质
    public Item_Other(){
        this.setCreativeTab(CreativeTabsRedo.tab_no_idea);  //创造模式的 物品栏的图标
    }}

 

posted on 2019-03-07 14:01  nq17656721  阅读(206)  评论(0)    收藏  举报

导航