docs
This commit is contained in:
1 parent
58436fc022
commit
51db851096
1 file changed
+9
-32
@@ -432,25 +432,20 @@ Synopsis:
|
|||||||
<pre>
|
<pre>
|
||||||
script run create_datapack('foo',
|
script run create_datapack('foo',
|
||||||
{
|
{
|
||||||
'foo' -> {
|
'foo' -> { 'bar.json' -> {
|
||||||
'bar.json' -> {
|
|
||||||
'c' -> true,
|
'c' -> true,
|
||||||
'd' -> false,
|
'd' -> false,
|
||||||
'e' -> {'foo' -> [1,2,3]},
|
'e' -> {'foo' -> [1,2,3]},
|
||||||
'a' -> 'foobar',
|
'a' -> 'foobar',
|
||||||
'b' -> 5
|
'b' -> 5
|
||||||
}
|
} }
|
||||||
}
|
|
||||||
})
|
})
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Custom dimension example:
|
Custom dimension example:
|
||||||
<pre>
|
<pre>
|
||||||
script run create_datapack('funky_world', {
|
script run create_datapack('funky_world', {
|
||||||
'data' -> {
|
'data' -> { 'minecraft' -> { 'dimension' -> { 'custom_ow.json' -> {
|
||||||
'minecraft' -> {
|
|
||||||
'dimension' -> {
|
|
||||||
'custom_ow.json' -> {
|
|
||||||
'type' -> 'minecraft:the_end',
|
'type' -> 'minecraft:the_end',
|
||||||
'generator' -> {
|
'generator' -> {
|
||||||
'biome_source' -> {
|
'biome_source' -> {
|
||||||
@@ -461,11 +456,7 @@ script run create_datapack('funky_world', {
|
|||||||
'seed' -> 0,
|
'seed' -> 0,
|
||||||
'settings' -> 'minecraft:nether',
|
'settings' -> 'minecraft:nether',
|
||||||
'type' -> 'minecraft:noise'
|
'type' -> 'minecraft:noise'
|
||||||
}
|
} } } } }
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
check_hidden_dimensions(); => ['funky_world']
|
check_hidden_dimensions(); => ['funky_world']
|
||||||
</pre>
|
</pre>
|
||||||
@@ -473,11 +464,7 @@ check_hidden_dimensions(); => ['funky_world']
|
|||||||
Loot table example:
|
Loot table example:
|
||||||
<pre>
|
<pre>
|
||||||
script run create_datapack('silverfishes_drop_gravel', {
|
script run create_datapack('silverfishes_drop_gravel', {
|
||||||
'data' -> {
|
'data' -> { 'minecraft' -> { 'loot_tables' -> { 'entities' -> { 'silverfish.json' -> {
|
||||||
'minecraft' -> {
|
|
||||||
'loot_tables' -> {
|
|
||||||
'entities' -> {
|
|
||||||
'silverfish.json' -> {
|
|
||||||
'type' -> 'minecraft:entity',
|
'type' -> 'minecraft:entity',
|
||||||
'pools' -> [
|
'pools' -> [
|
||||||
{
|
{
|
||||||
@@ -493,21 +480,14 @@ script run create_datapack('silverfishes_drop_gravel', {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
} } } } }
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
Recipe example:
|
Recipe example:
|
||||||
<pre>
|
<pre>
|
||||||
script run create_datapack('craftable_cobwebs', {
|
script run create_datapack('craftable_cobwebs', {
|
||||||
'data' -> {
|
'data' -> { 'scarpet' -> { 'recipes' -> { 'cobweb.json' -> {
|
||||||
'scarpet' -> {
|
|
||||||
'recipes' -> {
|
|
||||||
'cobweb.json' -> {
|
|
||||||
'type' -> 'crafting_shaped',
|
'type' -> 'crafting_shaped',
|
||||||
'pattern' -> [
|
'pattern' -> [
|
||||||
'SSS',
|
'SSS',
|
||||||
@@ -523,10 +503,7 @@ script run create_datapack('craftable_cobwebs', {
|
|||||||
'item' -> 'minecraft:cobweb',
|
'item' -> 'minecraft:cobweb',
|
||||||
'count' -> 1
|
'count' -> 1
|
||||||
}
|
}
|
||||||
}
|
} } } }
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</pre>
|
</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
|
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
|
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.
|
`/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
|
Fine print: The function should be
|
||||||
|
|||||||
Reference in new issue
Block a user