I'm still trying to understand how GUI's work. I've only barely scratched the surface of them but once I get the hang of it then yes I will make a tutorial on GUI's!
Rollback Post to RevisionRollBack
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
So having read and followed most of these tutorials (not the mobs, commands, or half of the old tutorials), gaining insight from the comments when information seemed to be missing from said tutorials or not clear to me, I have muddled through and made some working blocks and items; barely functional, and I'm sure my methods are dirty hacks, but they work and the don't crash minecraft (any more, one did when I tried to pass a null argument for "blocks this tool is effective on", I found a workable workaround though that doesn't crash it).
So now that I have a (mostly) functional mod, how do I condense it into a .jar file that I can drop into a <minecraft>/mods/ folder? For reference, I have been using InteliJ as described in the first of the new tutorials.
So having read and followed most of these tutorials (not the mobs, commands, or half of the old tutorials), gaining insight from the comments when information seemed to be missing from said tutorials or not clear to me, I have muddled through and made some working blocks and items; barely functional, and I'm sure my methods are dirty hacks, but they work and the don't crash minecraft (any more, one did when I tried to pass a null argument for "blocks this tool is effective on", I found a workable workaround though that doesn't crash it).
So now that I have a (mostly) functional mod, how do I condense it into a .jar file that I can drop into a <minecraft>/mods/ folder? For reference, I have been using InteliJ as described in the first of the new tutorials.
Run the gradlew build command, same as you originally ran gradlew setupdevworkspace.
Rollback Post to RevisionRollBack
Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.
Run the gradlew build command, same as you originally ran gradlew setupdevworkspace.
Unfortunately, running gradlew build seems to fail at the processResources stage. Is there a different gradlew build then the one I see? Is there something else I need to run first?
Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.
I posted all I knew in the screenshot. During "processResources", the icon would turn red and the process of building the pack would stop.
I just figured it out, though. In the file resources/mcmod.info, for mod version in I had used "$0.0.1" and MC version "$1.11.2", when "0.0.1" and "1.11.2" were correct. Not sure why I had the $ in there.
Anyways, it built the thing (I think?), now I need to figure out where it put it.
Anyways, it built the thing (I think?), now I need to figure out where it put it.
/build/lib usually.
Rollback Post to RevisionRollBack
Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.
OK, because I learned half of this from your advice, Draco18s, and because I had to figure out half of it by trial and error, here goes a mini Tutorial:
Packaging Your Mod for Uploading
1) Open Build.Gradle in your main directory using your IDE or text editor (you should see the folders src, .gradle, out, and run in that directory). This is different from importing it.
Change the group to be the same as the directory your main class is in (EG, com.cdc.tut or com.flabort.hobotools), the version number to whatever you want (EG 0.0.1), and the archivesbasename to be the last part of your group, eg tut or hobotools.
3) Find /SRC/Main/Resources/ and find the mcmod.info file and the pack.mcmeta file.
4) In Pack.mcmeta, change the description of your pack. This will be important when viewing your mod in the ingame mods menu. If you want to, you can change the pack format for lang files, but that shouldn't be necessary in most cases.
5) in mcmod.info, change modid to match archivesbasename from earlier. Change the name to something else - it's the displayed name in game. Description should match the one in Pack.mcmeta, Version should match the one in build.gradle (without the $ that is in that field originally), remove the '$' from mcversion, put your name in the authorList, and edit the Credits how you like.
6) Run the Gradlew Build task from the build folder in your gradle tasks.
7) Go to /build/libs/, where there should be two or more .jar files. Of the two most recent, one should be <yourmod>-<version>.jar, and the other will be <yourmod>-<version>-sources.jar; grab the first one of those, copying it to a safe place.
I hope there's a tutorial on TileEntities with inventor(y/ies) soon-ish, eg custom furnace-like or chest-like entities. Obviously finishing up the Mobs series is more important, though it's been 2 months...
I'm interested in the promised metadata items and itemEntity tutorials, and interested in mob assets, ie models, too, and models for non-block-shaped blocks (like for example fences or inverted hats for collecting money)
I hope there's a tutorial on TileEntities with inventor(y/ies) soon-ish, eg custom furnace-like or chest-like entities. Obviously finishing up the Mobs series is more important, though it's been 2 months...
Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
You can expect mob AI tutorial in June.
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
yay! Will we see entities as well?
Image Removed
~ Everybody's FavouriteDragon
Yep! Definitely will!
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
My prayers have been answered!:D
Image Removed
~ Everybody's FavouriteDragon
create some tutorials for GUI
I'm still trying to understand how GUI's work. I've only barely scratched the surface of them but once I get the hang of it then yes I will make a tutorial on GUI's!
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
Hi, any idea when to expect the trees tutorial? I'm itching to add one into my mod.
Not quite sure about that one. Maybe by September?
If you would like to get a hold of me somehow, then my discord is @Alex Couch#5275.
Ah, okay.
have to say, really awesome tutorial so far, finally got me into modding ^^
So having read and followed most of these tutorials (not the mobs, commands, or half of the old tutorials), gaining insight from the comments when information seemed to be missing from said tutorials or not clear to me, I have muddled through and made some working blocks and items; barely functional, and I'm sure my methods are dirty hacks, but they work and the don't crash minecraft (any more, one did when I tried to pass a null argument for "blocks this tool is effective on", I found a workable workaround though that doesn't crash it).
So now that I have a (mostly) functional mod, how do I condense it into a .jar file that I can drop into a <minecraft>/mods/ folder? For reference, I have been using InteliJ as described in the first of the new tutorials.
Blocks tool is effective on is handled in forge via Block#setHarvestLevel(string tool, int level), whereas tools set their harvest details via their tool material.
Run the gradlew build command, same as you originally ran gradlew setupdevworkspace.
Unfortunately, running gradlew build seems to fail at the processResources stage. Is there a different gradlew build then the one I see? Is there something else I need to run first?
I don't use intelliJ myself. What is the error?
I posted all I knew in the screenshot. During "processResources", the icon would turn red and the process of building the pack would stop.
I just figured it out, though. In the file resources/mcmod.info, for mod version in I had used "$0.0.1" and MC version "$1.11.2", when "0.0.1" and "1.11.2" were correct. Not sure why I had the $ in there.
Anyways, it built the thing (I think?), now I need to figure out where it put it.
/build/lib usually.
OK, because I learned half of this from your advice, Draco18s, and because I had to figure out half of it by trial and error, here goes a mini Tutorial:
Packaging Your Mod for Uploading
1) Open Build.Gradle in your main directory using your IDE or text editor (you should see the folders src, .gradle, out, and run in that directory). This is different from importing it.
2)Find the lines that look like this:
Change the group to be the same as the directory your main class is in (EG, com.cdc.tut or com.flabort.hobotools), the version number to whatever you want (EG 0.0.1), and the archivesbasename to be the last part of your group, eg tut or hobotools.
3) Find /SRC/Main/Resources/ and find the mcmod.info file and the pack.mcmeta file.
4) In Pack.mcmeta, change the description of your pack. This will be important when viewing your mod in the ingame mods menu. If you want to, you can change the pack format for lang files, but that shouldn't be necessary in most cases.
5) in mcmod.info, change modid to match archivesbasename from earlier. Change the name to something else - it's the displayed name in game. Description should match the one in Pack.mcmeta, Version should match the one in build.gradle (without the $ that is in that field originally), remove the '$' from mcversion, put your name in the authorList, and edit the Credits how you like.
6) Run the Gradlew Build task from the build folder in your gradle tasks.
7) Go to /build/libs/, where there should be two or more .jar files. Of the two most recent, one should be <yourmod>-<version>.jar, and the other will be <yourmod>-<version>-sources.jar; grab the first one of those, copying it to a safe place.
8) You are now ready to upload your mod.
Edit: Credited my helper's rank, not username.
I hope there's a tutorial on TileEntities with inventor(y/ies) soon-ish, eg custom furnace-like or chest-like entities. Obviously finishing up the Mobs series is more important, though it's been 2 months...
I'm interested in the promised metadata items and itemEntity tutorials, and interested in mob assets, ie models, too, and models for non-block-shaped blocks (like for example fences or inverted hats for collecting money)
This might come in handy:
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/api/internal/inventory/OutputItemStackHandler.java
Its a wrapper around an ItemStackHandler that prevents items from being placed in it, but as it's a wrapper, the original ItemStackHandler can still be modified normally (e.g. by the machine) whereas the wrapper is what's exposed via GetCapability.