Skip to content

Commit d877972

Browse files
committed
Updated to 1.21.4. Fixes #7
1 parent 93d31d5 commit d877972

File tree

6 files changed

+11
-21
lines changed

6 files changed

+11
-21
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ To use the Custom Blocks API simply include it alongside your datapack and ensur
88
### Give Command
99
If your pack includes a custom give command this is what the function should look like with this API:
1010
```mcfunction
11-
give @s dropper[item_name='{"text":"A Name"}',\
11+
give @s dropper[item_name='{"text":"A Name"}',\
1212
lore=['{"text":"A Lore","italic":false,"color":"red"}'],\
1313
custom_model_data=1,\
14-
lock="custom_blocks:block",\
14+
lock={"minecraft:custom_name": "'custom_blocks:block'"},\
1515
custom_data={\
1616
block_properties:{\
1717
Tags:["some_tag_for_this_block"],\
@@ -29,7 +29,7 @@ To set up your custom blocks with this API simple add the custom models to one o
2929

3030
<hr>
3131

32-
<b>Make Sure To Include</b> the lock component and set its value to <b>"custom_blocks:block"</b><br>
32+
<b>Make Sure To Include</b> the lock component and set its value to <b>"'custom_blocks:block'"</b><br>
3333
This tells the API that your block uses this Custom Blocks API system.
3434

3535
Then add your custom block name, an optional lore for the block, and add your custom blocks custom_model_data value.
@@ -40,7 +40,7 @@ For help on how to set these up see the above give command for an example.
4040

4141
## Minimum Minecraft Version
4242

43-
* 1.21
43+
* 1.21.4
4444

4545
## About This Project
4646

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
execute as @a run function custom_blocks:place/set_storage
2-
3-
# Update old lock "CustomBlocks:Block" to "custom_blocks:block"
4-
execute as @a if items entity @s weapon.* #custom_blocks:placers[minecraft:lock="CustomBlocks:Block"] run item modify entity @s weapon.mainhand custom_blocks:update_lock
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Detects Custom Block And Places It
2-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=north]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=north]{Lock:"custom_blocks:block"}
3-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=south]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=south]{Lock:"custom_blocks:block"}
4-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=east]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=east]{Lock:"custom_blocks:block"}
5-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=west]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=west]{Lock:"custom_blocks:block"}
6-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=up]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=up]{Lock:"custom_blocks:block"}
7-
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=down]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=down]{Lock:"custom_blocks:block"}
2+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=north]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=north]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
3+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=south]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=south]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
4+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=east]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=east]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
5+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=west]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=west]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
6+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=up]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=up]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
7+
execute at @a run fill ~5 ~6 ~5 ~-5 ~-4 ~-5 command_block[facing=down]{auto:1b,Command:"function custom_blocks:place/place_block with storage custom_blocks:current_block base_block"} replace #custom_blocks:placers[facing=down]{lock:{components:{"minecraft:custom_name":'"custom_blocks:block"'}}}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
gamerule commandBlockOutput false
22
gamerule logAdminCommands false
33

4-
# Remove old scoreboard objective
5-
# `scoreboard objectives remove cbCalcModel` is now deprecated and will be removed in a future version
6-
scoreboard objectives remove cbCalcModel dummy

data/custom_blocks/item_modifier/update_lock.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

pack.mcmeta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"pack": {
3-
"pack_format": 48,
3+
"pack_format": 61,
44
"description": "Allows you to add new blocks easily"
55
}
66
}

0 commit comments

Comments
 (0)