首发于Enaium的个人博客
创建附魔类
public class FireBoomEnchantment extends Enchantment {
public FireBoomEnchantment(Rarity rarity, EnchantmentTarget target, EquipmentSlot[] slotTypes) {
super(rarity, target, slotTypes);
}
}
如果目标被攻击,目标就会爆炸,这里直接使用FireballEntity
类中onCollision
方法的部分代码。