-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Integration
repositories {
maven("https://jitpack.io")
maven("https://maven.architectury.dev/")
}
dependencies {
implementation("com.github.mess1re.axiomata:${minecraftVersion}-${loader}:${axiomataVersion}")
}minecraftVersion and loader select the matching build; axiomataVersion is the release tag. ForgeGradle projects should pass the coordinate through fg.deobf(...).
Declare both axiomata and Architectury API in the loader metadata.
A complete drawable blueprint needs:
data/<namespace>/blueprints/<id>.json
data/<namespace>/blueprint_outlines/<id>.json
assets/<namespace>/textures/blueprint/<id>.png
See Blueprint Data and Drawing Outlines. Registration code and a blueprint index are not required.
The deployed entity implements UnderConstruction and owns one persistent BuildProgress.
private final BuildProgress buildProgress = BuildProgress.finished();
@Override
public BuildProgress buildProgress() {
return buildProgress;
}Save and load BuildProgress with the entity NBT. Override these hooks only where needed:
| Hook | Purpose |
|---|---|
orientForPlacement(yaw) |
Apply the same authored orientation to preview and result |
onDeployed(yaw) |
Initialize the placed result |
onBuildProgressChanged() |
Synchronize render or gameplay state |
acceptsBlowOnStage(player, section) |
Validate which model section was hit |
While isFullyBuilt() is false, the consuming entity should block its finished gameplay and render only completed/current construction sections.
Server hit bounds are data-pack resources:
data/<namespace>/construction/<model>.json
{
"sections": [
{ "name": "frame", "box": [-16, 0, -16, 16, 24, 16] }
]
}Client render sections are resource-pack assets:
assets/<namespace>/construction/<model>.json
They contain boneCubes counts and named sections mapping bone names to cube indices. Read both through BlueprintConstructionVisuals. Section names must match the blueprint stages.
The Blockbench Tool stores these section assignments in the model. Exporting the two construction resources remains the integrating mod's responsibility.
| API | Use |
|---|---|
BlueprintDefinitions |
Read the synchronized definition catalog |
BlueprintStacks |
Identify or create blueprint/result stacks |
BlueprintPermissions |
Run recipe-use permission checks |
ConstructionDeployer |
Place a blueprint result programmatically |
ConstructionWork |
Apply or undo one unit of work from any Container
|
BlueprintConstructionVisuals |
Read section maps, hit bounds and translated stage names |
axiomata:construction_hammers controls which main-hand items can open a blueprint. Field-construction interaction currently uses Axiomata's construction hammer item; adding an unrelated item to the tag alone does not implement hammer strikes.
Events use Architectury's loader-neutral event API.
| Event | Timing | Can deny |
|---|---|---|
BlueprintEvents.CREATION_CHECK |
Before a traced blueprint is taken | yes, deny()
|
BlueprintEvents.CREATED |
After a traced blueprint is taken | no |
BlueprintEvents.RECIPE_CHECK |
Before a blueprint is used | yes, deny()
|
BlueprintEvents.USED |
After direct crafting or successful placement | no |
BlueprintEvents.RECIPE_CHECK.register(event -> {
if (event.recipeId.startsWith("example:restricted/")) {
event.deny();
}
});USED reports successful blueprint use, not completion of later construction stages.