Skip to content

Commit

Permalink
feat(features): Add a number of example features (#54)
Browse files Browse the repository at this point in the history
- feat(features): Add a number of example features
- Clean up various READMEs and other files
  • Loading branch information
mammerla authored Oct 25, 2024
1 parent 0d797ce commit d9e058b
Show file tree
Hide file tree
Showing 178 changed files with 22,780 additions and 36 deletions.
Binary file removed FeaturesSamples.mcaddon
Binary file not shown.
11 changes: 6 additions & 5 deletions addon_starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ products:

This sample demonstrates everything you need to have an add-on in Minecraft. There are three versions and progressions:

* `start` is a foundational starter project. It comes with a gulp-based workflow tool
* `start` is a foundational starter project. It comes with a justjs-based workflow tool
* `1_hello_world` is a basic entity that will show you that your add-on is working. It comes a mob that overrides the default cow in Minecraft
* `2_entities` adds a set of entities (from the MCLive2022 add-on pack to the add-on)
* `complete` adds more functionality and scripts to the add-on
Expand All @@ -35,7 +35,7 @@ Visit the [Visual Studio Code website](https://code.visualstudio.com) and instal

## Getting Started

1. Using a copy of this starter project from GitHub - you can get a copy of this project by visiting [https://github.com/microsoft/minecraft-samples/](https://github.com/microsoft/minecraft-scripting-samples/) and, under the Code button, selecting `Download ZIP`.
1. Using a copy of this starter project from GitHub - you can get a copy of this project by visiting [https://github.com/microsoft/minecraft-samples/](https://github.com/microsoft/minecraft-samples/) and, under the Code button, selecting `Download ZIP`.

1. The `addon_starter/start` folder contains a starter add-on project for Minecraft.

Expand Down Expand Up @@ -100,6 +100,7 @@ With this starter, you've seen how to build a nice little add-on.

## Manifest

-[gulpfile.js](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/gulpfile.js): This file contains build instructions for Gulp, for building out TypeScript code.
-[scripts](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/scripts): This contains all of your TypeScript files, that will be compiled and built into your projects.
-[behavior_packs](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/behavior_packs): This contains resources and JSON files that define your behavior pack.
-[start](https://github.com/microsoft/minecraft-samples/blob/main/addon_starter/1_hello_world): This contains a starter add-on bare-minimum set of files.
-[1_hello_world](https://github.com/microsoft/minecraft-samples/blob/main/addon_starter/1_hello_world): This contains a starter add-on with a basic starter entity.
-[2_entities](https://github.com/microsoft/minecraft-samples/blob/main/addon_starter/2_entities): This contains a starter add-on with a full set of entities.
-[complete](https://github.com/microsoft/minecraft-samples/blob/main/addon_starter/complete): This contains the finished add-on starter example.
23 changes: 9 additions & 14 deletions casual_creator/chill_dreams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ series behind this article.

There are three progressive versions:

* `1_dream_turkey` - Content at the end of Part 1: The Dream Turkey.
* (part 2 coming soon)
* `complete` - The full, completed chill-dreams add-on you will see at the end of Part 3
*[Part 1: Dream Turkey](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/1_dream_turkey/): This contains project files that correspond to [part 1 of the blog series](https://learn.microsoft.com/minecraft/creator/casual/chilldreamspart1thedreamturkey)
*[Part 2: Dreams Come True](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/2_dreams_come_true/): This contains project files that correspond to [part 2 of the blog series](https://learn.microsoft.com/minecraft/creator/casual/chilldreamspart2makingdreamscometrue)
*[Complete](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/complete/): This contains project files that correspond to [part 3 of the blog series](https://learn.microsoft.com/minecraft/creator/casual/chilldreamspart3smellslikememories)

## Prerequisites

Expand All @@ -37,9 +37,10 @@ Visit the [Visual Studio Code website](https://code.visualstudio.com) and instal

## Getting Started

1. Using a copy of this starter project from GitHub - you can get a copy of this project by visiting [https://github.com/microsoft/minecraft-samples/](https://github.com/microsoft/minecraft-scripting-samples/) and, under the Code button, selecting `Download ZIP`.

1. Choose the part you'd like to use (for example, `chill_dreams/complete`) folder contains the full Chill Dreams Add-on for Minecraft.
1. Using a copy of this starter project from GitHub - you can get a copy of this project by visiting [https://github.com/microsoft/minecraft-samples/](https://github.com/microsoft/minecraft-samples/) and, under the Code button, selecting `Download ZIP`.

1. The `casual_creator/chill_dreams` folder contains different stages of the chill dreams project for Minecraft. Use the subfolder of the phase you want to start with.

1. To make your own environment look like the example, create a folder on your `C:\` drive and call it **projects**. Create a subfolder called **myaddon**.

Expand All @@ -57,12 +58,6 @@ Visit the [Visual Studio Code website](https://code.visualstudio.com) and instal
npm i
```
1. When that's done, enter:
```powershell
npm i gulp-cli --global
```
1. Use this shortcut command to open the project in Visual Studio Code:
```powershell
Expand All @@ -77,6 +72,6 @@ Chill Dreams demonstrates several techniques for building a thematic Add-On in M
## Manifest
-[gulpfile.js](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/gulpfile.js): This file contains build instructions for Gulp, for building out TypeScript code.
-[scripts](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/scripts): This contains all of your TypeScript files, that will be compiled and built into your projects.
-[behavior_packs](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/behavior_packs): This contains resources and JSON files that define your behavior pack.
-[1_dream_turkey](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/1_dream_turkey/): This contains project files that correspond to [part 1 of the blog series](https://learn.microsoft.com/minecraft/creator/casual/chilldreamspart1thedreamturkey)
-[2_dreams_come_true](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/2_dreams_come_true/): This contains project files that correspond to [part 2 of the blog series](https://learn.microsoft.com/minecraft/creator/casual/chilldreamspart2makingdreamscometrue)
-[complete](https://github.com/microsoft/minecraft-samples/blob/main/casual_creator/chill_dreams/complete/): This contains project files that correspond to [part 3 of the blog series](https://learn.microsoft.com/en-us/minecraft/creator/casual/chilldreamspart3smellslikememories)
14 changes: 4 additions & 10 deletions culled_block_sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ products:
- minecraft
---

# Minecraft Add-On Starter Project
# Minecraft Block Culling Sample Starter Project

This sample demonstrates a simple build process and TypeScript compilation for Minecraft. This readme shows how you can use Betas APIs experiment to build out simple gameplay styles. You can use this project as a starter for your own scripting projects.
This sample demonstrates new block culling and rendering options for custom blocks.

## Prerequisites

Expand Down Expand Up @@ -44,12 +44,6 @@ Visit the [Visual Studio Code website](https://code.visualstudio.com) and instal
npm i
```

1. When that's done, enter:

```powershell
npm i gulp-cli --global
```

1. Use this shortcut command to open the project in Visual Studio Code:

```powershell
Expand Down Expand Up @@ -78,5 +72,5 @@ This sample demonstrates how to use block culling on the **tuna_roll** custom bl

## Manifest

- [gulpfile.js](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/gulpfile.js): This file contains build instructions for Gulp, for building out TypeScript code.
- [behavior_packs](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/behavior_packs): This contains resources and JSON files that define your behavior pack.
- [culled_block_behavior_pack](https://github.com/microsoft/minecraft-samples/blob/main/culled_block_sample/culled_block_behavior_pack): This contains behaviors for the custom blocks used in this sample.
- [culled_block_resource_pack](https://github.com/microsoft/minecraft-samples/blob/main/culled_block_sample/culled_resource_pack): This contains resources and JSON files -- including block culling - that define a resource pack.
6 changes: 3 additions & 3 deletions custom_blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ This sample demonstrates how you can build incrementally more sophisticated bloc

## Manifest

- [gulpfile.js](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/gulpfile.js): This file contains build instructions for Gulp, for building out TypeScript code.
- [scripts](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/scripts): This contains all of your TypeScript files, that will be compiled and built into your projects.
- [behavior_packs](https://github.com/microsoft/minecraft-scripting-samples/blob/main/ts-starter/behavior_packs): This contains resources and JSON files that define your behavior pack.
- [behavior_packs/custom_blocks](https://github.com/microsoft/minecraft-samples/blob/main/custom_blocks/behavior_packs/custom_blocks): This contains behavior implementations for a set of custom blocks.
- [resource_packs/custom_blocks](https://github.com/microsoft/minecraft-samples/blob/main/custom_blocks/resource_packs/custom_blocks): This contains resources for a set of custom blocks.

41 changes: 41 additions & 0 deletions custom_features/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
page_type: sample
author: mammerla
description: A basic collection of example features and feature rules for Minecraft.
ms.author: [email protected]
ms.date: 10/09/2024
languages:
- typescript
products:
- minecraft
---

# Minecraft Custom Features Project

This sample demonstrates a set of different custom items with different capabilities. Within each subfolder is a behavior pack and a resource pack. These packs can be deployed to Minecraft using NPM.

`basic_orange_ore` - is a very basic "hello world" style feature that will place many geodes full of "orange ore" within a world.
`example_feature_set` - will place a number of different elements within the world. Note that it will place an oversupply of monument elements and apple blocks, so please do not use this within a world.

## Prerequisites

**Install Node.js tools, if you haven't already**

We're going to use the package manager [npm](https://www.npmjs.com/package/npm) to get more tools to make the process of building our project easier.

Visit [https://nodejs.org/](https://nodejs.org).

Download the version with "LTS" next to the number and install it. (LTS stands for Long Term Support, if you're curious.) In the Node.js Windows installer, accept the installation defaults. You do not need to install any additional tools for Native compilation.

**Install Visual Studio Code, if you haven't already**

Visit the [Visual Studio Code website](https://code.visualstudio.com) and install Visual Studio Code.

### Summary

Use `npm run local-deploy` to deploy these features over into Minecraft.

## Manifest

- [basic_orange_ore](https://github.com/microsoft/minecraft-samples/blob/main/custom_features/custom_orange_ore): This contains a simple end to end example of a feature.
- [example_feature_set](https://github.com/microsoft/minecraft-samples/blob/main/custom_features/example_feature_set): A mega pack of many examples of different features and feature rules.
3 changes: 3 additions & 0 deletions custom_features/basic_orange_ore/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PROJECT_NAME="basic_orange_ore"
MINECRAFT_PRODUCT="BedrockUWP"
CUSTOM_DEPLOYMENT_PATH=""
10 changes: 10 additions & 0 deletions custom_features/basic_orange_ore/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 120,
"endOfLine": "auto"
}
7 changes: 7 additions & 0 deletions custom_features/basic_orange_ore/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"blockceptionltd.blockceptionvscodeminecraftbedrockdevelopmentextension",
"mojang-studios.minecraft-debugger"
]
}
15 changes: 15 additions & 0 deletions custom_features/basic_orange_ore/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "minecraft-js",
"request": "attach",
"name": "Debug with Minecraft",
"mode": "listen",
"preLaunchTask": "build",
"sourceMapRoot": "${workspaceFolder}/dist/debug/",
"generatedSourceRoot": "${workspaceFolder}/dist/scripts/",
"port": 19144
}
]
}
160 changes: 160 additions & 0 deletions custom_features/basic_orange_ore/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"git.ignoreLimitWarning": true,
"editor.formatOnSave": true,
//"typescript.preferences.importModuleSpecifierEnding": "js",
//"javascript.preferences.importModuleSpecifierEnding": "js",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.exclude": {
"**/build": true,
"**/toolbuild": true,
"**/out": true,
"**/dist": true,
"**/min-maps": true,
"**/res": true,
"**/node_modules": true,
"**/jsn": true,
"**/web": true,
"**/vsc": true,
"**/app/bin": true,
"**/.vscode-test-web": true
},
"cSpell.words": [
"appsvc",
"appweb",
"asar",
"asyncclose",
"asyncexecute",
"asyncopen",
"asyncreload",
"asyncshow",
"asyncstart",
"attachables",
"autogen",
"autogenerated",
"autoscript",
"babylonjs",
"bigints",
"bpack",
"cand",
"canonicalize",
"carto",
"char",
"Cheevos",
"codepoint",
"Compactable",
"componentized",
"Cooldown",
"dataform",
"dcommand",
"delim",
"denum",
"Doced",
"docfx",
"errorable",
"ERRORHELP",
"exportworld",
"flatpack",
"flav",
"fluentui",
"fortawesome",
"gamemode",
"Gameplay",
"Gamertags",
"gametest",
"glowstone",
"humanify",
"i",
"iaccept",
"iagree",
"id",
"Illager",
"isloaded",
"Jsons",
"jszip",
"jszipo",
"last",
"leasher",
"leveldat",
"localforage",
"mainapp",
"mainhand",
"mcaddon",
"mcdev",
"mcfunction",
"mcpack",
"mcproject",
"mcstructure",
"mct",
"mctools",
"mcworld",
"mult",
"netherite",
"nodebuffer",
"northstar",
"nums",
"octokit",
"oper",
"Packument",
"Passcode",
"passcodes",
"persistable",
"piid",
"portv",
"prefs",
"prid",
"prismarine",
"protogs",
"purpur",
"redownloaded",
"Regs",
"Reloadable",
"relpath",
"repo",
"repos",
"rescan",
"rpack",
"rshift",
"snbt",
"struct",
"structs",
"sugg",
"tbar",
"texturepack",
"threed",
"titlebar",
"toolbuild",
"Travelled",
"tsdoc",
"tslang",
"typestr",
"Vals",
"Varint",
"Webviews",
"worldtest",
"wsevent",
"Xmark",
"xuid"
],
"mochaExplorer.files": "src/test/**/*.ts",
"mochaExplorer.require": "ts-node/register",
"mochaExplorer.nodeArgv": [
"--loader=ts-node/esm",
"--no-warnings=ExperimentalWarning",
"--experimental-specifier-resolution=node"
],
"editor.tabSize": 2
}
Loading

0 comments on commit d9e058b

Please sign in to comment.