Better redstone functionality and support

Published by aidanete on Thu, 07/25/2019 - 18:30
Upvotes: 4
Issue description

MCreator actually doesn't support very well Minecraft Redstone, we cannot do practically anything related to redstone.

My idea is to change completely MCreator way to work with Redstone with these new things.

New events for blocks:

  • Once redstone on
  • Once redstone off

New procedure blocks (int means integer/number placeholder): 

  • Is block at x, y, z, receiving a Redstone power? - Returns boolean
  • Is block at x, y, z receiving a Redstone power of amount (int) - Returns boolean
  • Send Redstone power of amount (int) from block at x, y, z.
  • Get redstone power received by block at x, y, z - Returns int

Will also be cool to be able to select the side where the power will send but I think that might be hard.

New option for blocks:

  • Can this block send redstone through?.(Like glass cannot send redstone but grass or stone, for example, yes)

Sorry again for the list but a big redstone support revamp must be done before 2.0.0 at least I think.

Issue comments

Redstone on and off events already exist for blocks, to only detect the change, save old state in NBT block variable.

For controlling redstone power, this bug needs to be fixed: https://mcreator.net/tracker/issue/49948

For checking redstone power, there already are procedures for this in procedure editor, they return numbers but with simple math comparison they can be converted to a logical variable.

One can not control redstone power of random block at x,y,z as you suggested so this can't be added. Block needs to support redstone power to emit it and just some of them do.

We will consider adding this pass redstone power option for blocks though.

Ok, thank you :)

There is a block in my Additional Stuff mod that is hidden because doesn't work due to that bug with redstone.

I already know!
This is it just need a two procedures block:
GetRedstonePower(SIDE) that return POWER,  and
SetRedstonePower(SIDE, POWER).

And where "POWER" is restrone power as integer walue, and "SIDE" is value with it presents a side of block according it's direction orientatnion. Value of "SIDE" is:
0 - ANY/ALL(as default)
1 - FORWARD
2 - BACKWARD
3 - LEFT
4 - RIGHT
5 - UP
6 - DOWN

This can make possible create not only a redstone cable(whose unlike redstone dust can be place everywhere and can conduct redstone singal vertically too) but one-block logical gates and other "electricall" machines as well!



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.