Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: dart pub get
- name: Lint Code
run: dart analyze lib/
- name: Run tests
run: dart run coverage:test_with_coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info
- name: Lint Code
run: dart analyze lib/
3 changes: 2 additions & 1 deletion example/files/load.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class LoadFile extends Widget {
Data.merge(Entity.All(), nbt: {
"uuid": UUID(1, 2, 3, 4),
'name': TextComponent('name'),
})
}),
Bossbar("test").get(BossbarOption.value) + 1
]);
}
}
15 changes: 15 additions & 0 deletions example/score_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:objd/core.dart';

void main(List<String> args) {
var s1 = Score(Entity.All(), "s1");
var s2 = Score.Self('s2');
var t = Bossbar("test").get(BossbarOption.value) + 1;

print(t);
// print(s1 + (s2 + s1));

final (_, ops) = t.copy();
print(ops);
//print(getCommands(For.of(ops)).join('\n'));
print(getCommands(t).join('\n')); //TODO: Caveat s1 + s2 != s2 + s1
}
1 change: 1 addition & 0 deletions folder name/data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"values":["mypack:load"]}
1 change: 1 addition & 0 deletions folder name/data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"values":["mypack:main"]}
3 changes: 3 additions & 0 deletions folder name/data/mypack/functions/load.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scoreboard objectives add objd_temp dummy
data merge entity @a {uuid:[I;1,2,3,4],name:{"text":"name"}}
scoreboard players add #at6AbnE8 objd_temp 1
Empty file.
1 change: 1 addition & 0 deletions folder name/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"pack":{"pack_format":8,"description":"This is a datapack generated with objd by Stevertus"}}
Loading