Skip to content

Commit eb8a645

Browse files
committed
hello
1 parent 2f3a34a commit eb8a645

File tree

6 files changed

+26
-45
lines changed

6 files changed

+26
-45
lines changed

build.gradle.kts

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ loom {
3636
noServerRunConfigs()
3737
if (project.platform.isLegacyForge) {
3838
launchConfigs.named("client") {
39-
property("fml.coreMods.load", "cc.polyfrost.oneconfig.plugin.LoadingPlugin")
39+
arg("--tweakClass", "cc.polyfrost.oneconfigwrapper.OneConfigWrapper")
4040
property("mixin.debug.export", "true")
4141
}
4242
}
@@ -48,10 +48,6 @@ loom {
4848
mixin.defaultRefmapName.set("mixins.${mod_id}.refmap.json")
4949
}
5050

51-
repositories {
52-
maven("https://repo.woverflow.cc/")
53-
}
54-
5551
val shade: Configuration by configurations.creating {
5652
configurations.implementation.get().extendsFrom(this)
5753
}
@@ -63,19 +59,12 @@ sourceSets {
6359
}
6460

6561
repositories {
66-
mavenCentral()
67-
maven {
68-
url = uri("https://repo.polyfrost.cc/private")
69-
credentials(PasswordCredentials::class)
70-
authentication {
71-
create<BasicAuthentication>("basic")
72-
}
73-
}
74-
maven("https://repo.woverflow.cc/")
62+
maven("https://repo.polyfrost.cc/releases")
7563
}
7664

7765
dependencies {
78-
implementation("cc.polyfrost:oneconfig-1.8.9-forge:0.1.0")
66+
compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.1.0-alpha26")
67+
shade("cc.polyfrost:oneconfig-wrapper-1.8.9-forge:1.0.0-alpha6")
7968
}
8069

8170
tasks.processResources {
@@ -147,9 +136,7 @@ tasks {
147136
"ForceLoadAsMod" to true,
148137
"TweakOrder" to "0",
149138
"MixinConfigs" to "mixins.${mod_id}.json",
150-
"FMLCorePlugin" to "cc.polyfrost.oneconfig.plugin.LoadingPlugin",
151-
"TweakClass" to "org.spongepowered.asm.launch.MixinTweaker",
152-
"FMLCorePluginContainsFMLMod" to "lol"
139+
"TweakClass" to "cc.polyfrost.oneconfigwrapper.OneConfigWrapper"
153140
)
154141
)
155142
}

settings.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ pluginManagement {
22
repositories {
33
gradlePluginPortal()
44
mavenCentral()
5-
maven("https://repo.woverflow.cc")
5+
maven("https://repo.polyfrost.cc/releases")
6+
maven("https://maven.architectury.dev/")
67
}
78
plugins {
8-
val egtVersion = "0.1.8"
9+
val egtVersion = "0.1.10"
910
id("gg.essential.multi-version.root") version egtVersion
1011
}
1112
resolutionStrategy {

src/main/java/cc/polyfrost/example/ExampleMod.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
*/
1010
@net.minecraftforge.fml.common.Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION)
1111
public class ExampleMod {
12-
@net.minecraftforge.fml.common.Mod.Instance(MODID)
13-
public static ExampleMod INSTANCE;
1412
public static final String MODID = "@ID@";
1513
public static final String NAME = "@NAME@";
1614
public static final String VERSION = "@VER@";
15+
@net.minecraftforge.fml.common.Mod.Instance(MODID)
16+
public static ExampleMod INSTANCE;
1717
public TestConfig config;
18+
1819
@net.minecraftforge.fml.common.Mod.EventHandler
1920
public void onFMLInitialization(net.minecraftforge.fml.common.event.FMLInitializationEvent event) {
2021
config = new TestConfig();
21-
CommandManager.INSTANCE.registerCommand(new ExampleCommand());
22+
CommandManager.INSTANCE.registerCommand(ExampleCommand.class);
2223
}
2324
}
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
package cc.polyfrost.example.config;
22

33
import cc.polyfrost.example.hud.TestHud;
4-
import cc.polyfrost.oneconfig.config.annotations.Option;
4+
import cc.polyfrost.oneconfig.config.Config;
5+
import cc.polyfrost.oneconfig.config.annotations.HUD;
6+
import cc.polyfrost.oneconfig.config.annotations.Switch;
57
import cc.polyfrost.oneconfig.config.data.Mod;
68
import cc.polyfrost.oneconfig.config.data.ModType;
7-
import cc.polyfrost.oneconfig.config.data.OptionType;
8-
import cc.polyfrost.oneconfig.config.interfaces.Config;
99

1010
public class TestConfig extends Config {
1111

12-
@Option(
12+
@HUD(
1313
name = "Very cool HUD",
14-
subcategory = "Test",
15-
type = OptionType.HUD,
16-
size = 2
14+
subcategory = "Test"
1715
)
1816
public static TestHud testHud = new TestHud(true, 500, 500);
1917

20-
@Option(
18+
@Switch(
2119
name = "Test",
2220
subcategory = "Test",
23-
type = OptionType.SWITCH,
2421
size = 2
2522
)
2623
public static boolean test = true;
2724

2825
public TestConfig() {
29-
super(new Mod("Example Mod", ModType.UTIL_QOL), "./config/example_mod.json");
26+
super(new Mod("Example Mod", ModType.UTIL_QOL), "config/example_mod.json");
3027
}
3128
}
3229

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
package cc.polyfrost.example.hud;
22

33
import cc.polyfrost.oneconfig.hud.TextHud;
4+
import com.google.common.collect.Lists;
45
import net.minecraft.client.Minecraft;
56

7+
import java.util.List;
8+
69
public class TestHud extends TextHud {
710
public TestHud(boolean enabled, int x, int y) {
811
super(enabled, x, y);
912
}
1013

1114
@Override
12-
public String getText() {
13-
return "Hello, world! " + Minecraft.getDebugFPS();
15+
public List<String> getLines() {
16+
return Lists.newArrayList("Hello, world! " + Minecraft.getDebugFPS());
1417
}
1518
}
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
{
22
"compatibilityLevel": "JAVA_8",
33
"minVersion": "0.7",
4-
"package": "cc.polyfrost.oneconfig.mixin",
4+
"package": "cc.polyfrost.example.mixin",
55
"refmap": "mixins.oneconfig.refmap.json",
6-
"plugin": "cc.polyfrost.oneconfig.plugin.OneConfigMixinPlugin",
7-
"injectors": {
8-
"maxShiftBy": 5
9-
},
106
"verbose": true,
117
"client": [
12-
"cc.polyfrost.example.mixin.GuiIngameForgeMixin",
13-
"cc.polyfrost.example.mixin.MinecraftMixin",
14-
"cc.polyfrost.example.mixin.NetHandlerPlayClientMixin",
15-
"cc.polyfrost.example.mixin.ShaderGroupAccessor",
16-
"cc.polyfrost.example.mixin.WorldClientMixin"
8+
"MinecraftMixin"
179
]
1810
}

0 commit comments

Comments
 (0)