Is there a way to output a Redstone signal from a custom block with a procedure?

Started by Vatisco on

Topic category: Help with modding (Java Edition)

Last seen on 01:24, 22. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to output a Redstone signal from a custom block with a procedure?

Is there a way for me to output a redstone signal from a custom block, which can also be controlled by a procedure?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could try by making 2…
Tue, 10/12/2021 - 00:35

you could try by making 2 blocks

Last seen on 15:49, 18. Feb 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can do it by adding…
Wed, 10/13/2021 - 10:44

You can do it by adding redstone power on the block, make the block a tile entity, make a procedure called WhenCustomBlockTrigerred

Set NBT integer tag "RedstonePower" of block at (x) (y) (z) to [15]
Wait [100] ticks on server-side
do
  Set NBT integer tag "RedstonePower" of block at (x) (y) (z) to [0]

Then add a procedure called GetCustomBlockRedstone

return integer (Get NBT integer tag "RedstonePower" of block at (x) (y) (z))

call the first procedure when the block is trigerred, call the second one by changing the "Fixed" field in Advanced Properties