page_type | author | description | ms.author | ms.date | products | |
---|---|---|---|---|---|---|
sample |
mammerla |
A basic example of using new culled block features within Minecraft 1.20.60 and beyond. |
01/31/2024 |
|
This sample demonstrates new block culling and rendering options for custom blocks.
Install Node.js tools, if you haven't already
We're going to use the package manager npm to get more tools to make the process of building our project easier.
Visit 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 and install Visual Studio Code.
-
To make your own environment look like the example, create a folder on your
C:\
drive and call it projects. Create a subfolder called culled_blocks. -
Put the extracted contents of the culled_block_sample folder into culled_blocks.
-
Open a Windows Terminal or PowerShell window and change the working directory to your culled_blocks folder:
cd c:\projects\culled blocks\
-
Use npm to install our tools:
npm i
-
Use this shortcut command to open the project in Visual Studio Code:
code .
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.
This sample demonstrates how to use block culling on the tuna_roll custom block.
After downloading these add-on packs:
- Insert UUIDs in the manifests.
- Put them in their respective folders in your com.Mojang folder.
- Make a creative Minecraft world.
/give @s demo:tuna_roll
- Place 3 tuna roll blocks.
- Replace the center block with a full-sized block like "acacia planks".
- You will see the geometry of the tuna roll blocks change.
This sample demonstrates how to use block culling on the tuna_roll custom block.
- culled_block_behavior_pack: This contains behaviors for the custom blocks used in this sample.
- culled_block_resource_pack: This contains resources and JSON files -- including block culling - that define a resource pack.