Jump to content

Recommended Posts

Posted

Hey guys,

I wondered how could i make blocks with metadata (ex. ores)? I would like to classify them as one block just with different meta. I dont know how to do this in 1.11.2 version since i got so used to 1.7.10. Any help would be appreciated :)

 

Much thanks,

Pragnje

Posted

You use Block States. You need to create an Enum property.

This is the best example I have, my ore block takes in the enum as a constructor parameter, so it makes it more difficult to follow.

https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/block/BlockMillstone.java#L42-L58

The enum used there is over here:

https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/api/blockproperties/ores/MillstoneOrientation.java

but it's got a lot of extra information tied in. For ores though, you probably just need one more like this:

https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/api/blockproperties/ores/EnumOreType.java

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

Fair warning that Metadata will be removed in 1.13 [Source]

  • Thanks 1

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 4/5/2018 at 2:20 AM, DaemonUmbra said:

Fair warning that Metadata will be removed in 1.13 [Source]

Expand  

We still don't know how that information will be represented though.

Technically metadata is already gone for blocks, but still exists as an implementation detail. That may still be true.

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
  On 4/5/2018 at 2:30 AM, Draco18s said:

We still don't know how that information will be represented though.

Technically metadata is already gone for blocks, but still exists as an implementation detail. That may still be true.

Expand  

I took a look at the player's inventory in a snapshot a couple months ago and it had nothing but, string ids I didn't believe I saw metadata for regular items only picks could be mistaking.

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.