core library

Classes

Advancement
The advancement gives you a convenient interface to trigger or revoke specific advancements and advancement groups. It implements the advancement command.
Area
AreaEffectCloud
An AreaEffectCloud can be created with the Summon Widget, but there is also a specific Widget with special properties for an AreaEffectCloud.
ArmorStand
AroundLocation
Attribute
The Attribute Widget adds certain abilities to an entity. This Widget gives you a varienty of methods to modify speed, attack damage, health and more.
Attributes
AttributeType
Biome
Biomes
A List of all Minecraft biomes
Block
Blocks
BookPage
Bossbar
Builder
The Builder Widget embeds a builder function in your Widget Tree. Here you can provide a similar method to the generate method of a Widget. This allows you to define new variables, make calculations and conditions.
Byte
Datatype Byte
Clear
The Clear Widget removes Items from the inventory of an specified Entity.
ClickEvent
The ClickEvent Module uses the trigger of a carrot on a stick to register right clicks with a scoreboard and execute a onClick Widget.
Clone
Color
See all available colors: https://minecraft.gamepedia.com/Formatting_codes#Color_codes
Command
CommandBuilder
CommandList<T>
Comment
Condition
The Condition class defines conditions for the if widget and more. It can also combines conditions and generates an argument list.
Context
Maybe you already wondered what this context argument here is.
CustomValue
Damage
Data
DataModify
There are five sub operations again: set, merge, prepend, append and insert.
DataStorage
Dimension
Display
Spawns an diplay entity used to display and animate text, items and blocks in the world, having the following common fields.
Do
This Loop repeats a set of widget as long/until a condition is/becomes true. The Loop uses a Grouped File and Recursion to repeat commands.
Double
Datatype Double
Effect
Enchant
The Enchant Widget gives the currently holding item of a target an enchantment
Entities
Entity
EntityClass
EntityType
There is an EntityType for every type_id in minecraft with Entities.[type_id]
Execute
The execute command has multiple syntaxes that allow to manipulate the position, executer or condition.
Extend
File
Fill
Fill acts similar to setblock, but fills a whole area instead.
FillBiome
Fill acts similar to setblock, but fills a whole area instead.
Float
Datatype Float
Folder
The Folder Widget gives you a way to place all following files inside a specific folder path.
For
ForEach
The ForEach Loop repeats a set of commands for each value in a Score. Therefore a file is called recursively and a counter score is increased.
Func
Writing Minecrafts functions annotations becomes really easy. Just annotate a Widget variable that should be inside of your function with @Func():
Give
Group
Gson
GsonDecoder
The Gson Decoder class recreates the content from a gson string
GsonEncoder
GsonParsable
A parsable object for the GsonDecoder to use
GsonValue
Hologram
A Hologram shows a floating text at a specific Location using Armorstands.
If
IndexedFile
The IndexedFile behaves similar to File. Additionally it makes sure that each File, created with IndexedFile, is unique and does not get overwritten.
Integer
Datatype Integer
Interaction
Spawns an interaction entity. Can be used to detect player left/right clicks efficiently.
Item
The Item class represents an item in an inventory in Minecraft. It is used in the Give or Nbt Commands.
Items
JsonFile
Kill
Kills an Entity. It defaults to Entity.Self.
Location
This translates into Minecraft Coordinates.
Log
The log widgets displays a console logging in the players chat.
Long
Datatype Long
Marker
Added in Minecraft 1.17 this entity only exists serversides and thus has no performance constraints for the client.
Module
A Module extends the functionality of a Widget. It allows deeper intregration and file generation.
NumberValue
Pack
Parsable
Particle
The particle command spawns particles in the world to enhance certain graphics.
Particles
ParticleType
PassTrait<T>
The PassTrait Functionality allows you to pass data down your widget tree without struggles.
Path
Pck
The @Pck() annotation works similar to @Func. You annotate a File List variable and it generates a Widget for this Pack.
PlayerJoin
Allows you to specify what should happen if a player joins. This can be triggered every time or just once with PlayerJoin.inital
Pose
An armorstand Pose describing rotations of all body parts
Predicate
Prj
This can automatically generate a main function with all necessary pieces to actually generate all packs and files.
Project
RandomScore
The RandomScore Widget assigns a random value to a score using the UUID of an AreaEffectCloud.
Range
RawFile
The RawFile Widget enables you to generate your own Files right in the Widget tree. Here you can define your own file extension, the file path and the content.
Raycast
The Raycast Widget is one of the most powerful widgets by giving you many options to configure raytracing in Minecraft. Internally it uses local coordinates, a distance counter and recursion.
Recipe
A basic recipe takes in ingredient Items with the slot and a result Item.
Repeat
The Repeat Widget repeats a given action multiple times with a tick delay.
ReplaceItem
RestAction
RestActionAble
RestActionBuilder
Return
Simple return command with integer return value
Ride
Rotation
Say
Schedule
Score
Scoreboard
ScoreTimerModule
The ScoreTimerModule implements a continuous timer with a delay of a number of ticks. It therefore uses a Score to count up or down in steps and resets to the start value afterwards.
Selector
ServerVersionCheck
checks the server version (e.g. 1.14) - increments, such as 1.14.1, aren't and can't be detected
SetBlock
SetGamemode
Sets a players gamemode(either Gamemode.creative, Gamemode.adventure, Gamemode.survival or Gamemode.spectator) to an optional target.
Short
Datatype Short
Slot
The Slot object gives you certain utils to manipulate Inventories and Containers with the Item, Replaceitem or Data.
Spawnpoint
The Spawnpoint Widget sets a players spawnpoint to the current or specified position
Spectate
Puts a spectator(@s) into an entity.
SpreadPlayers
Storage
/ The Storage Widget gives you easy tools to store and receive nbt data globally.
StraitWidget
A StraitWidget allows you to build up a List of Widgets inside of a Widget. Like the Builder, you have to provide a Function, which takes in a List and then you can add on to this list.
Summon
Tag
Team
Teleport
Tellraw
TextClickEvent
Fires on left click, Part of TextComponent.
TextComponent
TextHoverEvent
Fires on mouse over, Part of TextComponent.
Time
Object that represents time in minecraft. Usually translated into ticks (20ticks = 1 second). A more intuitive way is to use built in getters on the num type and operators.
Timeout
Timer
Title
Tp
Transformation
Trigger
UUID
VersionCheck
Checks whether the player updated or downdated your datapack.
Widget
A widget is the base element for basically everything in objD.
WidgetAnnotation
Writing a Widget becomes much simpler with the @WidgetAnnotation() annotation. You can just give it a function with needed parameters which returns a new Widget and the generators will figure out a Widget class to go along with it.

