objd 0.0.1 objd: ^0.0.1 copied to clipboard
objd is a Object Oriented framework for Building Minecraft Datapacks with ease
import 'package:objd/core.dart';
main() {
createProject(Project(target:"./examples/",name: "example Datapack", generate: mainWidget()));
}
class mainWidget extends Widget {
@override
Widget generate(Context context) {
return Pack(
name: 'example',
main: File(
path: 'main',
child: Command('say test' + context.packId),
),
files: [
File(
execute: true,
path: 'test',
child: Execute(
as: Entity.Player(),
at: Entity.Selected(),
encapsulate: false,
children: List.generate(100, (i) => Command('/say ' + i.toString())),
)),
],
);
}
}