Jump to content

1.10.2 How do I use coarse dirt for my structure in class


TheRPGAdventurer
 Share

Recommended Posts

Previously I tried to use .nbt files with structure_spawners but I think I gotta start with the basics by using .java files, I want to use coarse dirt as a part of my structure but it doesn't appear on blocks.class, maybe I have to set the data Idk that's why I need help, here is the method I use to add each block on place: worldIn.setBlockState(new BlockPos(x+1,y+0,z+3), Blocks.DIRT.getStateFromMeta(0));

Link to comment
Share on other sites

You're using the state that's equivalent to metadata 0, which is the default state (standard dirt). Coarse Dirt is a different variant of Blocks.DIRT.

 

Don't use metadata values. Use Block#getDefaultState to get the default state, then use IBlockState#withProperty to get the IBlockState with BlockDirt.VARIANT set to BlockDirt.DirtType.COARSE_DIRT.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.
Note: Your post will require moderator approval before it will be visible.

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 Terms of Use.