Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.1] The Book of Minecraft Modding - complete guide for beginners


Recommended Posts

10 hours ago, diesieben07 said:

Unfortunately most modding tutorials are written by amateurs, who don't even come here to ask for feedback before posting it as just "the way to do it" on Youtube, etc.

As prior amateur, I can attest to this. Currently, I am trying to improve my skills and knowledge by being active on these forms and verifying all of what I want to say. I believe the only tutorials currently recommended are those by McJty. If you need help on a problem that you cannot deconstruct by yourself, you should always turn to the forms or the forge discord.

Link to post
Share on other sites
  • 3 weeks later...
5 hours ago, Marconium2 said:

when you create your RegistryHandler class, it would have been helpful if you showed what you put in the import ...;   section. It took me quite a while to figure out what to import.

Do you not have an IDE that does this for you? You should never have to manually worry about imports except in very special corner cases.

  • Like 1
Link to post
Share on other sites

You just give me the inspiration to do the same (of course as soon as I know more about forge and complex stuff😅).

https://thebookofmodding.ml/adding-custom-items/
 

package com.example.examplemod;

import ...;

public class RegistryHandler {
    // create DeferredRegister object
    public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ExampleMod.MODID);

    public static void init() {
        // attach DeferredRegister to the event bus
        ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
    }

    // register item
    public static final RegistryObject<Item> COPPER = ITEMS.register("copper", () ->
            new Item(
                    new Item.Properties().group(ItemGroup.MATERIALS)
            )
    );
}

 

    public static void init() {
        // attach DeferredRegister to the event bus
        ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
    }

 

Personally I register this here in the constructor of my main class, just confirm. And to keep everything organized, I create a class for every DeferredRegister (e.g. the Item DeferredRegister is in a class called "ModItems" and there are all my items), I do this for every DeferredRegister I use, but this is just a small detail and everybody has the freedom to do what he wants. (I register the bus in my mainclass constructor and separate the items from the blocks, the blocks from the potions etc.)

https://thebookofmodding.ml/
I also wanted to ask (I know that 99.99% doesn't respect this anyway, but you should always do it) that you tell the readers on the start page that they should know Java first. As I said before, 99.99% of people don't read it and start right away, they get an error and ask you directly:

 

- some guy: "Some kind of generic error", hey you! Can you please solve it for me directly? I don't understand anything about generics…

- You: Have you at least learned Java?

(The answer is already: NO)
 

So you could also just the recommend readers java tutorials in the same way as cadiboo it did (bad english, srry):
https://cadiboo.github.io/tutorials/Pre-requisites/
 

Last question:

How did you create such a website? And do you pay to host it?

I am interested in it myself (as I said before) and don't know if I should program my own website or rather use a website generator like: Github Beautiful Jekyll.  Just asking (and I think it's one of the few website tutorials, though not the only one that supports DarkTheme. Sorry, but this is something to celebrate).

 

Hope these tips will help you (sorry if it's a bit long)

P.S.: 
https://thebookofmodding.ml/loot-tables/
https://thebookofmodding.ml/crafting-and-smeliting-recipes/
I would use a DataGenerator instead of doing this manually. If you want a tutorial about the DataGenerator:
https://mcforge.readthedocs.io/en/latest/datagen/intro/

Edited by FrostDracony
  • Like 1
Link to post
Share on other sites
  • 2 weeks later...
5 hours ago, chuckster. said:

works fine up until RegistryHandler.init();. Comes up with init as red error, and RegistryHandler as depreciated with a cross through it. please help, cant find any solutions about it online.

You should make your own thread in the Modder Support forum and show your code.

Link to post
Share on other sites

Hey Could somebody here tell me how to make hostile mobs and make custom models for them and stuff I am a really big noob to this and know pretty much nothing I didnt really try and make one myself since i will most likely mess a lotta stuff up so i would really appreciate some help.
 

Edit: Also im Using 1.16

Edited by JabberWocky234
Unclarified Point
Link to post
Share on other sites
On 8/25/2020 at 4:14 PM, FrostDracony said:

S E A R C H   O N   Y O U T U B E  /  G O O G L E. You will find some tutorials, so really? Dont be too lazy. 

Probably not since most videos on youtube promote bad coding practices. Ask for help on the forums and use your brain. So, as you said, don't be too lazy.

  • Like 1
Link to post
Share on other sites
  • 7 months later...

Thanks for this tutorial. I built a mod years ago and am trying to get back into it.

Correct me if I'm wrong, but it looks like in 1.16.5, Item.Properties().group is now .tab(), and vanilla ItemGroup categories are now given in the form TAB_MATERIALS, TAB_MISC etc.

Link to post
Share on other sites
3 hours ago, Yawny420 said:

Correct me if I'm wrong, but it looks like in 1.16.5, Item.Properties().group is now .tab(), and vanilla ItemGroup categories are now given in the form TAB_MATERIALS, TAB_MISC etc.

For the official mappings yes. This tutorial uses MCP mappings so it is also correct. You will need to translate them into your mapping set used.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.