Jump to content

[Solved][1.8.X] Can't get vanilla meta data block to drop from custom meta data


kreezxil

Recommended Posts

I have the Compressed Blocks mod at https://github.com/kreezxil/Compressed-Blocks-by-Kreezxil/tree/1.8.8 and in my new Compressed Red Sand block, I'm having an issue trying to get it to drop a vanilla red sand block from my tier 0 Compressed Red Sand block. This is not an issue with my other blocks as they are not dropping vanilla meta state blocks.

 

Problem at line 142 of https://github.com/kreezxil/Compressed-Blocks-by-Kreezxil/blob/1.8.8/src/main/java/com/kreezxil/compressedblocks/blocks/compressed/RedSand.java.

 

This problem also exists my 1.8 build of the mod.

 

Any help would be greatly appreciated.

 

;)

Link to comment
Share on other sites

In getItemDropped,

 

return new ItemStack(Blocks.sand,1,1).getItem();

 

...Looks like it will drop a simple Blocks.sand. Your "new ItemStack" is wasted and does not need to be there.

 

In damageDropped, your tier zero always drops damage zero (default sand). I think you need to teach it to drop damage 1 for red sand (and any other damage  variant for any other base block having subtypes).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

In getItemDropped,

 

return new ItemStack(Blocks.sand,1,1).getItem();

 

...Looks like it will drop a simple Blocks.sand. Your "new ItemStack" is wasted and does not need to be there.

 

In damageDropped, your tier zero always drops damage zero (default sand). I think you need to teach it to drop damage 1 for red sand (and any other damage  variant for any other base block having subtypes).

 

Great catch!

 

Thanks a bunch! :)8)

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