Skip to content

Commit

Permalink
feat: add similar behaviour for smelting spirits.
Browse files Browse the repository at this point in the history
  • Loading branch information
dphaldes committed Dec 23, 2024
1 parent a9ed815 commit 3a3a814
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
16 changes: 4 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,10 @@ repositories {
includeGroup "curse.maven"
}
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
maven {
name = "OctoStudios"
url = uri("https://maven.octo-studios.com/releases")
}
mavenCentral()
mavenLocal()
maven {
url "https://dl.cloudsmith.io/public/klikli-dev/mods/maven/"
content {
Expand All @@ -135,19 +126,20 @@ repositories {
name = "TerraformersMC"
url = "https://maven.terraformersmc.com/"
}
mavenCentral()
mavenLocal()

}

dependencies {
implementation "com.hollingsworth.ars_nouveau:ars_nouveau-${mc_version}:${ars_version}"
// implementation "maven.modrinth:occultism:${occultism_version}"
implementation "com.klikli_dev:occultism-1.21.1-neoforge:1.161.0"
implementation "com.klikli_dev:occultism-1.21.1-neoforge:${occultism_version}"
implementation "net.tslat.smartbrainlib:SmartBrainLib-neoforge-1.21.1:${smartbrainlib}"

compileOnly "mezz.jei:jei-1.21-common-api:${jei_version}"
compileOnly "mezz.jei:jei-1.21-neoforge-api:${jei_version}"
localRuntime "mezz.jei:jei-1.21-neoforge:${jei_version}"

localRuntime "maven.modrinth:modonomicon:${modonomicon}"
}

tasks.withType(ProcessResources).configureEach {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ loader_version_range=[4,)
#
ars_version=5.3.6.853
ars_version_range=[5.0,6)
occultism_version=1.21-neoforge-1.136.1
occultism_version_range=[1.21-neoforge-1.136.1,)
occultism_version=1.171.0
occultism_version_range=[1.71.0,)
jei_version=19.5.0.44
smartbrainlib=1.16.1
modonomicon=1.21.1-1.110.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.hollingsworth.arsnouveau.common.block.tile.MobJarTile;
import com.klikli_dev.occultism.common.entity.job.CrusherJob;
import com.klikli_dev.occultism.common.entity.job.SmelterJob;
import com.klikli_dev.occultism.common.entity.spirit.SpiritEntity;
import com.mystchonky.arsocultas.ArsOcultas;
import com.mystchonky.arsocultas.common.mob_jar.SpiritBehaviour;
Expand All @@ -23,8 +24,25 @@ public static void crusherJob(CrusherJob.CrusherJobEvent event) {
event.setResult(remainder);
}
});
}
}
}

@SubscribeEvent
public static void smelterJob(SmelterJob.SmelterJobEvent event) {
var entity = event.getEntity();
var level = event.getEntity().level();
if (entity instanceof SpiritEntity spirit) {
if (level.getBlockEntity(spirit.blockPosition()) instanceof MobJarTile jar) {
jar.dispatchBehavior(behavior -> {
if (behavior instanceof SpiritBehaviour<? extends SpiritEntity> spiritBehaviour) {
var remainder = spiritBehaviour.tryItemNearbyTransfer(jar, level, event.getResult());
event.setResult(remainder);
}
});
}
}
}


}

0 comments on commit 3a3a814

Please sign in to comment.