Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Add runTriState
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini committed May 5, 2024
1 parent 0339325 commit 0693e6b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import me.melontini.commander.api.event.Subscription;
import me.melontini.commander.impl.event.data.types.EventTypes;
import me.melontini.dark_matter.api.base.util.MakeSure;
import net.fabricmc.fabric.api.util.TriState;
import net.minecraft.loot.context.LootContext;
import net.minecraft.util.ActionResult;
import net.minecraft.world.World;
Expand Down Expand Up @@ -72,4 +73,8 @@ public static <T extends Enum<T>> T runEnum(EventType type, @Nullable T def, Wor
public static ActionResult runActionResult(EventType type, World world, Supplier<LootContext> supplier) {
return runEnum(type, ActionResult.PASS, world, supplier);
}

public static TriState runTriState(EventType type, World world, Supplier<LootContext> supplier) {
return runEnum(type, TriState.DEFAULT, world, supplier);
}
}

0 comments on commit 0693e6b

Please sign in to comment.