<commit_before>package info.u_team.u_team_core.construct;

import org.apache.logging.log4j.*;
import org.objectweb.asm.Type;

import info.u_team.u_team_core.api.construct.*;
import info.u_team.u_team_core.util.AnnotationUtil;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.loading.FMLEnvironment;
import net.minecraftforge.forgespi.language.ModFileScanData.AnnotationData;

public class ConstructManager {
	
	private static final Logger LOGGER = LogManager.getLogger("ConstructManager");
	
	public static void constructConstructs(String modid) {
		for (AnnotationData data : AnnotationUtil.getAnnotations(modid, Type.getType(Construct.class))) {
			final Boolean client = (Boolean) data.getAnnotationData().get("client");
			if (client == null || !client || client && FMLEnvironment.dist == Dist.CLIENT) {
				LOGGER.info("Try to load construct for mod " + modid);
				try {
					Class.forName(data.getMemberName()).asSubclass(IModConstruct.class).newInstance().construct();
				} catch (LinkageError | ClassNotFoundException | InstantiationException | IllegalAccessException | ClassCastException ex) {
					LOGGER.error("Failed to load and construct mod construct : {}", data.getMemberName(), ex);
					throw new RuntimeException(ex);
				}
			}
		}
	}
	
}
<commit_msg>Respect the annotationModid in construct manager now<commit_after>package info.u_team.u_team_core.construct;

import org.apache.logging.log4j.*;
import org.objectweb.asm.Type;

import info.u_team.u_team_core.api.construct.*;
import info.u_team.u_team_core.util.AnnotationUtil;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.loading.FMLEnvironment;
import net.minecraftforge.forgespi.language.ModFileScanData.AnnotationData;

public class ConstructManager {
	
	private static final Logger LOGGER = LogManager.getLogger("ConstructManager");
	
	public static void constructConstructs(String modid) {
		for (AnnotationData data : AnnotationUtil.getAnnotations(modid, Type.getType(Construct.class))) {
			final String annotationModid = (String) data.getAnnotationData().get("modid");
			final Boolean client = (Boolean) data.getAnnotationData().get("client");
			if (modid.equals(annotationModid)) {
				if (client == null || !client || client && FMLEnvironment.dist == Dist.CLIENT) {
					LOGGER.info("Try to load construct for mod " + modid);
					try {
						Class.forName(data.getMemberName()).asSubclass(IModConstruct.class).newInstance().construct();
					} catch (LinkageError | ClassNotFoundException | InstantiationException | IllegalAccessException | ClassCastException ex) {
						LOGGER.error("Failed to load and construct mod construct : {}", data.getMemberName(), ex);
						throw new RuntimeException(ex);
					}
				}
			}
		}
	}
	
}

{'fraction_non_alphanumeric': 0.11567567567567567, 'fraction_numerical': 0.0007207207207207207, 'mean_word_length': 5.11453744493392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3229136', 'n_tokens_mistral': 896, 'n_tokens_neox': 814, 'n_words': 163}