Skip to content
synopia edited this page Apr 1, 2011 · 4 revisions

Development Guide

Environment

All you need is Java SDK and Maven. After checking out the source code, type mvn package and your done.

EventBus

The central element in Minecraft Architect is the event bus driven architecture. Instead of using for example the model view controller pattern, there are several event buses. Each event bus is continously processing incoming events on its own thread. Events can be fired or published into an event bus directly or into all event busses using the event dispatcher.

This way, its very simple to realize stable multi threaded applications.

Network

Minecraft Architect is no mod for minecraft (i.e. the minecraft.jar is not touched or even required to run mca). Instead it acts as a man-in-the-middle. You dont connect to your multiplayer server directly, but to mca which then establishs the connection to the actual server. Incoming packets from either the server or the client, are decoded into events and published into the event dispatcher. There are two special event buses (one for server, one for client), that encode incoming events back to packets and send them up.

This way, you can just react on some network events (i.e. the player moves) or even send your own events to the client or the server (i.e. uploading a blueprint into the client).

Google Guice

For dependency injection, Google Guice is used. In combination with the event bus concept, this will lead to a very service oriented code style.

Clone this wiki locally