SteveRaft Posted May 11, 2019 Posted May 11, 2019 (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 May 11, 2019 by SteveRaft Information Quote
Oscarita25 Posted May 11, 2019 Posted May 11, 2019 (edited) just read your own post again.. if it outputs you as name :tile.ruby_block.name then it would not beblock.ruby_block.name=Block of Ruby change it to tile.ruby_block.name=Block of Ruby and it should work hope that helped Edited May 11, 2019 by Oscarita25 1 Quote
SteveRaft Posted May 11, 2019 Author Posted May 11, 2019 On 5/11/2019 at 10:04 PM, Oscarita25 said: just read your own post again.. if it outputs you as name :tile.ruby_block.name then it would not beblock.ruby_block.name=Block of Ruby change it to tile.ruby_block.name=Block of Ruby and it should work hope that helped Expand Works perfectly! You just saved my entire mod too! Quote
DavidM Posted May 12, 2019 Posted May 12, 2019 (edited) 1. On 5/11/2019 at 9:23 PM, SteveRaft said: public static final Block RUBY_BLOCK = new RubyBlock("ruby_block", Material.IRON); Expand Do not use static initializers. Read the common issues and recommendations for more info. 2. On 5/11/2019 at 9:23 PM, SteveRaft said: package com.SteveRaft Expand 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 May 12, 2019 by DavidM Quote Some tips: Reveal hidden contents Modder Support: Reveal hidden contents 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 Expand 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. Expand Support & Bug Reports: Reveal hidden contents 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.
SteveRaft Posted May 12, 2019 Author Posted May 12, 2019 (edited) On 5/12/2019 at 12:37 AM, 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"). Expand Where'd you recommend I start? I currently follow this person's tutorials and he really goes into detail. Edited May 12, 2019 by SteveRaft Showing Youtuber Quote
Draco18s Posted May 12, 2019 Posted May 12, 2019 Yeah. That's LoreMaster. I've made comments on his videos about the sort of crap he ends up recommending, whether intentionally or not. Quote 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.
DavidM Posted May 12, 2019 Posted May 12, 2019 (edited) On 5/12/2019 at 4:40 AM, SteveRaft said: he really goes into detail Expand 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 May 12, 2019 by DavidM Quote Some tips: Reveal hidden contents Modder Support: Reveal hidden contents 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 Expand 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. Expand Support & Bug Reports: Reveal hidden contents 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.
Recommended Posts
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.