Get core, recording and replay modules compiling on 1.13.2
This commit is contained in:
10
src/main/java/com/replaymod/core/Module.java
Normal file
10
src/main/java/com/replaymod/core/Module.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.replaymod.core;
|
||||
|
||||
public interface Module {
|
||||
// FMLCommonSetupEvent for 1.13+, FMLInitializationEvent below
|
||||
default void initCommon() {}
|
||||
// FMLClientSetupEvent for 1.13+, FMLInitializationEvent (if client) below
|
||||
default void initClient() {}
|
||||
// FMLClientSetupEvent for 1.13+, FMLInitializationEvent below
|
||||
default void registerKeyBindings(KeyBindingRegistry registry) {}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import de.johni0702.minecraft.gui.container.GuiScreen;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import org.apache.commons.io.Charsets;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -22,10 +21,15 @@ import org.apache.commons.io.FileUtils;
|
||||
import com.replaymod.core.versions.LangResourcePack;
|
||||
import net.minecraft.resources.FolderPack;
|
||||
import net.minecraft.resources.IResourcePack;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLModLoadingContext;
|
||||
import net.minecraftforge.fml.DeferredWorkQueue;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.versions.mcp.MCPVersion;
|
||||
//#else
|
||||
//$$ import net.minecraft.client.resources.FolderResourcePack;
|
||||
//$$ import net.minecraft.client.resources.IResourcePack;
|
||||
//$$ import net.minecraftforge.common.config.Configuration;
|
||||
//#endif
|
||||
|
||||
//#if MC>=10904
|
||||
@@ -51,12 +55,12 @@ import net.minecraftforge.fml.ModList;
|
||||
//$$ import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
//$$ import net.minecraftforge.fml.common.Mod.Instance;
|
||||
//$$ import net.minecraftforge.fml.common.ModContainer;
|
||||
//$$ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
//$$ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
//$$ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
//$$ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
//#endif
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
//#else
|
||||
//$$ import cpw.mods.fml.common.Loader;
|
||||
@@ -99,7 +103,7 @@ import static com.replaymod.core.versions.MCVer.*;
|
||||
//#endif
|
||||
//$$ guiFactory = "com.replaymod.core.gui.GuiFactory")
|
||||
//#endif
|
||||
public class ReplayMod {
|
||||
public class ReplayMod implements Module {
|
||||
|
||||
public static ModContainer getContainer() {
|
||||
//#if MC>=11300
|
||||
@@ -111,7 +115,7 @@ public class ReplayMod {
|
||||
|
||||
@Getter(lazy = true)
|
||||
//#if MC>=11300
|
||||
private static final String minecraftVersion = "1.13"; // FIXME
|
||||
private static final String minecraftVersion = MCPVersion.getMCVersion();
|
||||
//#else
|
||||
//$$ private static final String minecraftVersion = Loader.MC_VERSION;
|
||||
//#endif
|
||||
@@ -123,11 +127,16 @@ public class ReplayMod {
|
||||
|
||||
private static final Minecraft mc = MCVer.getMinecraft();
|
||||
|
||||
@Deprecated
|
||||
public static Configuration config;
|
||||
//#if MC<11300
|
||||
//$$ @Deprecated
|
||||
//$$ public static Configuration config;
|
||||
//#endif
|
||||
|
||||
private final KeyBindingRegistry keyBindingRegistry = new KeyBindingRegistry();
|
||||
private final SettingsRegistry settingsRegistry = new SettingsRegistry();
|
||||
{
|
||||
settingsRegistry.register(Setting.class);
|
||||
}
|
||||
|
||||
// The instance of your mod that Forge uses.
|
||||
//#if MC>=11300
|
||||
@@ -138,9 +147,31 @@ public class ReplayMod {
|
||||
public static ReplayMod instance;
|
||||
|
||||
private final List<Module> modules = new ArrayList<>();
|
||||
{
|
||||
|
||||
public ReplayMod() {
|
||||
I18n.setI18n(net.minecraft.client.resources.I18n::format);
|
||||
|
||||
// Initialize the static OpenGL info field from the minecraft main thread
|
||||
// Unfortunately lwjgl uses static methods so we have to make use of magic init calls as well
|
||||
DeferredWorkQueue.runLater(OpenGLUtils::init);
|
||||
|
||||
//#if MC>=11300
|
||||
DeferredWorkQueue.runLater(() -> MCVer.getMinecraft().resourcePackRepository.addPackFinder(new LangResourcePack.Finder()));
|
||||
//#endif
|
||||
|
||||
// Register all RM modules
|
||||
modules.add(this);
|
||||
modules.add(new ReplayModRecording(this));
|
||||
modules.add(new ReplayModReplay(this));
|
||||
|
||||
//#if MC>=11300
|
||||
settingsRegistry.register();
|
||||
//#else
|
||||
//$$ config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
//$$ config.load();
|
||||
//$$ settingsRegistry.setConfiguration(config);
|
||||
//$$ settingsRegistry.save(); // Save default values to disk
|
||||
//#endif
|
||||
}
|
||||
|
||||
public KeyBindingRegistry getKeyBindingRegistry() {
|
||||
@@ -158,32 +189,6 @@ public class ReplayMod {
|
||||
return folder;
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
{ FMLModLoadingContext.get().getModEventBus().addListener(this::preInit); }
|
||||
//#else
|
||||
//$$ @EventHandler
|
||||
//#endif
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
// Initialize the static OpenGL info field from the minecraft main thread
|
||||
// Unfortunately lwjgl uses static methods so we have to make use of magic init calls as well
|
||||
OpenGLUtils.init();
|
||||
|
||||
I18n.setI18n(net.minecraft.client.resources.I18n::format);
|
||||
//#if MC>=11300
|
||||
MCVer.getMinecraft().resourcePackRepository.addPackFinder(new LangResourcePack.Finder());
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
config = new Configuration(new File(mcDataDir(mc), "configs/replaymod.cfg")); // FIXME where'd the suggestion go?
|
||||
//#else
|
||||
//$$ config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
//#endif
|
||||
// FIXME forge config api is currently broken config.load();
|
||||
settingsRegistry.setConfiguration(config);
|
||||
|
||||
modules.forEach(m -> m.preInit(event));
|
||||
}
|
||||
|
||||
//#ifdef DEV_ENV
|
||||
static { // Note: even preInit is too late and we'd have to issue another resource reload
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -231,39 +236,41 @@ public class ReplayMod {
|
||||
//#endif
|
||||
|
||||
//#if MC>=11300
|
||||
{ FMLModLoadingContext.get().getModEventBus().addListener(this::init); }
|
||||
{
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener((FMLCommonSetupEvent event) -> modules.forEach(Module::initCommon));
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener((FMLClientSetupEvent event) -> modules.forEach(Module::initClient));
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener((FMLClientSetupEvent event) -> modules.forEach(m -> m.registerKeyBindings(keyBindingRegistry)));
|
||||
}
|
||||
//#else
|
||||
//$$ @EventHandler
|
||||
//$$ public void init(FMLInitializationEvent event) {
|
||||
//$$ modules.forEach(Module::initCommon);
|
||||
//$$ modules.forEach(Module::initClient);
|
||||
//$$ modules.forEach(m -> m.registerKeyBindings(keyBindingRegistry));
|
||||
//$$ }
|
||||
//#endif
|
||||
public void init(FMLInitializationEvent event) {
|
||||
getSettingsRegistry().register(Setting.class);
|
||||
|
||||
@Override
|
||||
public void registerKeyBindings(KeyBindingRegistry registry) {
|
||||
registry.registerKeyBinding("replaymod.input.settings", 0, () -> {
|
||||
new GuiReplaySettings(null, settingsRegistry).display();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initClient() {
|
||||
new MainMenuHandler().register();
|
||||
|
||||
//#if MC<=10710
|
||||
//$$ FML_BUS.register(this); // For runLater(Runnable)
|
||||
//#endif
|
||||
|
||||
FML_BUS.register(keyBindingRegistry);
|
||||
|
||||
getKeyBindingRegistry().registerKeyBinding("replaymod.input.settings", 0, () -> {
|
||||
new GuiReplaySettings(null, settingsRegistry).display();
|
||||
});
|
||||
|
||||
modules.forEach(m -> m.init(event));
|
||||
}
|
||||
|
||||
//#if MC>=11300
|
||||
{ FMLModLoadingContext.get().getModEventBus().addListener(this::postInit); }
|
||||
//#else
|
||||
//$$ @EventHandler
|
||||
//#endif
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
settingsRegistry.save(); // Save default values to disk
|
||||
|
||||
// 1.7.10 crashes when render distance > 16
|
||||
//#if MC>=10800
|
||||
//if(!FMLClientHandler.instance().hasOptifine()) FIXME 1.13 update
|
||||
GameSettings.Options.RENDER_DISTANCE.setValueMax(64f);
|
||||
GameSettings.Options.RENDER_DISTANCE.setValueMax(64f);
|
||||
//#endif
|
||||
|
||||
testIfMoeshAndExitMinecraft();
|
||||
@@ -300,8 +307,6 @@ public class ReplayMod {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
modules.forEach(m -> m.postInit(event));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -433,10 +438,4 @@ public class ReplayMod {
|
||||
mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentTranslation(message, args));
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class Module {
|
||||
public void preInit(FMLPreInitializationEvent event) {}
|
||||
public void init(FMLInitializationEvent event) {}
|
||||
public void postInit(FMLPostInitializationEvent event) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,67 @@
|
||||
package com.replaymod.core;
|
||||
|
||||
import com.replaymod.core.events.SettingsChangedEvent;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
//#if MC>=11300
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.config.ModConfig;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.common.config.Configuration;
|
||||
//#endif
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
public class SettingsRegistry {
|
||||
private static final Object NULL_OBJECT = new Object();
|
||||
private Map<SettingKey<?>, Object> settings = new ConcurrentHashMap<>();
|
||||
private Configuration configuration;
|
||||
//#if MC>=11300
|
||||
private ForgeConfigSpec spec;
|
||||
private ModConfig config;
|
||||
//#else
|
||||
//$$ private Configuration configuration;
|
||||
//#endif
|
||||
|
||||
public void setConfiguration(Configuration configuration) {
|
||||
this.configuration = configuration;
|
||||
//#if MC>=11300
|
||||
public void register() {
|
||||
if (spec == null) {
|
||||
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
||||
for (SettingKey<?> key : settings.keySet()) {
|
||||
builder
|
||||
.translation(key.getDisplayString())
|
||||
.define(key.getCategory() + "." + key.getKey(), key.getDefault());
|
||||
}
|
||||
spec = builder.build();
|
||||
}
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::load);
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, spec);
|
||||
}
|
||||
|
||||
List<SettingKey<?>> keys = new ArrayList<>(settings.keySet());
|
||||
settings.clear();
|
||||
for (SettingKey key : keys) {
|
||||
register(key);
|
||||
private void load(ModConfig.Loading event) {
|
||||
config = event.getConfig();
|
||||
for (Map.Entry<SettingKey<?>, Object> entry : settings.entrySet()) {
|
||||
SettingKey<?> key = entry.getKey();
|
||||
Object value = config.getConfigData().get(key.getCategory() + "." + key.getKey());
|
||||
entry.setValue(value == null ? key.getDefault() : value);
|
||||
}
|
||||
}
|
||||
//#else
|
||||
//$$ public void setConfiguration(Configuration configuration) {
|
||||
//$$ this.configuration = configuration;
|
||||
//$$
|
||||
//$$ List<SettingKey<?>> keys = new ArrayList<>(settings.keySet());
|
||||
//$$ settings.clear();
|
||||
//$$ for (SettingKey key : keys) {
|
||||
//$$ register(key);
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
public void register(Class<?> settingsClass) {
|
||||
for (Field field : settingsClass.getDeclaredFields()) {
|
||||
@@ -40,23 +77,30 @@ public class SettingsRegistry {
|
||||
}
|
||||
|
||||
public void register(SettingKey<?> key) {
|
||||
Object value;
|
||||
if (configuration != null) {
|
||||
if (key.getDefault() instanceof Boolean) {
|
||||
value = configuration.get(key.getCategory(), key.getKey(), (Boolean) key.getDefault()).getBoolean();
|
||||
} else if (key.getDefault() instanceof Integer) {
|
||||
value = configuration.get(key.getCategory(), key.getKey(), (Integer) key.getDefault()).getInt();
|
||||
} else if (key.getDefault() instanceof Double) {
|
||||
value = configuration.get(key.getCategory(), key.getKey(), (Double) key.getDefault()).getDouble();
|
||||
} else if (key.getDefault() instanceof String) {
|
||||
value = configuration.get(key.getCategory(), key.getKey(), (String) key.getDefault()).getString();
|
||||
} else {
|
||||
throw new IllegalArgumentException("Default type " + key.getDefault().getClass() + " not supported.");
|
||||
}
|
||||
} else {
|
||||
value = NULL_OBJECT;
|
||||
//#if MC>=11300
|
||||
if (spec != null) {
|
||||
throw new IllegalStateException("Cannot register more settings are spec has been built.");
|
||||
}
|
||||
settings.put(key, value);
|
||||
settings.put(key, NULL_OBJECT);
|
||||
//#else
|
||||
//$$ Object value;
|
||||
//$$ if (configuration != null) {
|
||||
//$$ if (key.getDefault() instanceof Boolean) {
|
||||
//$$ value = configuration.get(key.getCategory(), key.getKey(), (Boolean) key.getDefault()).getBoolean();
|
||||
//$$ } else if (key.getDefault() instanceof Integer) {
|
||||
//$$ value = configuration.get(key.getCategory(), key.getKey(), (Integer) key.getDefault()).getInt();
|
||||
//$$ } else if (key.getDefault() instanceof Double) {
|
||||
//$$ value = configuration.get(key.getCategory(), key.getKey(), (Double) key.getDefault()).getDouble();
|
||||
//$$ } else if (key.getDefault() instanceof String) {
|
||||
//$$ value = configuration.get(key.getCategory(), key.getKey(), (String) key.getDefault()).getString();
|
||||
//$$ } else {
|
||||
//$$ throw new IllegalArgumentException("Default type " + key.getDefault().getClass() + " not supported.");
|
||||
//$$ }
|
||||
//$$ } else {
|
||||
//$$ value = NULL_OBJECT;
|
||||
//$$ }
|
||||
//$$ settings.put(key, value);
|
||||
//#endif
|
||||
}
|
||||
|
||||
public Set<SettingKey<?>> getSettings() {
|
||||
@@ -72,23 +116,35 @@ public class SettingsRegistry {
|
||||
}
|
||||
|
||||
public <T> void set(SettingKey<T> key, T value) {
|
||||
if (key.getDefault() instanceof Boolean) {
|
||||
configuration.get(key.getCategory(), key.getKey(), (Boolean) key.getDefault()).set((Boolean) value);
|
||||
} else if (key.getDefault() instanceof Integer) {
|
||||
configuration.get(key.getCategory(), key.getKey(), (Integer) key.getDefault()).set((Integer) value);
|
||||
} else if (key.getDefault() instanceof Double) {
|
||||
configuration.get(key.getCategory(), key.getKey(), (Double) key.getDefault()).set((Double) value);
|
||||
} else if (key.getDefault() instanceof String) {
|
||||
configuration.get(key.getCategory(), key.getKey(), (String) key.getDefault()).set((String) value);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Default type " + key.getDefault().getClass() + " not supported.");
|
||||
//#if MC>=11300
|
||||
if (config != null) {
|
||||
config.getConfigData().set(key.getCategory() + "." + key.getKey(), value);
|
||||
}
|
||||
//#else
|
||||
//$$ if (key.getDefault() instanceof Boolean) {
|
||||
//$$ configuration.get(key.getCategory(), key.getKey(), (Boolean) key.getDefault()).set((Boolean) value);
|
||||
//$$ } else if (key.getDefault() instanceof Integer) {
|
||||
//$$ configuration.get(key.getCategory(), key.getKey(), (Integer) key.getDefault()).set((Integer) value);
|
||||
//$$ } else if (key.getDefault() instanceof Double) {
|
||||
//$$ configuration.get(key.getCategory(), key.getKey(), (Double) key.getDefault()).set((Double) value);
|
||||
//$$ } else if (key.getDefault() instanceof String) {
|
||||
//$$ configuration.get(key.getCategory(), key.getKey(), (String) key.getDefault()).set((String) value);
|
||||
//$$ } else {
|
||||
//$$ throw new IllegalArgumentException("Default type " + key.getDefault().getClass() + " not supported.");
|
||||
//$$ }
|
||||
//#endif
|
||||
settings.put(key, value);
|
||||
FML_BUS.post(new SettingsChangedEvent(this, key));
|
||||
}
|
||||
|
||||
public void save() {
|
||||
// FIXME forge config api is currently broken configuration.save();
|
||||
//#if MC>=11300
|
||||
if (config != null) {
|
||||
config.save();
|
||||
}
|
||||
//#else
|
||||
//$$ configuration.save();
|
||||
//#endif
|
||||
}
|
||||
|
||||
public interface SettingKey<T> {
|
||||
@@ -127,7 +183,7 @@ public class SettingsRegistry {
|
||||
|
||||
@Override
|
||||
public String getDisplayString() {
|
||||
return displayString == null ? null : I18n.format(displayString);
|
||||
return displayString;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,7 +41,7 @@ public class GuiReplaySettings extends AbstractGuiScreen<GuiReplaySettings> {
|
||||
@SuppressWarnings("unchecked")
|
||||
final SettingsRegistry.SettingKey<Boolean> booleanKey = (SettingsRegistry.SettingKey<Boolean>) key;
|
||||
final GuiToggleButton button = new GuiToggleButton<>().setSize(150, 20)
|
||||
.setLabel(key.getDisplayString()).setSelected(settingsRegistry.get(booleanKey) ? 0 : 1)
|
||||
.setI18nLabel(key.getDisplayString()).setSelected(settingsRegistry.get(booleanKey) ? 0 : 1)
|
||||
.setValues(I18n.format("options.on"), I18n.format("options.off"));
|
||||
element = button.onClick(new Runnable() {
|
||||
@Override
|
||||
@@ -60,7 +60,7 @@ public class GuiReplaySettings extends AbstractGuiScreen<GuiReplaySettings> {
|
||||
for (int j = 0; j < entries.length; j++) {
|
||||
Object value = values.get(j);
|
||||
entries[j] = new MultipleChoiceDropdownEntry(value,
|
||||
multipleChoiceKey.getDisplayString() + ": " + I18n.format(value.toString()));
|
||||
I18n.format(multipleChoiceKey.getDisplayString()) + ": " + I18n.format(value.toString()));
|
||||
if (currentValue.equals(value)) {
|
||||
selected = j;
|
||||
}
|
||||
|
||||
@@ -73,12 +73,25 @@ import static com.replaymod.core.versions.MCVer.getMinecraft;
|
||||
|
||||
public class Utils {
|
||||
|
||||
private static InputStream getResourceAsStream(String path) {
|
||||
// FIXME this seems broken in 1.13, hence the workaround. probably want to open an issue with modlauncher (or forge?)
|
||||
//#ifdef DEV_ENV
|
||||
try {
|
||||
return new java.io.FileInputStream(new File("../src/main/resources" + path));
|
||||
} catch (java.io.FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//#else
|
||||
//$$ return Utils.class.getResourceAsStream(path);
|
||||
//#endif
|
||||
}
|
||||
|
||||
public static final BufferedImage DEFAULT_THUMBNAIL;
|
||||
|
||||
static {
|
||||
BufferedImage thumbnail;
|
||||
try {
|
||||
thumbnail = ImageIO.read(Utils.class.getClassLoader().getResourceAsStream("default_thumb.jpg"));
|
||||
thumbnail = ImageIO.read(getResourceAsStream("/default_thumb.jpg"));
|
||||
} catch (Exception e) {
|
||||
thumbnail = new BufferedImage(1, 1, BufferedImage.TYPE_3BYTE_BGR);
|
||||
e.printStackTrace();
|
||||
@@ -103,7 +116,7 @@ public class Utils {
|
||||
|
||||
static {
|
||||
// Largely from https://community.letsencrypt.org/t/134/37
|
||||
try (InputStream in = Utils.class.getResourceAsStream("/dst_root_ca_x3.pem")){
|
||||
try (InputStream in = getResourceAsStream("/dst_root_ca_x3.pem")){
|
||||
Certificate certificate = CertificateFactory.getInstance("X.509").generateCertificate(in);
|
||||
|
||||
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||
|
||||
@@ -47,7 +47,7 @@ public class LangResourcePack extends AbstractResourcePack {
|
||||
}
|
||||
|
||||
private ModFileResourcePack getParent() {
|
||||
return (ModFileResourcePack) ResourcePackLoader.getResourcePackFor(ReplayMod.MOD_ID);
|
||||
return ResourcePackLoader.getResourcePackFor(ReplayMod.MOD_ID).orElseThrow(() -> new RuntimeException("Failed to get ReplayMod resource pack!"));
|
||||
}
|
||||
|
||||
private String langName(String path) {
|
||||
|
||||
Reference in New Issue
Block a user