[1.14] Allow opening of replay settings via ModMenu
This commit is contained in:
21
src/main/java/com/replaymod/core/gui/ModMenuApiImpl.java
Normal file
21
src/main/java/com/replaymod/core/gui/ModMenuApiImpl.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
//#if MC>=11400
|
||||||
|
package com.replaymod.core.gui;
|
||||||
|
|
||||||
|
import com.replaymod.core.ReplayMod;
|
||||||
|
import io.github.prospector.modmenu.api.ModMenuApi;
|
||||||
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
public class ModMenuApiImpl implements ModMenuApi {
|
||||||
|
@Override
|
||||||
|
public String getModId() {
|
||||||
|
return ReplayMod.MOD_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Function<Screen, ? extends Screen> getConfigScreenFactory() {
|
||||||
|
return parent -> new GuiReplaySettings(parent, ReplayMod.instance.getSettingsRegistry()).toMinecraft();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"client": [
|
"client": [
|
||||||
"com.replaymod.core.ReplayMod"
|
"com.replaymod.core.ReplayMod"
|
||||||
|
],
|
||||||
|
"modmenu": [
|
||||||
|
"com.replaymod.core.gui.ModMenuApiImpl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
|||||||
@@ -261,6 +261,10 @@ dependencies {
|
|||||||
shadow files(project(":jGui:$jGuiVersion").tasks.preshadowJar.archivePath) // include pre-shadowed lwjgl_util
|
shadow files(project(":jGui:$jGuiVersion").tasks.preshadowJar.archivePath) // include pre-shadowed lwjgl_util
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FABRIC) {
|
||||||
|
modCompile 'io.github.prospector.modmenu:ModMenu:1.6.2-92'
|
||||||
|
}
|
||||||
|
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.16.6'
|
annotationProcessor 'org.projectlombok:lombok:1.16.6'
|
||||||
compile 'org.projectlombok:lombok:1.16.6' // runtime only for @SneakyThrows which isn't used
|
compile 'org.projectlombok:lombok:1.16.6' // runtime only for @SneakyThrows which isn't used
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user