package example;

import forgottentowns.mod.api.GameMod;
import forgottentowns.mod.api.ModContext;
import forgottentowns.mod.api.ParticleShape;
import forgottentowns.mod.api.ParticleShape.Point;
import java.util.List;

/** Replace this entrypoint with your own deterministic registrations. */
public final class StarterMod implements GameMod {
    /** Constructs the mod entrypoint. */
    public StarterMod() {}

    /**
     * Registers reusable hooks referenced by the example JSON definitions.
     * @param context startup registrations for the my_mod namespace
     */
    @Override public void register(ModContext context) {
        context.registerEquipmentTransform("my_mod:extract",
                (input, percentile) -> percentile.getAsInt() < input.successPercent());
        context.registerParticleShape("my_mod:diamond", new ParticleShape(List.of(
                new Point(1, 0), new Point(0, 0.5), new Point(-1, 0), new Point(0, -0.5))));
    }
}
