From 237f28fbdd9280fc3aff94c3998e77332213c213 Mon Sep 17 00:00:00 2001 From: ZXMushroom63 Date: Wed, 11 Dec 2024 16:07:44 +0800 Subject: [PATCH] Fix issues in custom block tutorial --- docs/tutorials/custom_block.md | 10 +++++----- examplemods/Tutorial_Custom_Block.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/custom_block.md b/docs/tutorials/custom_block.md index 6048efa..46784f6 100644 --- a/docs/tutorials/custom_block.md +++ b/docs/tutorials/custom_block.md @@ -1,6 +1,6 @@ -## Custom Blocks Tutorial With ModAPI +## Custom Block Tutorial With ModAPI This tutorial will show you how to make custom blocks with ModAPI. It will use my AsyncSink library to load the resources for the block. -This tutorial will be making a block with the durability of dirt that explodes when broken. +We'll be making a block with the durability of dirt that explodes when broken. As always, we'll start with the default boilerplate starter code: ```javascript @@ -8,7 +8,7 @@ As always, we'll start with the default boilerplate starter code: ModAPI.meta.title("Custom Block Demo"); ModAPI.meta.version("v1.0"); ModAPI.meta.description("Adds a block that blows up when used."); - ModAPI.meta.credits("By ZXMushroom63"); + ModAPI.meta.credits("By "); })(); ``` Let's get our blocks texture done ahead of time. @@ -20,7 +20,7 @@ Store this at the beginning of the function using a constant. Also use that cons ModAPI.meta.title("Custom Block Demo"); ModAPI.meta.version("v1.0"); ModAPI.meta.description("Adds a block that blows up when used."); - ModAPI.meta.credits("By ZXMushroom63"); + ModAPI.meta.credits("By "); ModAPI.meta.icon(texture); })(); @@ -188,7 +188,7 @@ When it's loaded, we'll: }); AsyncSink.L10N.set("tile.custom_block.name", "My Custom Block"); //Set the name of the block - //Required boilerplate for block and item models. + //Make an in-memory resource pack for the block. This is standard between, EaglerForge, Forge, Fabric, and NeoForge (pretty much any modding API) AsyncSink.setFile("resourcepacks/AsyncSinkLib/assets/minecraft/models/block/custom_block.json", JSON.stringify( { "parent": "block/cube_all", diff --git a/examplemods/Tutorial_Custom_Block.js b/examplemods/Tutorial_Custom_Block.js index ff62438..14b4164 100644 --- a/examplemods/Tutorial_Custom_Block.js +++ b/examplemods/Tutorial_Custom_Block.js @@ -3,7 +3,7 @@ ModAPI.meta.title("Custom Block Demo"); ModAPI.meta.version("v1.0"); ModAPI.meta.description("Adds a block that blows up when used."); - ModAPI.meta.credits("By ZXMushroom63"); + ModAPI.meta.credits("By "); ModAPI.meta.icon(texture);