Skip to content

Commit

Permalink
Stable testing
Browse files Browse the repository at this point in the history
  • Loading branch information
conmaster2112 committed Dec 26, 2023
1 parent ad86f4e commit ec5714d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"database.d.ts"
],
"dependencies": {
"@minecraft/server": "^1.5.0-beta.1.20.20-preview.20",
"@minecraft/server-ui": "^1.2.0-beta.1.20.20-preview.20"
"@minecraft/server": "^1.9.0-beta.1.20.60-preview.23",
"@minecraft/server-ui": "^1.2.0-beta.1.20.60-preview.23"
}
}
5 changes: 2 additions & 3 deletions packs/BP/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": 2,
"header": {
"name": "Database testing Pack",
"name": "Database Release testing Pack",
"description": "TDatabase testing Pack",
"uuid": "92019559-6abd-4d17-aeda-f7d5a65f7fe0",
"version": "1.2.0-beta",
Expand All @@ -16,8 +16,7 @@
}
],
"dependencies": [
{"module_name": "@minecraft/server","version": "1.6.0-beta"},
{"module_name": "@minecraft/server-ui","version": "1.2.0-beta"}
{"module_name": "@minecraft/server","version": "1.7.0"}
],
"capabilities": ["script_eval"]
}
14 changes: 12 additions & 2 deletions packs/BP/scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SerializableKinds } from "./con-database";
import { system, world } from "@minecraft/server";
import { SerializableKinds, JsonDatabase } from "./con-database";
import { DynamicTable, Serializer } from "./con-database";


Expand Down Expand Up @@ -31,4 +32,13 @@ const table = DynamicTable.OpenCreate("id-of-the-table");
table.set("key-the-test", new MyClassWithMethods("warn-id", "My custom message"));


table.get("key-the-test").warn(); //warn method from MyClasswithMethods
table.get("key-the-test").warn(); //warn method from MyClasswithMethods
const jsDB = new JsonDatabase("the id");
jsDB.set("Lmao","adfasdfsa".repeat(600));
jsDB.set("Some test", {asd:"asdfasdf",asds:{asdfasdfa:"asdfasdf"}});
for (const [k,v] of jsDB) {
console.warn(k,v);
}
jsDB.clear();
DynamicTable.ClearAll();
system.runTimeout(()=>console.warn(world.getDynamicPropertyTotalByteCount()), 3);

0 comments on commit ec5714d

Please sign in to comment.