Add item lore data for special stats.

Adds spawn egg drop chance
Adds custom enchantment
This commit is contained in:
Tara 2023-01-22 03:53:16 -07:00
parent 28c60f3a53
commit e7e08902f0
17 changed files with 408 additions and 68 deletions

View file

@ -0,0 +1,42 @@
package dev.zontreck.otemod.enchantments;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
public class MobEggEnchantment extends Enchantment
{
public MobEggEnchantment()
{
super(Rarity.VERY_RARE, EnchantmentCategory.WEAPON, new EquipmentSlot[] {EquipmentSlot.MAINHAND});
}
@Override
public int getMaxLevel()
{
return 4;
}
@Override
public int getMinCost(int level)
{
return 28 + (level - 1) * 15;
}
@Override
public int getMaxCost(int level)
{
return this.getMinCost(level) + 15;
}
@Override
public boolean canApplyAtEnchantingTable(ItemStack stack)
{
return super.canApplyAtEnchantingTable(stack);
}
}