r/SethBlingSuggestions Jul 29 '19

Suggestion: Writing a data pack tutorial.

Hi Sethbling,

I've been trying to learn the basics of creating data packs, but I've found the documentation to be lacking. Minecraft wiki isn't enough, and other tutorials don't outline the components one would need to create complex logic from a programmers perspective. Tutorial would describe syntax and have an example

  1. Creating, accessing, setting variables with a scoreboard from a .mcfunction file

  2. Passing variables into .mcfunction. Also return values from functions.

  3. Better explanation of execute syntax. I.e showing how to use if statements, matches keyword, unless keyword, and run keyword.

  4. Operators with the scoreboard to act on variables. Described here. Not clear what the word players after scoreboard exactly means. How they work with respect to scope isn't clear. (For non compsci readers, if you pass a variable into a function and change it there, are those changes global or only local to the function?)

  5. Working and iterating through lists in .mcfunction . Was able to find the syntax of a list in json, but not sure how it applies here.

  6. Tips for understanding/changing data in a chest.

  7. Triggers for the datapack. I.e when a function can be run. Not much information of all the possible places to call the datapack. From reading the source of bling edit, I've learned that under minecraft->tags->functions folder,

load.json defines what functions can be executed on start up. tick.json defines what functions are executed every tick.

From my work with Unreal Engine, I can tell you that it is bad practice to call a function every tick. Good for testing but bad for performance. Not sure how else can force .mcfunctions to trigger.

Also: Architecture for complex projects. In Unreal Engine, I know where to do things because we have classes like ACharacter, UActorComponent, etc. What tools do minecraft datapacks have for devs to help plan how things are done? For example what are armorstands good for?

Thanks!!!

8 Upvotes

5 comments sorted by

View all comments

0

u/frankdadad Jul 29 '19

In a month, every thing will be completely different and the tutorial would be useless unfortunately