Extensions

NumTimeExtensions on num

Constants

inf → const int
Wdg → const WidgetAnnotation
Writing a Widget becomes much simpler with the @Wdg annotation. You can just give it a function with needed parameters which returns a new Widget and the generators will figure out a Widget class to go along with it.

Properties

gson Gson
use gson.encode to encode gson and gson.decode to decode gson
no setter

Functions

createProject(Project prj, [List<String> args = const []]) Future<void>
builds a project and generates the files. Should be placed in the main method.
getAllFiles(Project prj, [List<String> args = const []]) Map<String, String>
getAllFiles accepts, just like createProject, your Project and optionally arguments. It then generates the widget tree and builds the files, but instead of saving them to your machine, returns them as a Dart Map(filename-content).
getArchive(Map<String, String> files) → Archive
When you want to save it as any other Archive or want to implement own generation, you can get the Archive instance with all files added by calling getArchive with the files Map. Read the documentation of the archive package to see what you are able to do: https://pub.dev/documentation/archive
getCommands(Widget w, {Context? context}) List<String>
Gets all commands generated by one Widget, preferably just used with wrapper Widgets Caution with all Widgets providing not only command functionality, like File, Pack, Execute, If and more
getJsonMap(Project prj, [List<String> args = const []]) Map
This function gets a json representation(Map) of the tree structure before generating the files. This is the same that is used as the objd.json output in debug mode.
gsonDecode(String str) → dynamic
Decode gson
gsonEncode(dynamic obj) String
Encode gson
HideFlags({bool enchantments = false, bool attributes = false, bool unbreakable = false, bool canDestroy = false, bool canPlaceOn = false, bool others = false, bool dye = false, bool armorTrims = false}) int
HideFlags method. It translates the human readable boolean values into an int.
saveAsZip(Map<String, String> files, String path) → void
Saves or downloads(depending on platform) the project as a zip archive. Accepts a file Map(filename-content), most likely from getAllFiles, and a path to save to(must include filename + .zip extension)

Typedefs

BuilderFunction = Widget Function(Context)
a Function that takes in the context and returns a Widget.
Vec3 = (double, double, double)