Feature Request: List block for procedures

Started by Toyuu on

Topic category: Feature requests and ideas for MCreator

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Feature Request: List block for procedures
Sun, 12/19/2021 - 18:47 (edited)

Hello, I would like you to add a new type of block in the procedures, the lists. Lists are like variables, but each list can contain several values and it is possible to access these values. Here are my suggestions: 

1. A panel to create lists (like the one for variables)
2. A panel for adding and deleting items from a list

3.Theses new procedure blocks :

1."Add (Value) to the list (desired list)" This block creates a new element in the list (desired list) and assigns it the value (Value).

2."Delete the element (Number) from the list (desired list)" This block deletes element number (Number) from the list (desired list).

3."Get element (Number) from the list (desired list)" This block is like the "Get local:VariableName" block, the only difference is that it is for a list, and since a list has different values in it, the block returns the value of element number (Number) of the list.

4."Does the list (desired list) contain the value (Value)" This block returns "True" if one or more elements of the list (desired list) has the value (Value). Otherwise it returns "False".

5."Get length of (desired list)" This block returns the number of elements that the list (desired list) contains. For example if the list (desired list) contains 25 elements, then this block will return the number 25.

6."Get the position of (Value) in the list (desired list)" This block returns the position of the element of the list (desired list) that has the value (Value). For example if in (Value), we put "Bread" then if in the list (desired list) there is an element that has the value "Bread" and this element is element 6 of the list, then this block will return the number 6. And if in the list (desired list) there is no element that has the value "Bread" then this block will return the number 0.

_______________________________________________________________________________________

An important point if possible is that, for example, if we do this procedure:

Place (get element [15] of the list (List: [Azaroi dimension blocks]) at x:[x] y:[y] z:[z])

(The text above is a procedure block)

 

Let's imagine for example that element 15 of the list "Azaroi dimension blocks" has the value "Blue_bricks", and that in the mod there is a block called "Blue_bricks", then this procedure will place the block "Blue bricks" at x y z coordinates. I don't know if it's possible but it would be really cool if you made it possible, and not only for blocks, but also for entities, maths (Like for example: "Get element 6 of the list 'Some numbers' + 4"), items, ect...

 

Exemple of a list :

---------- List -----------

1. Enderman

2. MoonZombie

3. 45

4. Diamond_sword

----------------------------

 

Thanks for reading, and if you want more ideas of blocks and functionalities for the lists, ask me, i have others ideas that i didn't talk about.

Edited by Toyuu on Sun, 12/19/2021 - 18:47
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add enderman 'when looked at…
Sat, 03/16/2024 - 23:39

Add enderman 'when looked at:' to procedures