bc-minecraft-project
Version:
A library that provides object and handling for minecraft projects
150 lines (105 loc) • 3.61 kB
Markdown
<p align="center">
<a href="https://www.npmjs.com/package/bc-minecraft-project">
<img alt="npm" src="https://img.shields.io/npm/v/bc-minecraft-project">
<img alt="npm" src="https://img.shields.io/npm/dt/bc-minecraft-project">
</a>
</p>
A Typescript library for dealing with minecraft bedrock project data
```ts
let project = MCProject.loadSync("some folder");
//First way of getting data
let tags = project.definitions.tag;
if (tags && tags.defined.includes('target')) {
...
}
//Second way of getting data
let tag = MCDefinition.getOrAdd(project.definitions, "tag");
if (tag.defined.includes("target")) {
...
}
//First way of getting project attribute
if (project.attributes.diagnose === "true") {
...
}
//Second way of gettin project attribute
if (MCAttributes.getOrAdd(project.attributes, "diagnose", "false") === "true") {
...
}
```
This standard will introduce 3 new file that will help with project definition, attributes, excluded/includes of folders/files and settings that deal
with project for minecraft bedrock.
The file can be found in the root of the project. The following files will be added:
- [Blockception Minecraft Project](
- [Examples](
- [Project Attribute](
- [McAttributes](
- [McDefinitions](
- [McIgnore](
- [Contributing](
The file with the name: `.mcattributes`. This file stores any of the settings or attribtues related to the project. Which uses universal determined
keys along each project. Each tool/program may also introduce each own set of keys, aslong as they are unique to the tool/program. Other
programs/tools simply ignore these keys. But when overwriting the file, must keep the old keys from other tools or programs.
A wider specification can be found in [McAttributes](https://faq.blockception.dev/mcproject/mcattributes)
**Example**
```ini
diagnose=true
diagnose.objectives=true
diagnose.tags=true
diagnose.mcfunctions=true
world.area_used=0 0 0 1000 256 1000
```
---
This file specifies anything that is included in the project, but cannot be found in the project files itself, or not easly. At the same time the user
can also blacklist definition through this same project.
A wider specification can be found in [McDefinitions](https://faq.blockception.dev/mcproject/mcdefinitions)
**Example**
```ini
tag=initialized
tag=calculating
tag=enemy
tag=monster
tag=!Monster
objective=var
objective=coin
objective=foo
objective=!Var
objective=!Coin
family=npc
family=!Npc
name=Steve
name=!steve
```
---
Based upon `.gitignore`. This file specifies through glob-patterns what files, folder to included/excluded from the project.
A wider specification can be found in [McIgnore](https://faq.blockception.dev/mcproject/mcignore)
**Example**
```ini
Template
!Template/settings.json
```
---
First, read the [contributing guide](./CONTRIBUTING.md). fork the project, clone it and run the following commands:
**Installation**
```cmd
npm ci
npm update
```