我们本次对击杀怪物掉落战利品进行设置
1.在 util.handler 包中新建 LootTableHandler 类

在LootTableHandler.java中进行编辑:
package com.Joy187.newmod.util.handlers;
import com.Joy187.newmod.util.Reference;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.storage.loot.LootTableList;
public class LootTableHandler {
//添加你想要产生掉落物的生物
public static final ResourceLocation RA3 = LootTableList.register(new ResourceLocation(Reference.Mod_ID ,"ra3"));
}
2.在 EntityRA3.java (第7讲中创建) 中添加注册表函数
@Override
protected ResourceLocation getLootTable()
{
return LootTableHandler.RA3;
}