Jump to content

[1.12.2] Block named "Ruby Block" is getting named as tile.ruby_block.name while in-game for what reason?


Recommended Posts

Posted (edited)

So basically, the RUBY_BLOCK seen here is being named as this while in-game with this en_us file.

Code examples below:

 

package com.SteveRaft.epicvoidmodmodid1122.init;

import java.util.ArrayList;
import java.util.List;

import com.SteveRaft.epicvoidmodmodid1122.blocks.BlockBase;
import com.SteveRaft.epicvoidmodmodid1122.blocks.RubyBlock;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class ModBlocks 
{
	public static final List<Block> BLOCKS = new ArrayList<Block>();
	
	public static final Block RUBY_BLOCK = new RubyBlock("ruby_block", Material.IRON);
}

 

item.ruby.name=Ruby
block.ruby_block.name=Block of Ruby

 

 

EDIT: Sorry if this code doesn't make sense, I am new to Java and making minecraft mods.

Edited by SteveRaft
Information
Posted (edited)

just read your own post again..

if it outputs you as name :
tile.ruby_block.name

 

then it would not be
block.ruby_block.name=Block of Ruby

 

change it to 

tile.ruby_block.name=Block of Ruby

 

and it should work


hope that helped :P

Edited by Oscarita25
  • Thanks 1
Posted
1 hour ago, Oscarita25 said:

just read your own post again..

if it outputs you as name :
tile.ruby_block.name

 

then it would not be
block.ruby_block.name=Block of Ruby

 

change it to 

tile.ruby_block.name=Block of Ruby

 

and it should work


hope that helped :P

Works perfectly! You just saved my entire mod too! :D

Posted (edited)

1.

3 hours ago, SteveRaft said:

public static final Block RUBY_BLOCK = new RubyBlock("ruby_block", Material.IRON);

Do not use static initializers. Read the common issues and recommendations for more info.

 

2.

3 hours ago, SteveRaft said:

package com.SteveRaft

You do not own the domain "steveraft.com"; therefore, you cannot use it as your package name.

 

Are you by any chance following modding tutorials on youtube? If yes, I would recommend you to stop.

Most youtube tutorials are outdated and promotes bad practices. In fact, most you tubers who do modding tutorial are new to programming and have little idea what they are doing ("just copy paste this code because it worked for me, so it will work for you").

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted (edited)
4 hours ago, DavidM said:

1.

Do not use static initializers. Read the common issues and recommendations for more info.

 

2.

You do not own the domain "steveraft.com"; therefore, you cannot use it as your package name.

 

Are you by any chance following modding tutorials on youtube? If yes, I would recommend you to stop.

Most youtube tutorials are outdated and promotes bad practices. In fact, most you tubers who do modding tutorial are new to programming and have little idea what they are doing ("just copy paste this code because it worked for me, so it will work for you").

Where'd you recommend I start? I currently follow this person's tutorials and he really goes into detail.

Edited by SteveRaft
Showing Youtuber
Posted

Yeah. That's LoreMaster.

I've made comments on his videos about the sort of crap he ends up recommending, whether intentionally or not.

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.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
2 hours ago, SteveRaft said:

he really goes into detail

No. He makes up details.

"Hmm... I don't know what this does so I'll just connect some big words together and hopefully the audience won't figure out my mistake."

 

I would recommend some text-based tutorials like https://github.com/TheGreyGhost/MinecraftByExample.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

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



×
×
  • Create New...

Important Information

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