How can I make a block that connects like redstone and string do?

Started by Rocketman5234 on

Topic category: Help with modding (Java Edition)

Last seen on 20:42, 7. Sep 2021
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make a block that connects like redstone and string do?

So I'm making a mod and I need a block that connects similar to redstone and string, does anyone know how to do this?

Last seen on 02:47, 23. Aug 2022
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You would need multiple…
Thu, 12/30/2021 - 03:40

You would need multiple blocks acting like multiple states. You would also need to use the trigger "Update tick". This means every block tick it would run whatever procedure you want.

for example: To make Redstone you would need to know 1 thing, power level. The power level can be established in the block itself. having 16 blocks, ranging from no power to full power. You would need to check every Redstone variant around you, and then use that to figure out what power level you need (MATH).

For something like string, it's very similar to Redstone with a couple of differences. Instead of having 16 blocks, there is only 3. 1 for not connected to tripwire, 1 that's connected but not activated, and the last 1 is both connected and activated. You're going to need to use procedures to check if the string next to it is connected to or is itself a tripwire. If those requirements are met, turn itself into a connected string variant. Finally, if a player is ever touching a connected string variant, activate.

You can change or modify any of these, but you need to know that the connections are all created by you, using procedures. There isn't a checkbox in the block tab that says "Connect".