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

All,

 

I have been trying to make a block that will transmit a Redstone signal. This particular attempt is supposed to work like a solar panel and only create a redstone signal in sunlight.

 

The block is created and appears in the world however when you put redstone dust next to the block you get nothing. I have tried to follow what tutorials that I can find but there is not a lot out there when it comes to creating a block that transmits redstone.

 

I have attempted to copy the RedStoneTorch class but I cannot seem to make that one work. I seem to have some sort of issue with getting RedstoneUpdateInfo to sort itself out.

 

Please review my code and if anyone can give suggestions it would be greatly appreciated.

 

I created a class called GenericBlock that inherits from Block. All block objects will inherit from the GenericBlock class. I wish to put basic code in the GenericBlock class to avoid duplication. I have cleaned up the code...anything that I copied from the RedStoneTorch class still has the original comments attached.

 

Java is not my strong suit...I am using this as a learning experience. I have gone through the forums here but with my lack of solid knowledge in Java it is very possible that I have already seen the help that I need but did not realize it.

 

Thanks for your help

 

GenericBlock.java ... http://pastebin.com/vHdJhH2i

PhotonicGenerator.java ... http://pastebin.com/d4634hKD

To be able to output a redstone signal the material HAS to be Material.circuits, are you using the right material?

  • Author

Thank you for the response. That took care of the problem and the mod works...more or less...like it is supposed to.

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.