objd 0.2.0
objd: ^0.2.0 copied to clipboard


objd is a Object Oriented framework for Building Minecraft Datapacks with ease

objD #

Objective Builder Just for Datapacks #

objD is a framework for developing Datapacks for Minecraft. It uses the Dart programming language.

Why a framework? #

A framework is a set of utilities to reduce the amount of repetitive work. I've tried many ways in the past to achieve a quick and easy way to generate Datapacks for Minecraft: A own programming language mcscript, several graphical online generators at stevertus.com or premade utilities.

Instead of developing a language, why not using the tools and parser an other language gives you? By building a custom frame around it you get the reliability and the extensive debugging tools in Editors.

The generation of Datapacks is easy,fast and aims to be less repetitive and modular by utilizing the concept of Widgets as one of the main features.

Installation #


You need the Dart SDK for this framework. Download and install it from https://www.dartlang.org/tools/sdk

I would also recommend Visual Studio Code along with the dart plugin to edit dart files very conveniently.

Make a new folder that will house your project wherever you want(I would recommend datapacks folder).

And inside of that create a file named pubspec.yaml and another folder called lib.

Open the pubspec.yaml file and add

   objd: ^0.2.0

And run

$  pub get

with the console in the new folder(VS code does this automatically)

Getting started #

Let's get started and create our first dart file with lib/main.dart file.

Then we import the framework with:

import 'package:objd/core.dart';

Then we need to create a new datapack project:

void main(List<String> args){
			name:"This is going to be the generated folder name",
			target:"./", // path for where to generate the project
			generate: CustomWidget() // The starting point of generation

Next of we need to build this custom Widget:

class CustomWidget extends Widget {
	Widget generate(Context context){

To get more details on why we build it like that, check out the Widget documentation.

Like we can see the generate method, which is called on build, has to return another Widget, in our case an instance of the Pack class.

Widget generate(Context context){
	return Pack(
		main: File( // optional
			path: 'main'

What we are doing right now is to generate a new subpack with a name(This will be the namespace of your functions later) and a main file(runs every tick) with the name "main.mcfunction".

You can run the project already and the result should be a pack with an empty main.mcfunction file.

So lets add some functionality to our project in our main file. We can use the Log Widget to display a message to the player.

main: File(
	path: 'main',
	child: Log('Hello World')

But how to add a list of Actions then? Well there's also an Widget for that: For.of

child: For.of(List<Widget>[
	Log('Hello World'),
	Command('setblock 0 0 0 air')

So now we have a List of Widget, so we can use as many as we want

Documentation and Examples #

The example folder contains a boilerplate to start off.

There are many more widgets for objD including basic Widgeds, Command Wrappers, Text and Util Widgets. So check out the documentation at https://stevertus.com/objD/documentation or my youtube channel https://www.youtube.com/stevertus. In this video playlist are all objD related videos: https://www.youtube.com/playlist?list=PL5AxRIlgrL5GnKz69w4AUyqpZC35BlxdD

pub points



objd is a Object Oriented framework for Building Minecraft Datapacks with ease

Repository (GitHub)
View/report issues




unknown (LICENSE)


colorize, meta, path, watcher


Packages that depend on objd