Wiki 9Minecraft Wiki 9Minecraft
Minecraft Legends › BSharpReferenceSheet › Naming Conventions

Naming Conventions

Minecraft Legends

BSharpReferenceSheet
Official docs

When a constant or function at the global scope is prefixed with _ it means this constant/function is only used within this file. For example _SpawnAttackingUnits = () => { // return stuff } .This provides an easy way to know if changing a function’s behaviour could affect other scripts.

To be clear this is purely used for semantics - all scripts are loaded at the global level meaning you *can* reference other file’s constants (but you shouldn’t!). If you get a ‘x declared already’ error this is most likely why!

When _ is used in a function though, it means the function argument is not used. For example SNIPPET_EntitySpawned(..., (_spawnedEntity)) - if you don’t actually need to operate on the spawned entity in anyway.