<commit_before>package team.creative.enhancedvisuals.client;

import java.util.function.Predicate;

import net.minecraft.client.Minecraft;
import net.minecraft.resources.IReloadableResourceManager;
import net.minecraft.resources.IResourceManager;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.resource.IResourceType;
import net.minecraftforge.resource.ISelectiveResourceReloadListener;
import team.creative.enhancedvisuals.EnhancedVisuals;
import team.creative.enhancedvisuals.api.type.VisualType;
import team.creative.enhancedvisuals.client.render.EVRenderer;

@OnlyIn(value = Dist.CLIENT)
public class EVClient {
    
    private static Minecraft mc = Minecraft.getInstance();
    
    public static void init(FMLClientSetupEvent event) {
        IReloadableResourceManager reloadableResourceManager = (IReloadableResourceManager) event.getMinecraftSupplier().get().getResourceManager();
        
        reloadableResourceManager.addReloadListener(new ISelectiveResourceReloadListener() {
            @Override
            public void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
                VisualManager.clearParticles();
                
                EVRenderer.reloadResources = true;
            }
        });
        
        IResourceManager manager = mc.getResourceManager();
        for (VisualType type : VisualType.getTypes()) {
            type.loadResources(manager);
        }
        
        MinecraftForge.EVENT_BUS.register(EVRenderer.class);
    }
    
    public static boolean shouldRender() {
        return mc.player != null ? (!mc.player.isCreative() || !EnhancedVisuals.CONFIG.doEffectsInCreative) : true;
    }
    
    public static boolean shouldTick() {
        return true;
    }
}<commit_msg>Fixed effects showing up for spectators<commit_after>package team.creative.enhancedvisuals.client;

import java.util.function.Predicate;

import net.minecraft.client.Minecraft;
import net.minecraft.resources.IReloadableResourceManager;
import net.minecraft.resources.IResourceManager;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.resource.IResourceType;
import net.minecraftforge.resource.ISelectiveResourceReloadListener;
import team.creative.enhancedvisuals.EnhancedVisuals;
import team.creative.enhancedvisuals.api.type.VisualType;
import team.creative.enhancedvisuals.client.render.EVRenderer;

@OnlyIn(value = Dist.CLIENT)
public class EVClient {
    
    private static Minecraft mc = Minecraft.getInstance();
    
    public static void init(FMLClientSetupEvent event) {
        IReloadableResourceManager reloadableResourceManager = (IReloadableResourceManager) event.getMinecraftSupplier().get().getResourceManager();
        
        reloadableResourceManager.addReloadListener(new ISelectiveResourceReloadListener() {
            @Override
            public void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
                VisualManager.clearParticles();
                
                EVRenderer.reloadResources = true;
            }
        });
        
        IResourceManager manager = mc.getResourceManager();
        for (VisualType type : VisualType.getTypes()) {
            type.loadResources(manager);
        }
        
        MinecraftForge.EVENT_BUS.register(EVRenderer.class);
    }
    
    public static boolean shouldRender() {
        return mc.player != null ? (!mc.player.isSpectator() && (!mc.player.isCreative() || EnhancedVisuals.CONFIG.doEffectsInCreative)) : true;
    }
    
    public static boolean shouldTick() {
        return true;
    }
}
{'fraction_non_alphanumeric': 0.08600546855580413, 'fraction_numerical': 0.0, 'mean_word_length': 3.7009345794392523, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2560617', 'n_tokens_mistral': 1103, 'n_tokens_neox': 1092, 'n_words': 174}