P1.4 : version 0.5.0-p1, une seule source (gradle.properties)
- gradle.properties : mod_version=0.5.0-p1.
- neoforge.mods.toml : version="${mod_version}", rempli par processResources.
- Manifeste du jar : Implementation-Title / -Version / -Vendor.
- Version affichee au chargement, au demarrage (journal) et dans /garde status.
- Tests : VersionP1Test (toml traite == gradle.properties, pas de version en
dur dans la source).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
d21eaa2e50
révision
3507f785a5
7 fichiers modifiés
+90
-4
Aucun fichier ne correspond à votre recherche
@@ -15,7 +15,15 @@ public class GastinelGarde {
|
||||
public static final String MOD_ID = "gastinelgarde";
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(GastinelGarde.class);
|
||||
|
||||
/** 0.5 (P1.4) : version du mod (neoforge.mods.toml, rempli depuis gradle.properties au build). */
|
||||
private static String version = "?";
|
||||
|
||||
public static String version() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public GastinelGarde(IEventBus modEventBus, ModContainer modContainer) {
|
||||
version = modContainer.getModInfo().getVersion().toString();
|
||||
// Config rechargeable : config/gastinelgarde-server.toml (décision D8), plus /garde reload.
|
||||
modContainer.registerConfig(ModConfig.Type.COMMON, GardeSpec.SPEC, "gastinelgarde-server.toml");
|
||||
modEventBus.addListener(ModConfigEvent.Loading.class, GardeSpec::onConfig);
|
||||
@@ -25,6 +33,6 @@ public class GastinelGarde {
|
||||
NeoForge.EVENT_BUS.register(GardeCommands.class);
|
||||
NeoForge.EVENT_BUS.register(GardeAntiCrash.class); // anti-crash entités (16/10), toujours actif
|
||||
|
||||
LOGGER.info("[GastinelGarde] Anti-triche chargé (tous les contrôles démarrent en observe).");
|
||||
LOGGER.info("[GastinelGarde] Anti-triche {} chargé (tous les contrôles démarrent en observe).", version);
|
||||
}
|
||||
}
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur