Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1.12 lang file entries for multi state blocks


blinky000
 Share

Recommended Posts

Custom ItemBlock classes.

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.

Link to comment
Share on other sites

That's the only way to supply a different unlocalized name for each metadata of the item stack.

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.

Link to comment
Share on other sites

In 1.13 I believe that custom ItemBlocks & Metadata are going to be phased out, and your STYLES property should be moved to multiple blocks rather than just the one. Multiple Blocks does not mean Multiple Classes - you can Reinstanitate your original class (with a few modifications) and take your type as a parameter in the constructor

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

35 minutes ago, Cadiboo said:

Multiple Blocks does not mean Multiple Classes

This is a really good point.

See all of these?

https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/OresBase.java#L92-L110

Here's the class for all of them:

https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/block/ore/BlockHardOreBase.java

Well, except diamond.

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.

Link to comment
Share on other sites

On 4/23/2018 at 1:03 AM, Cadiboo said:

In 1.13 I believe that custom ItemBlocks & Metadata are going to be phased out, and your STYLES property should be moved to multiple blocks rather than just the one. Multiple Blocks does not mean Multiple Classes - you can Reinstanitate your original class (with a few modifications) and take your type as a parameter in the constructor

OK.  I try to use one class for as many blocks as i can.  Not sure how they can totally get rid of metadata tho, unless facing becomes part of the block structure .

Edited by blinky000
add
Link to comment
Share on other sites

5 hours ago, blinky000 said:

so that would mean, if  i have a block with 4 styles, and 11 different blocks(all using the same class) i would have to instantiate 44 different blocks.

Probably not, about Metadata, here is a (badly named) thread about metadata (or lack of it) in 1.13.

 

Basically you need a new block for Variants, but Facing is stored in your block state (Properties, setDefaultState.withProperty, everything the same, but without the old getStateFromMeta & getMetaFromState functions)

 

Your 11 blocks each with 4 variants would yes, become 44 blocks.
They would be probably be instantiated something like this

 

block1_variant1 = new Block("block1_variant1");

block1_variant2 = new Block("block1_variant2");

block1_variant3 = new Block("block1_variant3");

block1_variant4 = new Block("block1_variant4");

block2_variant1 = new Block("block2_variant1");

//...

 

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Or with loops.

foreac(EnumWhatever val in EnumWhatever.values) {
    registerBlock(new Block(val));
}

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.