GithubHelp home page GithubHelp logo

thepotatochronicler / objd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stevertus/objd

0.0 0.0 0.0 1.17 MB

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

Home Page: https://objd.stevertus.com

License: BSD 2-Clause "Simplified" License

Dart 99.97% HTML 0.03%

objd's Introduction

objD

Objective Builder Just for Datapacks

objD is an object oriented toolkit for building/generating Datapacks for Minecraft. It uses the Dart programming language and thus integrates into popular editors like Visual Studio Code or IntelliJ.

You are able to write modular Datapacks, get suggestions with linting, auto completion, extensive documentation and syntax highlighting.

No need to remember which parameters commands take, automatic checking of your code and a ton of utility widgets help you to get more efficient creating Datapacks.

Resources

objD has many components. But there are a few things that can accelerate your start.

Installation

You need the Dart SDK for this library. 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.

To get started, it is the easiest to use the objD CLI for generating a sample project, make small changes and let it run with hot reload.

Install it using

dart pub global activate objd_cli

You can then invoke the new command to create your project, follow the instructions:

dart pub global run objd_cli new <project_name>

Go into the created directory cd <project_name> and to install all dependencies run

dart pub get

For further explanations, refer to the Intro Video, where this is presented in depth.

Example

objD is all about nesting, abstracting the sequential nature of commands into so called Widgets and allowing powerful combinations.

For(
  from: 0,
  to: n,
  create: (i) => ArmorStand(
    Location.rel(x: i.toDouble()),
    name: TextComponent("Number $i"),
    nameVisible: true,
    pose: Pose(
      head: [360 * i / n - 180],
    ),
  ),
),

This simple example creates n armor stands(depending on a variable) each with custom names and pose.

Where in vanilla commands you would have to change multiple commands, this approach is flexible and can easily controlled by parameters.

Updating

When updating to a new version, change the version tag of objD in the pubspec.yaml file.

Note: also make sure the dart version requirements match the version requirements of objD. For 0.4.5 onwards, Dart 3.0.0 is required.

name: <project_name>

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  objd: ^0.4.6

dev_dependencies:
  build_runner:
  objd_gen: ^0.0.4

Contributing & Bugs

New and fresh ideas are always welcome and greatly appreciated. Please create a pull requestto organize new additions.

Bugs can be reported using GitHub Issues.

Huge thanks to everyone who participated and made objD a better tool โค.

objd's People

Contributors

stevertus avatar flafydev avatar kadmuffin avatar miniminelp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.