All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minecraft.server.EnchantmentSilkTouch Maven / Gradle / Ivy

package net.minecraft.server;

public class EnchantmentSilkTouch extends Enchantment {

  protected EnchantmentSilkTouch(int i, MinecraftKey minecraftkey, int j) {
    super(i, minecraftkey, j, EnchantmentSlotType.DIGGER);
    this.c("untouching");
  }

  public int a(int i) {
    return 15;
  }

  public int b(int i) {
    return super.a(i) + 50;
  }

  public int getMaxLevel() {
    return 1;
  }

  public boolean a(Enchantment enchantment) {
    return super.a(enchantment) && enchantment.id != EnchantmentSilkTouch.LOOT_BONUS_BLOCKS.id;
  }

  public boolean canEnchant(ItemStack itemstack) {
    return itemstack.getItem() == Items.SHEARS || super.canEnchant(itemstack);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy