• 8/23/21 4:19 pm
- 2.9k views • 2 today
- save_alt 100 downloads
- Compatibility
- Minecraft 1.17
- to version
- Minecraft 1.18
- Changes include
- Functions
1
This data pack provides a template of a for-loop,
which is implemented for the following example:
-- sulker box at block.pos=(x=0,y=200,z=0)
-- the for loop overide the items inside that shulker box:
---- for every instance of "i" in ["start", "finish"]:
---- a stack of carrots with an amount "i" is placed at slot "i" of that shulker box
the key minecraft features/functions that are used in this for-loop example:
-- '/scoreboard'
-- '/data modify storage'
-- '/data modify block'
-- '/execute store result' (!! underrated !!)
extensive explantions of the template are available inside the code
major limitations:
-- cannot modify(*1) player invertory the same manner:
---- player inventory not changeable via '/data modify' only '/item replace ... Inventory[3]' or 'Hotbar.8' available
---- with caveat that e.g.'Inventory[.]' not indexable by variable "i" in the for loop (or at least not with my current understanding)
(*1) can read and copy data though
to run the example: '/function for:for_a__setup '
then: '/function for:for_a__do'
to uninstall: '/function for:uninstall_for_a'
--- gogoghouha
which is implemented for the following example:
-- sulker box at block.pos=(x=0,y=200,z=0)
-- the for loop overide the items inside that shulker box:
---- for every instance of "i" in ["start", "finish"]:
---- a stack of carrots with an amount "i" is placed at slot "i" of that shulker box
the key minecraft features/functions that are used in this for-loop example:
-- '/scoreboard'
-- '/data modify storage'
-- '/data modify block'
-- '/execute store result' (!! underrated !!)
extensive explantions of the template are available inside the code
major limitations:
-- cannot modify(*1) player invertory the same manner:
---- player inventory not changeable via '/data modify' only '/item replace ... Inventory[3]' or 'Hotbar.8' available
---- with caveat that e.g.'Inventory[.]' not indexable by variable "i" in the for loop (or at least not with my current understanding)
(*1) can read and copy data though
to run the example: '/function for:for_a__setup '
then: '/function for:for_a__do'
to uninstall: '/function for:uninstall_for_a'
--- gogoghouha
More like this
5271043
119


Have something to say?