Stardew Fishing

Stardew Fishing

960k Downloads

API: StartMinigameEvent and EndMinigameEvent

Closed this issue ยท 3 comments

commented

I'm the developer of Little Joys, a mod that adds special Fishing Spots (similar to the bubbles in Stardew) among other things.

While our mods mostly fine work together (it needed one Mixin to detect the successful fishing), it would be cleaner if Stardew Fishing could throw an event for:

  • when the minigame starts, so that I can force a treasure chest when the bobber is on a fishing spot instead of just adding the treasure to the regular fishing loot
  • when the minigame ends, so that I can clean up the fishing spot without needing the above Mixin
commented

I was actually already planning to add something similar in the next update! I'm currently working on it, and it should be complete within a couple days. I'll reply to this thread once its out.

commented

What needs to be considered for the API? Is there an authoritative mod somewhere, besides forge, that this should either use or be modeled after?

I don't think forge's ItemFished event is enough, so a total replacement extension point is needed. I think even the loottable that spawns the fishing game should be intercepted:

public void retrieve(ItemStack pStack, CallbackInfoReturnable<Integer> cir, @Local List<ItemStack> items) {

The fish is already spawned at this point before the minigame starts. It should offer more control over the loot parameters.

commented

Alright, 3.0 is now live with StardewMinigameStartedEvent, StardewMinigameEndedEvent, and StardewMinigameModifyRewardsEvent.