Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Making a tiny mod that basically only adds the coals and fuels from ProjectE, and would like to know how to make my Nether Star (substitution for the Philo-stone) could be used indefinitely in crafting. You'll also have to ELI5 and like I don't know ANY java. I'm very, VERY new to Java, and that is an understatement. I used MCreator for the recipe I have so far. If you could give me just a simple cut/paste of how to implement this, please do. 

Code Below.

package mod.mcreator;

import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraft.world.World;
import net.minecraft.util.ResourceLocation;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.ItemStack;
import net.minecraft.init.Items;

import java.util.Random;

public class mcreator_recipepureCoal {

	public static Object instance;

	public mcreator_recipepureCoal() {
	}

	public void load(FMLInitializationEvent event) {
		ItemStack recStack = new ItemStack(mcreator_pureCoal.block, (int) (1));
		Object[] recipe = {"012", "34 ", "   ", '0', 
				Ingredient.fromStacks(new ItemStack(Items.NETHER_STAR, (int) (1))), '1',
				Ingredient.fromStacks(new ItemStack(Items.COAL, (int) (1))), '2', 
				Ingredient.fromStacks(new ItemStack(Items.COAL, (int) (1))), '3',
				Ingredient.fromStacks(new ItemStack(Items.COAL, (int) (1))), '4', 
				Ingredient.fromStacks(new ItemStack(Items.COAL, (int) (1))),};
		GameRegistry.addShapedRecipe(new ResourceLocation("testenvironmentmod:recipepurecoal"), new ResourceLocation("custom"), recStack, recipe);
	}

	public void generateNether(World world, Random random, int chunkX, int chunkZ) {
	}

	public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
	}

	public int addFuel(ItemStack fuel) {
		return 0;
	}

	public void registerRenderers() {
	}

	public void serverLoad(FMLServerStartingEvent event) {
	}

	public void preInit(FMLPreInitializationEvent event) {
	}
}

 

Edited by Syk0tic
Typos.

1 hour ago, Syk0tic said:

 I don't know ANY java. I'm very, VERY new to Java, and that is an understatement.

msb.PNG.e0c1b243a2eb1861334d56dc651e993e.PNG

Apart from that, yeah, learn java first. There are plenty of online courses/books.

 

1 hour ago, Syk0tic said:

I used MCreator

Don't. That is the worst choice anywone who wants to do minecraft modding can make. As an example as to why recipes must be made using json, not java. And even if you use java for some god forsaken reason do it in the appropriate registry event, but not in the PreInit.

  • Author

I have taken the "Codecademy" Java course, and have a basic but very basic understanding. My brain refuses to commit anything other than pure hardware of computers, for some reason. So, Don't use MCreator, got it. Is there a knowledge base somewhere where I can figure out how to make my mod? Recipes, and all? And what program(s) do I use to make the mod?

12 minutes ago, Syk0tic said:

Is there a knowledge base somewhere where I can figure out how to make my mod?

Well there are official forge docs. You can also look at repositories of mods by other people, like here, here and here for example.

 

16 minutes ago, Syk0tic said:

And what program(s) do I use to make the mod?

Your IDE, of course.

  • Author
15 minutes ago, V0idWa1k3r said:

Well there are official forge docs. You can also look at repositories of mods by other people, like here, here and here for example.

Thanks, and 

 

16 minutes ago, V0idWa1k3r said:

Your IDE, of course.

Examples being..?

  • Author

Okay, thank you for the quick responses. I will work on learning it tomorrow, I don't know if I have school or not ?

For intelliJ, I got my modding environment set up using this video:

https://www.youtube.com/watch?v=RZ66HdNkank

 

The only real mistake he makes is not adding "\run" to the end of his configurations around 15:20 (he corrects it later, but not before it has some minor consequences).

 

I already had many years of experience with java and intelliJ before I started modding though, so I'm not sure if it will be as understandable for someone who isn't already familiar with java/intelliJ, but it's something.  If you're getting into programming you'll have to get used to experimenting and blowing stuff up once in a while anyway, so don't be too afraid of making a mistake.  If things don't get set up right you can always uninstall and start over.

1 hour ago, Laike_Endaril said:

For intelliJ, I got my modding environment set up using this video:

https://www.youtube.com/watch?v=RZ66HdNkank

Don't use a 20 minute video to setup your IDE. This is all you need to setup your IDE: https://mcforge.readthedocs.io/en/latest/gettingstarted/

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

22 hours ago, larsgerrits said:

Don't use a 20 minute video to setup your IDE. This is all you need to setup your IDE: https://mcforge.readthedocs.io/en/latest/gettingstarted/

That's actually the first thing I looked at when I started.  It wasn't nearly as helpful as the video imo (in fact, if you follow steps 1-6 on that page, as is logical, and then get down to the intelliJ section, it basically says "oh, and I hope you stopped after step 3 above"; it's not well organized, should have explicit sets of steps for each IDE)

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.