docs
This commit is contained in:
1 parent
58436fc022
commit
51db851096
1 file changed
+9
-32
@@ -432,25 +432,20 @@ Synopsis:
|
||||
<pre>
|
||||
script run create_datapack('foo',
|
||||
{
|
||||
'foo' -> {
|
||||
'bar.json' -> {
|
||||
'foo' -> { 'bar.json' -> {
|
||||
'c' -> true,
|
||||
'd' -> false,
|
||||
'e' -> {'foo' -> [1,2,3]},
|
||||
'a' -> 'foobar',
|
||||
'b' -> 5
|
||||
}
|
||||
}
|
||||
} }
|
||||
})
|
||||
</pre>
|
||||
|
||||
Custom dimension example:
|
||||
<pre>
|
||||
script run create_datapack('funky_world', {
|
||||
'data' -> {
|
||||
'minecraft' -> {
|
||||
'dimension' -> {
|
||||
'custom_ow.json' -> {
|
||||
'data' -> { 'minecraft' -> { 'dimension' -> { 'custom_ow.json' -> {
|
||||
'type' -> 'minecraft:the_end',
|
||||
'generator' -> {
|
||||
'biome_source' -> {
|
||||
@@ -461,11 +456,7 @@ script run create_datapack('funky_world', {
|
||||
'seed' -> 0,
|
||||
'settings' -> 'minecraft:nether',
|
||||
'type' -> 'minecraft:noise'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} } } } }
|
||||
});
|
||||
check_hidden_dimensions(); => ['funky_world']
|
||||
</pre>
|
||||
@@ -473,11 +464,7 @@ check_hidden_dimensions(); => ['funky_world']
|
||||
Loot table example:
|
||||
<pre>
|
||||
script run create_datapack('silverfishes_drop_gravel', {
|
||||
'data' -> {
|
||||
'minecraft' -> {
|
||||
'loot_tables' -> {
|
||||
'entities' -> {
|
||||
'silverfish.json' -> {
|
||||
'data' -> { 'minecraft' -> { 'loot_tables' -> { 'entities' -> { 'silverfish.json' -> {
|
||||
'type' -> 'minecraft:entity',
|
||||
'pools' -> [
|
||||
{
|
||||
@@ -493,21 +480,14 @@ script run create_datapack('silverfishes_drop_gravel', {
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} } } } }
|
||||
});
|
||||
</pre>
|
||||
|
||||
Recipe example:
|
||||
<pre>
|
||||
script run create_datapack('craftable_cobwebs', {
|
||||
'data' -> {
|
||||
'scarpet' -> {
|
||||
'recipes' -> {
|
||||
'cobweb.json' -> {
|
||||
'data' -> { 'scarpet' -> { 'recipes' -> { 'cobweb.json' -> {
|
||||
'type' -> 'crafting_shaped',
|
||||
'pattern' -> [
|
||||
'SSS',
|
||||
@@ -523,10 +503,7 @@ script run create_datapack('craftable_cobwebs', {
|
||||
'item' -> 'minecraft:cobweb',
|
||||
'count' -> 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} } } }
|
||||
});
|
||||
</pre>
|
||||
|
||||
@@ -534,7 +511,7 @@ script run create_datapack('craftable_cobwebs', {
|
||||
|
||||
The function reads current datapack settings detecting new dimensions defined by these datapacks that have not yet been added
|
||||
to the list of current dimensions and adds them so that they can be used and accessed right away. It doesn't matter how the
|
||||
datapacks have been added to the game, either with 'create_datapack()' or manually by dropping a datapack file and calling
|
||||
datapacks have been added to the game, either with `create_datapack()` or manually by dropping a datapack file and calling
|
||||
`/datapack enable` on it. Returns the list of valid dimension names / identifiers that has been added in the process.
|
||||
|
||||
Fine print: The function should be
|
||||
|
||||
Reference in new issue
Block a user