objd 0.0.4
objd: ^0.0.4 copied to clipboard
objd is a Object Oriented framework for Building Minecraft Datapacks with ease
example/example.dart
import 'package:objd/core.dart';
main() {
createProject(Project(
target: "./example/", name: "example Datapack", generate: mainWidget()));
}
class mainWidget extends Widget {
@override
Widget generate(Context context) {
return Pack(
name: 'example',
main: File(
path: 'main',
child: Summon(
EntityType.armor_stand,
location: Location.rel(x: 0,y:1,z:0),
name: TextComponent("this is my name",color: Color.DarkBlue),
nbt: {"Invisible":1}
),
),
files: [
File(
execute: true,
path: 'test',
child: Execute(
as: Entity.Player(),
at: Entity.Selected(),
encapsulate: false,
children: List.generate(
100,
(i) => SetBlock(
Block.stone,
location: Location.rel(x: 0, y: i + 0.0, z: 0),
),
),
)),
],
);
}
}