Jump to content

Recommended Posts

Posted

hey everyone,

 

Tutorials Twitter: @helfullsTutoria

 

i am going to show and explainyou how to create mods with MinecraftForge.

 

You need to get MCP and MinecraftForge. Installinstructions u can find here:

 

 

MCP

MinecraftForge

 

Once you got Forge you are able to create mods with it since Forge has his own ModLoader.

 

Your base file is the mod_XXX.java file normal it should look like this:

package net.minecraft.src;
import net.minecraft.src.forge.MinecraftForge;
public class mod_XXX extends BaseMod {
@Override
public String getVersion() {
return "YOUR MOD VERSION";
}

@Override
public void load() {

}
}

 

All sourcecodes can be found here: https://github.com/Helfull/MinecraftForge-Modding-Tutorial/

 

Difficulty

  :)Easy

  ;)Medium

  ???Hard

  :oAdvanced

List of Contents

:)Creating porperties file

:)Creating a Block

;)Creating a Block with metedata

:)Creating a Item - ​includes ITextureProvider

:)Creating Recipes

:)Creating a Tool

;)Creating item which takes damage when used in recipe //Coming coon

;) Creatinga Tree //Coming soon

 

 

topic at minecraftforum.net (always up to date)

 

greetz

helfull

Developing CocktailsMod :)

Posted

Ooo. I might learn a little something beyond ModLoader with these. It couldn't hurt to give these a whirl as I waiting for my next semester. I'll be sure to keep these pages bookmarked along with my other tutorials. :)

Check out my

Texture Packs Thread here on the Forge Forum. :)

Currently in the process of adding some mod support for JohnSmith Texture Pack.

width=105 height=12https://www.sugarsync.com/piv/D8135159_67366891_21351[/img]

 

width=209 height=19https://www.sugarsync.com/piv/D8135159_67366891_772852[/img]

Posted

Um, you should add these to the wiki. They're really good.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted

If it would be okay for me to make a request, I have been dealing with gui's and such, and have been having a hard time grasping how TileEntities work, containers, and all that jazz.  Would it be possible to come out with a tutorial on that?  I have the basics of dealing with them down, however it would be nice to have a clear tutorial on how they work and such.

 

Shout out to hotrods20 :P

  • 2 weeks later...
Posted

Hey, i tried your block tutorial and i did everything correctly but this pops up:

 

java.lang.IllegalArgumentException: Illegal object for naming null

at cpw.mods.fml.client.FMLClientHandler.getObjectName(FMLClientHandler.java:817)

at cpw.mods.fml.common.FMLCommonHandler.addNameForObject(FMLCommonHandler.java:469)

at net.minecraft.src.ModLoader.addName(ModLoader.java:142)

at net.minecraft.src.ModLoader.addName(ModLoader.java:130)

at net.minecraft.src.tutorial.mod_mymod.addNames(mod_mymod.java:28)

at net.minecraft.src.tutorial.mod_mymod.load(mod_mymod.java:19)

at cpw.mods.fml.common.modloader.ModLoaderModContainer.init(ModLoaderModContainer.java:356)

at cpw.mods.fml.common.Loader.modInit(Loader.java:273)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:628)

at cpw.mods.fml.client.FMLClientHandler.onLoadComplete(FMLClientHandler.java:223)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:429)

at net.minecraft.client.Minecraft.run(Minecraft.java:738)

at java.lang.Thread.run(Thread.java:680)

Posted

I did everything you di and made my own stuff and that didnt work, so i just copied everything you wrote into eclipse and then just edited names to my block names and it still didnt work. PLease Help, Im getting really frustrated because ive been all around the internet and this is the first legit one i saw but yea please help!!!!

Posted

as OvermindDL1 already said, there is a NULL object where u try to name, it would be nice to see the code u used, it could be a rename misstake taht u misspelld it

Developing CocktailsMod :)

Posted

That would be nice. Then my plan for harvesting the power of lighting would work. (It's a kite launcher)

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

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

    • Make a test with another Launcher like the Curseforge Launcher, MultiMC or AT Launcher
    • can anyone help me i am opening forge and add modpacks and then it says unable to update native luancher and i redownlaod java and the luancher it self?
    • The problem occurs also in 1.20.1 Forge, but with an "Error executing task on client" instead. I have "Sinytra Connector" installed. On 1.21.5 Fabric, there is no problem. When this happens, the chat message before the death screen appears gets sent, with an extra dash added.
    • Well, as usual, it was user error. Naming mismatch in sounds.json.  Please delete this post if you find it necessary. 
    • Hello Forge community.  I'm running into an issue with a mod I'm working on.  To preface, I can call /playsound modId:name music @a and I can hear the sound I registered being played in game. Great!  However, I cannot get it to trigger via my mod code.    Registration: public static final RegistryObject<SoundEvent> A_WORLD_OF_MADNESS = SOUND_EVENTS.register("a_world_of_madness", () -> new SoundEvent(new ResourceLocation("tetheredsouls", "a_world_of_madness")));   Playback: Minecraft mc = Minecraft.getInstance(); if (!(mc.player instanceof LocalPlayer) || mc.level == null) return; LocalPlayer player = (LocalPlayer) mc.player; BlockPos pos = player.blockPosition(); SoundEvent track = ModSounds.A_WORLD_OF_MADNESS.get(); System.out.println(track); System.out.println(pos); System.out.println(player); // play exactly like the tutorial: client-only, at the player's position try { mc.level.playLocalSound( player.getX(), player.getY(), player.getZ(), track, SoundSource.MUSIC, // Or MASTER if needed 1f, 1f, false ); System.out.println("[DEBUG] playSound success: " + track.getLocation()); } catch (Exception e) { System.err.println("[ERROR] Failed to play sound: " + track.getLocation()); e.printStackTrace(); } Sounds.json:   { "theme_of_laura": { "category": "music", "sounds": [ { "name": "tetheredsouls:a_world_of_madness", "stream": true } ] } } Things I have tried: - multiple .ogg files. Short .ogg files (5 seconds, <100KB).  - default minecraft sounds imported from import net.minecraft.sounds.SoundEvents; These work given my code. No idea why these are different.  - playSound() method, as well as several others in past iterations that did not work   I would be forever grateful if somebody could point me in the right direction. I've looked at several mod github repositories and found extremely similar code to what I'm doing. I've also found several threads in this forum that did not solve my issue. I just cannot figure out what I'm doing differently, and why I'm able to queue sounds manually with playsound but the code won't play it (despite confirming the code is being run with the debug statements.)
  • Topics

×
×
  • Create New...

Important Information

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