File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed 
src/main/java/net/minecraftforge/lex/cfd Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 44 */ 
55package  net .minecraftforge .lex .cfd ;
66
7+ import  javax .annotation .Nullable ;
8+ 
79import  com .mojang .serialization .MapCodec ;
810
911import  net .minecraft .client .color .item .ItemTintSource ;
@@ -17,7 +19,8 @@ public record WaterItemTint() implements ItemTintSource {
1719    public  static  final  MapCodec <WaterItemTint > CODEC  = MapCodec .unit (() -> INSTANCE );
1820
1921    @ Override 
20-     public  int  calculate (ItemStack  stack , ClientLevel  level , LivingEntity  entity ) {
22+     public  int  calculate (ItemStack  stack , @ Nullable  ClientLevel  level , @ Nullable  LivingEntity  entity ) {
23+         if  (level  == null  || entity  == null ) return  CobbleForDays .PLAINS ;
2124        return  BiomeColors .getAverageWaterColor (level , entity .blockPosition ());
2225    }
2326
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments