File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed 
src/main/java/net/earthcomputer/clientcommands/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,15 @@ public static boolean doesEnchantmentExist(Enchantment enchantment) {
6767            return  false ;
6868        }
6969        String  name  = id .getPath ();
70-         return  Enchantments .getFor (SeedfindingUtil .getMCVersion ()).stream ().anyMatch (ench  -> ench .getName ().equals (name ));
70+ 
71+         // Hack: sweeping was renamed to sweeping_edge, do an inverse rename here. 
72+         // This should no longer be necessary once enchantments are data-driven in 1.21 
73+         if  ("sweeping_edge" .equals (name )) {
74+             name  = "sweeping" ;
75+         }
76+ 
77+         String  name_f  = name ;
78+         return  Enchantments .getFor (SeedfindingUtil .getMCVersion ()).stream ().anyMatch (ench  -> ench .getName ().equals (name_f ));
7179    }
7280
7381    public  static  MCVersion  getMCVersion () {
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments