Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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.

 

;)

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.

  • Author

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)

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.