Skip to content

For Developers

fj_goncalves edited this page Sep 10, 2026 · 1 revision

For Developers

Building from source

Requires JDK 21.

git clone https://github.com/Ribeiro-73/occultism-jars
cd occultism-jars
./gradlew build

The jar lands in build/libs/occultismjars-<version>.jar.

Occultism and JEI are compileOnly and pulled from mavens automatically:

  • Occultism → Modrinth maven (maven.modrinth:occultism:<version>)
  • JEI → BlameJared maven (mezz.jei:jei-1.21.1-neoforge:<version>)

so no manual jar dropping is needed to compile. Versions are pinned in gradle.properties (occultism_version, jei_version).

Running in dev

./gradlew runClient

Occultism and its dependencies (Modonomicon, SmartBrainLib, …) need to be in run/client/mods/ for the addon to actually load at runtime.

The stored spirit

The trapped spirit is a single data component:

  • occultismjars:contained_crusher — a CompoundTag, persistent + network synchronised.

Shape:

{
  tier: int,            // 1..4, from the spirit species
  entity: string,       // "occultism:foliot" etc.
  data: { ... },        // full entity save tag
  heldItem: { ... }     // optional, only right after capture; the in-progress item
}

On the block entity: collectImplicitComponents writes it out when the jar is broken/pick-blocked; applyImplicitComponents reads it back on place and moves heldItem into the input slot. The block loot table copies the component with minecraft:copy_components (source: "block_entity").

Block entity

CrusherJarBlockEntity — 3-slot ItemStackHandler (0 = input, 1–2 = output), plus an AutomationView IItemHandler that filters inserts to valid crushing inputs and blocks extraction from the input slot. Server-ticks only.

Speed/output come from Occultism.SERVER_CONFIG.spiritJobs.crusher{Foliot,Djinni, Afrit,Marid} — the same TierSpiritSettings a real CrusherJob uses — times Config.JAR_TIME_MULTIPLIER. Recipe lookup is OccultismRecipes.CRUSHING_TYPE with a TieredSingleRecipeInput.

Menu

CrusherJarMenu follows the furnace pattern: a 2-wide ContainerData (progress, maxProgress) synced with addDataSlots. The client constructor resolves the block entity from a BlockPos written into the opening packet.

Overriding

  • Recipesdata/occultismjars/recipe/*.json, plain shaped crafting.
  • Models / texturesassets/occultismjars/…. The block model is block/crusher_jar; the blade is a 3D item model.
  • Langassets/occultismjars/lang/{en_us,pt_br}.json.

Issues / PRs

https://github.com/Ribeiro-73/occultism-jars/issues

Clone this wiki locally