-
Posts
11 -
Joined
-
Last visited
Everything posted by Chaos_02
-
Trying to backport my mod to 1.12.2 and need to set up the MDK for said version: forge-1.12.2-14.23.5.2860-mdk.zip at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:35) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:160) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:136) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:212) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startSingleUseDaemon(DefaultDaemonConnector.java:237) at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:51) at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:37) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:52) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:402) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:375) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:368) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:298) at org.gradle.launcher.Main.doAction(Main.java:36) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Please help me set up the MDK asap. Kind regards, Chaos
-
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
okay thank you for clarifying! I'll try to implement the setup method and event listeners as an extra class, maybe this works! -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
do you mean this? @Mod("examplemod") public class ExampleMod { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); public ExampleMod() { // Register the setup method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the enqueueIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); // Register the processIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) { // some preinit code LOGGER.info("HELLO FROM PREINIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } from literally mdk.zip/src/main/java/com/example/examplemod/examplemod.java ? Because, as you can see I literally copied it and then needed to comment it out because it crashes when the mod is constructed at that time -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
@diesieben07 Hey, so with some extensieve help from literally a random guy on Discord I got the project finished! I have noticed a "bug"? in FML tho: Although my mod works now, I cannot add the event listeners and stuff (literally taken from the docs) in the constructor, then the Mod crashes and fails to override the scanCandidates() method of AbstractJarFileLocator. Full Stacktrace (afterwards it just loaded default mods folder), should I create an issue on gitHub? Sadly, because of this, I was unable to use the forge config system and implemented my own with the nightconfig library. Also the Mod is currently not displayed in Minecraft in the Mods tab (looking forward!!) My most up-to-date code is on GitHub, where you can btw also find a link to its curseforge page! (for future reference: GitHub name will at some point be changed to StructuredModLoader instead of SubFolderLoader!!) -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
Another question has come up: How can I cast from a regular java File type to the IModFile type? I can't find any examples in the source code where it is done except the private method createMod. -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
if I implement IModLocator I need to implement all methods of it - even implementing the scanMods() method is hard enough because I keep having to recursively add code from other classes, which then doesnt work outside of said class. easiest example is the ModJarMetadata.buildFile method which is deprecated. Eclipse shows that buildFile is invisible. When I then copy the code of buildFile it needs the class object of ModJarMetadata which I cannot provide. Then there's also NightConfigWrapper.setFile() How do I get around this??? EDIT: I think I have it figured out now. because I just want to add to the artifacts object I can override the scanMods() method while calling itself: -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
To add my modfinding (or override FML) would I need to override the net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator.scanMods method? And if yes, how do I because when I extend my main class with MinecraftLocator and @Override scanMods with an exact copy of it it gives these errors: ModJarMetadata.buildFile(...): The method buildFile(Function<SecureJar,IModFile>, Predicate<SecureJar>, BiPredicate<String,String>, Path...) from the type ModJarMetadata is not visible this::buildMinecraftTOML: The type StructuredModLoader does not define buildMinecraftTOML(IModFile) that is applicable here I just want to add to this method, not entirely rewrite it. -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
well because it makes it easier for modpack creators to find mods that achieve a specific thing or two or to just be able to see which mod adds content and which one does not and by that definition filter out mods to reduce system load or size You'll probably see the demand for such thing once I upload it to curseforge ¯\_(ツ)_/¯ -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
thank you about the concern with multiple directories but I am talking about modpacks and that I can at least sort out library mods or coremods into their own folder (which I happily did in the minecraft verion folder) Thank you for providing me with the details I need anyway though! I'll consider this thread closed tho I still may have questions so will keep it open! -
Calling ModLoader to add jarfile to loading queue
Chaos_02 replied to Chaos_02's topic in Modder Support
Simply enough - I want to have a structure in my modfolders and since forge itself commited to not load subfolders anymore and will keep it that way according to previous questions about it I will try to do it myself! EDIT: I already implemented an algorithm that filters out folders containing configurable strings but the config file itself is also not yet documented in forge docs (I found a tutorial here tho: https://forge.gemwire.uk/wiki/Configs) -
Hi and first of all thanks in advance! I am currently trying to write a mod for Forge 1.18.1 (and upwards, maybe even backport) that needs to load a mod jarfile from a subfolder and I found the net.minecraftforge.fml.ModLoader package/class which I imported in hopes of being able to just queue the jarfile with this I have found this text when hovering over the ModLoader class: but I can't find any information online on what the # in #loadMods could stand for and or how I would use the class. I am pretty new to java and using eclipse tho I think I found my way around things by now! I have previously programmed in several C derivatives but Java is my first object oriented language. If you could help me find the right ressources and / or tell me how to use ModLoader to load a .jar file (I have the surrounding structure for finding the folder etc. already written) I would really appreciate that! Again, thanks in advance - looking forward to getting help :) ~Chaos_02