Jump to content

Need Help With Making Content Packs For My Mod :( Please Help ???


Recommended Posts

Posted

Thanks for reading this, first of all, because I'm seriously confused!

 

    So I'm basically working on a mod which bring clothes into Minecraft for 1.6.2. So, I have my basic mod done, but I now need to work out a way of allowing people to download individual content packs, which add sets of clothing into my main mod. So what I'm really asking is this:

  • How Do I Make Content Packs Compatible With My Main Mod?
  • How Do I Set Them Up?

    Please post any ideas that you guys have, I'd be really grateful if you could help!  :D

Posted

You basically want to add DLC's to your mod?

 

How do you want them to work exactly?

As big things downloaded seperatly?

As stuff turned on and off via a GUI menu?

etc.

If you guys dont get it.. then well ya.. try harder...

Posted

You basically want to add DLC's to your mod?

 

How do you want them to work exactly?

As big things downloaded seperatly?

As stuff turned on and off via a GUI menu?

etc.

 

Basically, I would like people to be able to download a folder which can be put inside of a "DLC PACKS" folder (Just an example name), and then my mod would load all of the items, blocks, etc inside of that folder, but I really haven't got a ckue how to do it

 

    Thanks for the reply! :)

Posted

Are you talking about java files to compile and obfuscate, or some setting files with "readable" text ?

 

    I mean coding it in java, so just like I would with a normal mod (public static Item... and so on), but I need my main mod to be able to read the new content packs somehow, and to be able to add their items into the game

Posted

I was thinking about making it so that my main mod can detect that there is a file in it's content packs folder, which would then be able to allow the items in the content pack to work using my main mod's code. Anyone know if this is possible, or how at all to to do it?

Posted

You're essentially looking to parse a DLC folder and load classes contained within the ZIP files. You might want to take a look at how Forge parses the mods directory in the following package:

 

cpw.mods.fml.common.discovery

 

It doesn't look like an easy task but it also doesn't look impossible.

 

Posted

It sounds like you are wanting to do something like what the actual Forge API does. It basically reads EVERYTHING in the /mods folder and if there is a class that has the annotation

@Mod ( params )

then it loads it as a mod.

 

So you would have to do the same thing. You would then use an annotation like

@EsvDefconContentPack ( Same params as @Mod )

 

So yeah... That seems like an extremely hard way to do this. All you really need to do is just basically have it as a "core mod" ( not used in the literal sense of the term core mod ). Then every set of clothing mod would require that mod to be installed.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

Thanks for your reply, I think that you know exactly what I'm trying to do! So unfortunately I'm still pretty new to java, so I'd need a little more explanation of how to do it. So if I use this @Mod annotation, then I will obviously be putting it inside of a new class file? Which I'm guessing that you would also need to make a new workspace for it, because it's a different mod. I'm probably wrong, so please correct me if I am :)

Posted

* chuckles *

 

Nice try, but not quite mate. I actually have NO IDEA how to ENTIRELY go about this, but I do know what it would require.

 

I have never made my own annotation files, but I would suggest looking at the Mod annotation class. I would then also look at what Lycanus Darkbinder suggested, the cpw.mods.fml.common.discovery package.

 

BUT!!! Before you do ANY of that, go learn a far bit of java. This problem/question seems quite advanced, though I have no idea how hard as I have never tried it, but it is always good to be prepared.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

All you really need to do is just basically have it as a "core mod" ( not used in the literal sense of the term core mod ). Then every set of clothing mod would require that mod to be installed.

 

Yeah this was my thought as well of a simple way to do it.

Make those "DLC's" be submods of your main mod, that way if they are downloaded into the /mods folder they will be included else they won't count.

 

You should even be able to make some interface for downloading them and all that via some GUI or something, although loading them will req. a restart of minecraft :P

If you guys dont get it.. then well ya.. try harder...

Posted

Thanks again to everyone for all of the help, and when you were talking about making submods, would you know how to do this exactly? Sorry if I'm sounding like I haven't got a clue about java as well by the way, it's just that I'm really confused on this one. :)

Posted

Submods idea is simple:

The @Mod annotation can already handle basic mod dependency, so make submods use it with [required-after:"basemodid"]

Then you code your own ItemRegistry, or OreRegistry, or whatever in your basemod. All submod should then use that to register things. Making interfaces and release it as an API could be useful too.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It is a rendering issue with embeddium/oculus
    • So, I have a minecraft world hosted with essential on forge 1.20.1, there's 149 mods, and the forge version is 47.3.0, and it's been like that for a good 2-3 weeks, and all of a sudden, it stopped loading, and I have 0 clue as to why, and this world means A LOT to me, so if anyone out there is able to help, I would GLADLY appreciate it. here's the link if ya wanna help:   [04Dec2024 22:42:24.552] [Worker-ResourceReload-3/ERROR][net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener/]: Couldn't parse data file slabsexpanded:snow_blockblocktoslab from slabsexpanded:recipes/snow_blockblocktoslab.json com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:526) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_263475_(GsonHelper.java:531) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_13776_(GsonHelper.java:581) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_278771_(SimpleJsonResourceReloadListener.java:41) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:29) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:17) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10786_(SimplePreparableReloadListener.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:514) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007) ~[gson-2.10.jar%23107!/:?] at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:524) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?]
    • Hello! I have been having a problem with Forgematica, Embeddium, Oculus, and create. I wanted to download litematica so I could see which blocks are in my creative mode build, so that I could collect them all in survival. However, litematica is a fabric mod. I found a port called forgematica, which I added (along with it's dependency) to my mods folder. I loaded into a new world, and built a structure. Then, I added a part from the create mod, and the game crashed instantly, with exit code -1. Thanks for any help! Crash Report and mods list: https://pastebin.com/rtzh6LAi
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.