Skip to content

Commit

Permalink
added malum compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsterner committed Jun 18, 2024
1 parent 072b95a commit d36a754
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ dependencies {
modCompileOnly (compatLibs.bewitchment) { transitive = false }
// modLocalRuntime (compatLibs.bundles.bewitchment) { transitive = false }
// modApi("com.github.Virtuoel:Pehkui:${compatLibs.pehkui}")
modCompileOnly (compatLibs.malum) { transitive = false }
modLocalImplementation (compatLibs.trinkets) {
exclude group: "net.fabricmc"
exclude group: "net.fabricmc.fabric-api"
Expand Down
2 changes: 2 additions & 0 deletions gradle/compat-libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ flk = "1.6.0+kotlin.1.5.0"
golemsGalore = "3328376" # v1.0.0+mc1.17
kano="0.4.1"
libgui = "3.3.5+1.16.5"
malum="5441759"
midnightlib="1.4.1-fabric"
mobz = "3498091"
omegaConfig = "1.2.1-1.18.1"
Expand Down Expand Up @@ -44,6 +45,7 @@ eldritchMobs = { group = "maven.modrinth", name = "eldritch-mobs", version.re
flk = { group = "net.fabricmc", name = "fabric-language-kotlin", version.ref = "flk" }
golemsGalore = { group = "curse.maven", name = "golems-galore-387197", version.ref = "golemsGalore" }
libgui = { group = "io.github.cottonmc", name = "LibGui", version.ref = "libgui" }
malum = { group = "curse.maven", name = "malum-484064", version.ref = "malum"}
midnightlib = { module = "maven.modrinth:midnightlib", version.ref = "midnightlib"}
mobz = { group = "curse.maven", name = "mobz-336554", version.ref = "mobz" }
omegaConfig = { group = "com.github.Draylar.omega-config", name = "omega-config-base", version.ref = "omegaConfig" }
Expand Down
19 changes: 12 additions & 7 deletions src/main/java/ladysnake/requiem/compat/MalumCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,26 @@
*/
package ladysnake.requiem.compat;

import com.sammy.malum.MalumMod;
import com.sammy.malum.common.components.MalumComponents;
import com.sammy.malum.common.components.MalumLivingEntityDataComponent;
import ladysnake.requiem.api.v1.RequiemPlugin;
import ladysnake.requiem.api.v1.annotation.CalledThroughReflection;
import ladysnake.requiem.api.v1.event.requiem.PossessionStartCallback;

import java.util.Optional;

public class MalumCompat implements RequiemPlugin {

@CalledThroughReflection
public static void init() {
/*TODO malum also has a soulless, allow them too
PossessionStartCallback.EVENT.register(Requiem.id("soulless"), (target, possessor, simulate) -> {
if (MalumComponents.MALUM_LIVING_ENTITY_COMPONENT.soulData.soulless) {
return PossessionStartCallback.Result.ALLOW;
}
return PossessionStartCallback.Result.PASS;
PossessionStartCallback.EVENT.register(MalumMod.malumPath("soulless"), (target, possessor, simulate) -> {
Optional<MalumLivingEntityDataComponent> optionalComponent = MalumComponents.MALUM_LIVING_ENTITY_COMPONENT.maybeGet(target);
if (optionalComponent.isPresent() && optionalComponent.get().soulData.soulless) {
return PossessionStartCallback.Result.ALLOW;
}
return PossessionStartCallback.Result.PASS;
});
*/

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static void init() {
load("golemsgalore", GolemsGaloreCompat.class);
// Haema must be loaded before Origins, because vampire data must be stored before the origin gets cleared
load("bewitchment", BewitchmentCompat.class);
load("malum", MalumCompat.class);
load("origins", OriginsCompat.class);
load("snowmercy", SnowMercyCompat.class);
load("the_bumblezone", BumblezoneCompat.class);
Expand Down

0 comments on commit d36a754

Please sign in to comment.