Skip to content

Commit

Permalink
Updated Info
Browse files Browse the repository at this point in the history
  • Loading branch information
BJTMastermind committed Feb 6, 2024
1 parent 65ea98c commit 51e4d2a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<h1 align="center">Custom Blocks API</h1>

Allows you to create custom blocks in Minecraft Easier with great performance!
Allows you to create custom blocks in Minecraft easier with great performance!

## How To Use
To use the Custom Blocks API simply include it alongside your datapack and ensure to use the following for your custom blocks.

### Give Command
If your pack includes a custom give command this is what the function should look like with this API:
```mcfunction
give @p dropper{display:{Name:'{"text":"A Name","italic":false}',Lore:['{"text":"A Lore","italic":false,"color":"red"}']},CustomModelData:0000001,BlockEntityTag:{Lock:"CustomBlocks:Block"},BlockProperties:{CustomName:'{"text":"Block"}',SetblockCommand:"setblock ~ ~ ~ stone"}}
give @s dropper{display:{Name:'{"text":"A Name","italic":false}',Lore:['{"text":"A Lore","italic":false,"color":"red"}']},CustomModelData:0000001,BlockEntityTag:{Lock:"CustomBlocks:Block"},BlockProperties:{Tags:["some_tag_for_this_block"],BaseBlock:{"value":"stone"}}}
```

To set up your custom blocks with this API simple add the custom models to one of the following blocks with "custom_model_data":

* Dispenser = Your custom block has no rotation.
* Furnace = Your custom block can face in the 4 cardinal directions.
* Dropper = Your custom block can face in all 6 directions. (Requires 3 models)
* Dropper = Your custom block can face in all 6 directions.

<hr>

<b>Make Sure To Include</b> the Lock in the BlockEntityTag and set its value to <b>"CustomBlocks:Block"</b><br>
This tells the API that your block uses this Custom Blocks API system.

Then add your custom block name and an optional lore for the block. Outside the display tag add your custom blocks CustomModelData value, optionally if your block can be placed in all 6 directions make sure your other 2 models for up and down directions have the correct id (Up = Base CustomModelData ID + 1, Down = Base CustomModelData ID + 2).
Then add your custom block name and an optional lore for the block. Outside the display tag add your custom blocks CustomModelData value.

Finally, add any extra information about the block for when it's placed in the "BlockProperties" tag. All the information in this tag will be copied to the Item Display, the "SetblockCommand" in BlockProperties says what you want your base block to be.
Finally, add any extra information about the block for when it's placed in the "BlockProperties" tag. All the information in this tag will be copied to the Item Display, the "BaseBlock" in BlockProperties says what you want your base block to be, the value must be a valid block id.

For help on how to set these up see the above give command for an example.

## Minimum Minecraft Version

* 1.19.4
* 1.20.3

## About This Project

Expand Down

0 comments on commit 51e4d2a

Please sign in to comment.