Loadable Content - Timmeey86/Mindustry GitHub Wiki

Table of Contents

Note: The package root io.anuke.mindustry is omitted in all of the diagrams on this page.

Loadable Content Overview

Mindustry groups things like weapon, block or unit configuration through (anonymous) single instance subclasses of io.anuke.mindustry.game.Content or its descendants. They are all loaded through a generic mechanism at the start of the client or server, which provides the following benefits:

  • Very low CPU usage (compared to multiple allocations per block and unit ingame)
  • Very low memory usage.
  • Different weapon types etc can be defined and accessed through a common interface.

Values which may differ between multiple in-game instances are managed through Entities, which will be described in a separate page.

The following Content subclasses are available. Due to the huge amount of Block subclasses, several separate diagrams were made for them.
It is important to understand that the classes here do not directly correspond to the types of content ingame, but rather define the static properties of one or more similar ingame types. For example, the ingame Conduit and Pulse Conduit are instances of anonymous subtypes of the Conduit class.

Composition of 'Content' class and subclasses

Up

Block Overview

This diagram lists only the Block subtypes which are directly in the io.anuke.mindustry.world.blocks namespace. Further descendants follow in the diagrams below. Up

Defensive Blocks

Up

Unit Blocks

Up

Production Blocks

Up

Distribution Blocks

Up

Storage Blocks

Up

Power Blocks

Up

⚠️ **GitHub.com Fallback** ⚠️