|
| 1 | +--- |
| 2 | +page_type: sample |
| 3 | +author: mammerla |
| 4 | +description: A basic progressive example of using custom block features within Minecraft. |
| 5 | +ms.author: mikeam@microsoft.com |
| 6 | +ms.date: 01/31/2024 |
| 7 | +products: |
| 8 | + - minecraft |
| 9 | +--- |
| 10 | + |
| 11 | +# Minecraft Creator Camp Sample Project |
| 12 | + |
| 13 | +This sample demonstrates custom entities, blocks, and worldgen features demonstrated as part of [Creator Camp](https://aka.ms/creatorcamp). |
| 14 | + |
| 15 | +- Custom Entity: Camp Ghost |
| 16 | +- Custom Block: Pile of Leaves |
| 17 | +- Custom Item: Leaf Bag |
| 18 | +- Jigsaw Structures: Tent/Camp Area |
| 19 | +- Features: Tall Camp Trees |
| 20 | + |
| 21 | +## Important! |
| 22 | + |
| 23 | +Because this targets beta versions of Minecraft Scripting APIs (2.0.0), you should use |
| 24 | + |
| 25 | +```powershell |
| 26 | +npm i --legacy-peer-deps |
| 27 | +``` |
| 28 | + |
| 29 | +to install dependencies. |
| 30 | + |
| 31 | +This project will also deploy against the Preview version of Minecraft. |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +**Install Node.js tools, if you haven't already** |
| 36 | + |
| 37 | +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. |
| 38 | + |
| 39 | +Visit [https://nodejs.org/](https://nodejs.org). |
| 40 | + |
| 41 | +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. |
| 42 | + |
| 43 | +**Install Visual Studio Code, if you haven't already** |
| 44 | + |
| 45 | +Visit the [Visual Studio Code website](https://code.visualstudio.com) and install Visual Studio Code. |
| 46 | + |
| 47 | +## Getting Started |
| 48 | + |
| 49 | +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 **custom_blocks**. |
| 50 | + |
| 51 | +1. Put the extracted contents of the custom_blocks folder into **custom_blocks**. |
| 52 | + |
| 53 | +1. Open a Windows Terminal or PowerShell window and change the working directory to your **custom_blocks** folder: |
| 54 | + |
| 55 | + ```powershell |
| 56 | + cd c:\projects\custom_blocks\ |
| 57 | + ``` |
| 58 | + |
| 59 | +1. Use npm to install our tools: |
| 60 | + |
| 61 | + ```powershell |
| 62 | + npm i --legacy-peer-deps |
| 63 | + ``` |
| 64 | + |
| 65 | +1. When that's done, enter: |
| 66 | + |
| 67 | + ```powershell |
| 68 | + npm run local-deploy |
| 69 | + ``` |
| 70 | + |
| 71 | +1. Use this shortcut command to open the project in Visual Studio Code: |
| 72 | + |
| 73 | + ```powershell |
| 74 | + code . |
| 75 | + ``` |
| 76 | + |
| 77 | +It might also ask you to install the Minecraft Debugger and Blockception's Visual Studio Code plugin, which are plugins to Visual Studio Code that can help with Minecraft development. Go ahead and do that, if you haven't already. |
| 78 | + |
| 79 | +### Summary |
| 80 | + |
| 81 | +This sample demonstrates various things you can build together that can be used to create fun camping experiences. See the [Minecraft Creator Channel](https://aka.ms/creatorcamp) for all the fun camping videos that accompany this demo. |
| 82 | + |
| 83 | +## Manifest |
| 84 | + |
| 85 | +- [behavior_packs/creator_camp](https://github.com/microsoft/minecraft-samples/blob/main/creator_camp/behavior_packs/creator_camp): This contains behavior implementations for a set of creator_camp items. |
| 86 | +- [resource_packs/creator_camp](https://github.com/microsoft/minecraft-samples/blob/main/creator_camp/resource_packs/creator_camp): This contains resources for a set of creator_camp items. |
0 commit comments