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.

Featured Replies

Posted

Simple question that I haven't been able to find a good answer to: Can I make a block ID with each metadata value referencing a different class?

 

i.e. A block that, when powered, will switch to another block with specific logic and emits redstone.

 

Or am I going about this wrong?

yeah you are :P

 

the only that comes close to what you want to do is literally switch the block when x event happens, you cant make different meta reference different class, you could always put all those method within the same class though :\

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

Ok, here's the actual scenario: I have a block with no collision that when powered will push entities upward, but also provide a weak redstone signal on its top to power any other blocks of that type above it, making it so you only have to power the bottom block. At the moment, it works perfectly, but I'm using 2 ID's. I'm not quite getting how to manipulate the metadata to do what I want. :P (P.S. The powered block has the same texture, and won't be in the creative menu.)

the world class has 2 pretty handy method for your problem

getBlockMetadata(x, y, z);

setBlockMetadata(x, y,z );

 

use those and a switch (else if) to apply the effect you want to your block

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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.