These tutorials are meant to help others learn how to mod Minecraft
using Forge, as well as learn the concepts behind the code. If you don’t
know any Java, please go learn some and come back! There are lots of
great Java tutorials online, and trying to mod Minecraft without a good
understanding of Java is very confusing.
Sorry for the late reply; I've been fairly busy lately. It's good to hear that you're enjoying the tutorials!
If you want to add a custom tooltip to your item, you can override the addInformation() method in your item class, like so:
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
tooltip.add("Damage: " + stack.getItemDamage());
}
Alternatively, you could subscribe to the ItemTooltipEvent and add to the tooltip there, using
event.getToolTip().add("Tooltip here");
to add to the tooltip (after checking if it is the right item). This is good for changing the tooltips of vanilla items, but is a bit more complicated, as it uses event handlers. I'll get my own tutorial on this out eventually, but until then, check out jabelar's tutorial on the subject. I'll also cover the jar exporting in my own tutorial soon.
I followed the tutorials to the "basic item" part, and it gives an error:
It sounds like you didn't have your basic item class extend Item. Make sure to do that, and if that doesn't help, posting your code to Pastebin or Github would be appreciated.
I took a look at your entire class, and I didn't see anything wrong with it (except that Java class names should begin with a capital letter). If you could post all of your code (preferably on GitHub), that would be helpful.
Your code looks fine (except that all classes should begin with a capital letter, but that's probably not what's causing this). The only thing I can think of is to make sure that your project is set up correctly, because right now, your beefpp class can't access the setUnlocalizedName() method from the Item class.
https://cubicoder.wordpress.com/
These tutorials are meant to help others learn how to mod Minecraft
using Forge, as well as learn the concepts behind the code. If you don’t
know any Java, please go learn some and come back! There are lots of
great Java tutorials online, and trying to mod Minecraft without a good
understanding of Java is very confusing.
Currently available:
Setting up the Development Environment
Main Mod Class
Proxies
Basic Item
Basic Block
Language File
Custom Creative Tab
Custom Tools
Custom Armor
Crafting Recipes
Furnace Recipes
Exporting Your Mod
Ore Generation
Planned:
Food
Crops
Ore Dictionary
Tile Entities?
????
Sorry for the late reply; I've been fairly busy lately. It's good to hear that you're enjoying the tutorials!
If you want to add a custom tooltip to your item, you can override the addInformation() method in your item class, like so:
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { tooltip.add("Damage: " + stack.getItemDamage()); }Alternatively, you could subscribe to the ItemTooltipEvent and add to the tooltip there, using
event.getToolTip().add("Tooltip here");to add to the tooltip (after checking if it is the right item). This is good for changing the tooltips of vanilla items, but is a bit more complicated, as it uses event handlers. I'll get my own tutorial on this out eventually, but until then, check out jabelar's tutorial on the subject. I'll also cover the jar exporting in my own tutorial soon.
Ah, I forgot about I18n. Definitely better to do it that way.
Also, I added a tutorial on exporting the mod for you!
It is, although I'm not planning on doing any more 1.12.2 tutorials because of the massive amount of changes coming in 1.13.
It sounds like you didn't have your basic item class extend Item. Make sure to do that, and if that doesn't help, posting your code to Pastebin or Github would be appreciated.
I took a look at your entire class, and I didn't see anything wrong with it (except that Java class names should begin with a capital letter). If you could post all of your code (preferably on GitHub), that would be helpful.
Your code looks fine (except that all classes should begin with a capital letter, but that's probably not what's causing this). The only thing I can think of is to make sure that your project is set up correctly, because right now, your beefpp class can't access the setUnlocalizedName() method from the Item class.
Great tutorials