User Tools

Site Tools


tutorial:enchantments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:enchantments [2019/07/02 22:38] – change enchantment type so tut makes more sense draylartutorial:enchantments [2020/05/10 11:37] – addPotionEffect -> addStatusEffect sirwindfield
Line 14: Line 14:
 public class FrostEnchantment extends Enchantment  public class FrostEnchantment extends Enchantment 
 { {
-    public WrathEnchantment(Weight weight, EnchantmentTarget target, EquipmentSlot[] slots)+    public FrostEnchantment(Weight weight, EnchantmentTarget target, EquipmentSlot[] slots)
     {     {
         super(weight, target, slots)         super(weight, target, slots)
Line 48: Line 48:
     if(target instanceof LivingEntity)     if(target instanceof LivingEntity)
     {     {
-        ((LivingEntity) target).addPotionEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 20 * 2 * level, level - 1));+        ((LivingEntity) target).addStatusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 20 * 2 * level, level - 1));
     }     }
  
Line 89: Line 89:
 </code> </code>
  
-If you go in-game, you should be able to enchant main hand weapons with your new enchant:+If you go in-game, [[https://i.imgur.com/31nFl2H.png|you should be able to enchant main hand weapons with your new enchant.]] 
 + 
  
  
  
tutorial/enchantments.txt · Last modified: 2023/01/04 13:52 by datsuns