Start initializing tables
All checks were successful
Deploy datapack to dev / Build (push) Successful in 7s
All checks were successful
Deploy datapack to dev / Build (push) Successful in 7s
This commit is contained in:
parent
a7b71073bf
commit
31f616e110
@ -6,7 +6,9 @@ function createTable(name) {
|
|||||||
Array.forEach(
|
Array.forEach(
|
||||||
"ferdinland:ferdinland",
|
"ferdinland:ferdinland",
|
||||||
"database.tables.$name.fields",
|
"database.tables.$name.fields",
|
||||||
()=>{tellraw @a {"storage":"ferdinland:ferdinland", "nbt":"database.tables.$name.fields[0]"};}
|
()=>{
|
||||||
|
::database.tables.$name.fields[0]
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ class database {
|
|||||||
@add(this.schema)
|
@add(this.schema)
|
||||||
function tables.myTable() {
|
function tables.myTable() {
|
||||||
::database.tables.myTable.name = "myTable";
|
::database.tables.myTable.name = "myTable";
|
||||||
::database.tables.myTable.fields = ["one", "two"];
|
::database.tables.myTable.fields = [{name: "id", type: "int"}, {name: "testString", type: "string"];
|
||||||
createTable(myTable);
|
createTable(myTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user