diff options
author | Luck <git@lucko.me> | 2021-11-30 18:48:01 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2021-11-30 18:48:01 +0000 |
commit | a2048851dd61d646ba9f41f4be3b21f332e9a169 (patch) | |
tree | 7b433a6a35277334a72a79c009078e72ce425951 | |
parent | 7d48c4601a40f7cace7aef5af5709e30672fa751 (diff) | |
download | spark-a2048851dd61d646ba9f41f4be3b21f332e9a169.tar.gz spark-a2048851dd61d646ba9f41f4be3b21f332e9a169.tar.bz2 spark-a2048851dd61d646ba9f41f4be3b21f332e9a169.zip |
Forge 1.18
3 files changed, 10 insertions, 10 deletions
diff --git a/spark-forge/build.gradle b/spark-forge/build.gradle index 5646e47..746e863 100644 --- a/spark-forge/build.gradle +++ b/spark-forge/build.gradle @@ -1,6 +1,6 @@ buildscript { repositories { - maven { url = "https://files.minecraftforge.net/maven" } + maven { url = "https://maven.minecraftforge.net" } mavenCentral() } dependencies { @@ -15,12 +15,12 @@ plugins { apply plugin: 'net.minecraftforge.gradle' tasks.withType(JavaCompile) { - // override, compile targeting J16 - options.release = 16 + // override, compile targeting J17 + options.release = 17 } minecraft { - mappings channel: 'official', version: '1.17.1' + mappings channel: 'official', version: '1.18' accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') } @@ -30,7 +30,7 @@ configurations { } dependencies { - minecraft 'net.minecraftforge:forge:1.17.1-37.0.1' + minecraft 'net.minecraftforge:forge:1.18-38.0.0' shade project(':spark-common') } diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java index 1f21391..02a2ebc 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeSparkMod.java @@ -34,7 +34,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.loading.FMLPaths; -import net.minecraftforge.fmllegacy.network.FMLNetworkConstants; +import net.minecraftforge.network.NetworkConstants; import java.nio.file.Path; @@ -49,7 +49,7 @@ public class ForgeSparkMod { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientInit); MinecraftForge.EVENT_BUS.register(this); - ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true)); + ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); } public String getVersion() { diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java index 867be42..5c2f6dd 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java @@ -44,9 +44,9 @@ import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.event.TickEvent; +import net.minecraftforge.event.server.ServerStoppingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fmllegacy.server.ServerLifecycleHooks; -import net.minecraftforge.fmlserverevents.FMLServerStoppingEvent; +import net.minecraftforge.server.ServerLifecycleHooks; import net.minecraftforge.server.permission.DefaultPermissionLevel; import net.minecraftforge.server.permission.PermissionAPI; @@ -78,7 +78,7 @@ public class ForgeServerSparkPlugin extends ForgeSparkPlugin implements Command< } @SubscribeEvent - public void onDisable(FMLServerStoppingEvent event) { + public void onDisable(ServerStoppingEvent event) { disable(); } |