Skip to content

Commit

Permalink
refactor!: Rename loaders to platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
VidTu committed Mar 2, 2025
1 parent 88485fa commit baa0e97
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ tasks.withType<Jar> {
"Implementation-Title" to "Ksyxis",
"Implementation-Version" to version,
"Implementation-Vendor" to "VidTu",
"FMLCorePlugin" to "ru.vidtu.ksyxis.loaders.KsyxisLegacyForge",
"FMLCorePlugin" to "ru.vidtu.ksyxis.platform.KCore",
"FMLCorePluginContainsFMLMod" to "true",
"ForceLoadAsMod" to "true",
"MixinConfigs" to "ksyxis.mixins.json"
Expand Down
4 changes: 2 additions & 2 deletions loaders/src/main/java/net/fabricmc/api/ModInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@

/**
* Stub entrypoint interface of the Fabric mod. This is an injection interface for Ksyxis for Fabric,
* see {@code KsyxisFabric} class.
* see {@code KFabric} class.
*
* @author VidTu
* @author FabricMC
*/
public interface ModInitializer {
/**
* Runs the entrypoint. This is an injection point for Ksyxis for Fabric, see {@code KsyxisFabric} class.
* Runs the entrypoint. This is an injection point for Ksyxis for Fabric, see {@code KFabric} class.
*/
void onInitialize();
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* Stub annotation of the Forge mod for Ksyxis hacky compat. This is an injection annotation for Ksyxis on Forge 1.13+
* and NeoForge 1.20.1, see {@code KsyxisForge} class. This is a declarative annotation (for the mod to be listed) for
* and NeoForge 1.20.1, see {@code KForge} class. This is a declarative annotation (for the mod to be listed) for
* Ksyxis on Forge 1.8 -> 1.12.2, injection performed in {@link IFMLLoadingPlugin}.
*
* @author VidTu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* Stub interface of the legacy (1.12) Forge coremod for Ksyxis hacky compat. This is an injection interface for
* Ksyxis for Forge 1.8 -> 1.12.2, see {@code KsyxisLegacyForge} class.
* Ksyxis for Forge 1.8 -> 1.12.2, see {@code KCore} class.
*
* @author VidTu
* @author MinecraftForge
Expand Down Expand Up @@ -46,7 +46,7 @@ public interface IFMLLoadingPlugin {
String getSetupClass();

/**
* Injects the data. This is an injection point for Ksyxis for Forge 1.8 -> 1.12.2, see {@code KsyxisLegacyForge}
* Injects the data. This is an injection point for Ksyxis for Forge 1.8 -> 1.12.2, see {@code KCore}
* class. For the declaration point, see {@link Mod}.
*
* @param data Stub injection data, ignored by Ksyxis
Expand Down
2 changes: 1 addition & 1 deletion loaders/src/main/java/net/neoforged/fml/common/Mod.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/**
* Emulated annotation of the NeoForge mod. This is an injection annotation for Ksyxis for NeoForge 1.20.2+,
* see {@code KsyxisNeoForge} class.
* see {@code KNeo} class.
*
* @author VidTu
* @author MinecraftForge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

/**
* Stub entrypoint interface of the Quilt mod. This is an injection interface for Ksyxis for Quilt,
* see {@code KsyxisQuilt} class.
* see {@code KQuilt} class.
*
* @author VidTu
* @author FabricMC
* @author QuiltMC
*/
public interface ModInitializer {
/**
* Runs the entrypoint. This is an injection point for Ksyxis for Quilt, see {@code KsyxisQuilt} class.
* Runs the entrypoint. This is an injection point for Ksyxis for Quilt, see {@code KQuilt} class.
*
* @param mod Stub mod container, ignored
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/

package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import org.jetbrains.annotations.ApiStatus;
Expand All @@ -41,12 +41,12 @@
*/
@ApiStatus.Internal
@NullMarked
public final class KsyxisLegacyForge implements IFMLLoadingPlugin {
public final class KCore implements IFMLLoadingPlugin {
/**
* Creates a new coremod.
*/
@Contract(pure = true)
public KsyxisLegacyForge() {
public KCore() {
// Empty
}

Expand Down Expand Up @@ -104,6 +104,6 @@ public String getSetupClass() {
*/
@Override
public void injectData(Map<String, Object> data) {
Ksyxis.init("LegacyForge", /*manual=*/true);
Ksyxis.init("LegacyForge/KForge", /*manual=*/true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/

package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import net.fabricmc.api.ModInitializer;
import org.jetbrains.annotations.ApiStatus;
Expand All @@ -38,12 +38,12 @@
*/
@ApiStatus.Internal
@NullMarked
public final class KsyxisFabric implements ModInitializer {
public final class KFabric implements ModInitializer {
/**
* Creates a new mod.
*/
@Contract(pure = true)
public KsyxisFabric() {
public KFabric() {
// Empty
}

Expand All @@ -52,6 +52,6 @@ public KsyxisFabric() {
*/
@Override
public void onInitialize() {
Ksyxis.init("Fabric", /*manual=*/false);
Ksyxis.init("Fabric/KFabric", /*manual=*/false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/

package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import net.minecraftforge.fml.common.Mod;
import org.jetbrains.annotations.ApiStatus;
Expand All @@ -38,11 +38,11 @@
@ApiStatus.Internal
@Mod(value = "ksyxis"/*(modern)*/, modid = "ksyxis"/*(legacy)*/, acceptableRemoteVersions = "*"/*(legacy)*/)
@NullMarked
public final class KsyxisForge {
public final class KForge {
/**
* Calls {@link Ksyxis#init(String, boolean)} with {@code platform="Forge"} and {@code manual=false}.
*/
public KsyxisForge() {
Ksyxis.init("Forge", /*manual=*/false);
public KForge() {
Ksyxis.init("Forge/KForge", /*manual=*/false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/

package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import net.neoforged.fml.common.Mod;
import org.jetbrains.annotations.ApiStatus;
Expand All @@ -38,11 +38,11 @@
@ApiStatus.Internal
@Mod("ksyxis")
@NullMarked
public final class KsyxisNeoForge {
public final class KNeo {
/**
* Calls {@link Ksyxis#init(String, boolean)} with {@code platform="NeoForge"} and {@code manual=false}.
*/
public KsyxisNeoForge() {
public KNeo() {
Ksyxis.init("NeoForge", /*manual=*/false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* SOFTWARE.
*/

package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
Expand All @@ -40,12 +40,12 @@
@SuppressWarnings("unused") // <- Quilt mod.
@ApiStatus.Internal
@NullMarked
public final class KsyxisQuilt implements ModInitializer {
public final class KQuilt implements ModInitializer {
/**
* Creates a new mod.
*/
@Contract(pure = true)
public KsyxisQuilt() {
public KQuilt() {
// Empty
}

Expand All @@ -56,6 +56,6 @@ public KsyxisQuilt() {
*/
@Override
public void onInitialize(ModContainer mod) {
Ksyxis.init("Quilt", /*manual=*/false);
Ksyxis.init("Quilt/KQuilt", /*manual=*/false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
* @see ru.vidtu.ksyxis.Ksyxis#init(java.lang.String, boolean)
*/
@NullMarked
package ru.vidtu.ksyxis.loaders;
package ru.vidtu.ksyxis.platform;

import org.jspecify.annotations.NullMarked;
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"environment": "*",
"entrypoints": {
"main": [
"ru.vidtu.ksyxis.loaders.KsyxisFabric"
"ru.vidtu.ksyxis.platform.KFabric"
]
},
"mixins": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"intermediate_mappings": "net.fabricmc:intermediary",
"entrypoints": {
"init": "ru.vidtu.ksyxis.loaders.KsyxisQuilt"
"init": "ru.vidtu.ksyxis.platform.KQuilt"
}
},
"mixin": "ksyxis.mixins.json",
Expand Down

0 comments on commit baa0e97

Please sign in to comment.