How do I get the redstone signal being put into a block?

Started by daredstonemodder13 on

Topic category: Help with modding (Java Edition)

Last seen on 16:38, 16. Oct 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I get the redstone signal being put into a block?

I know how to return a custom signal strength, and I want to make a block that doesn't lose signal strength, and maybe one that transfers a redstone signal somewhere else. All I need to know is how to get a redstone signal being input into the block. Thanks in advance!

Last seen on 14:57, 22. Jun 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This would be tricky, as…
Wed, 11/08/2023 - 16:40

This would be tricky, as blocks don't really save a redstone signal strength. They're either being soft-powered by redstone dust, in which case they only output a signal from repeaters; or strong-powered from a repeater or direct power source like a button or lever, in which case they always output a signal strength of 15 to dust and repeaters. Redstone dust saves signal strength as an NBT, (I think), but blocks themselves do not. 

It might still be possible to do this though, if you instead get the power level of the redstone dust input, and save it as a custom NBT tag for your block. The tricky part would be determining where the input is.