Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding/Adding to Aquaculture (or other fish mods) loot list not working #1

Closed
SeriousCreeper opened this issue May 5, 2018 · 7 comments
Assignees

Comments

@SeriousCreeper
Copy link

Heya,

just discovered this mod and always wanted something like this, so this is great to see!

Was trying to add/replace loot to other mods such as "Just a few fish" or "Aquaculture", but i don't seem to get it to replace the drops.

I used the example script but changed the item to the vanilla rod, to see if the table even loads properly, and everything seemed fine. Then i inverted the item list to a blacklist, so that any other fishing rod should get those drops, but i still only get the default ones added by Aquaculture (i also tried to add the aquaculture rod to it the items list and remove the blacklist type, no luck):

{
  "rules": [
    {
      "match": {
        "angler": {
          "heldItemMainHand": {
            "type": "BLACKLIST",
            "items": ["minecraft:fishing_rod:*"]
          }
        }
      },
      "drops": [
        {
          "item": {
            "selector": {
              "weight": {
                "value": 1000
              },
              "luckLevelRequired": 1
            },
            "items": [
              "minecraft:diamond"
            ]
          }
        },
        {
          "item": {
            "items": [
              "minecraft:string"
            ]
          }
        }
      ]
    }
  ]
}

Am i misunderstanding how the mod works, or is it currently not able to override/add to existing ones from other mods?

Cheers,
SC

@codetaylor codetaylor self-assigned this May 5, 2018
@codetaylor
Copy link
Owner

It looks like Aquaculture uses it's own code to handle spawning fishing drops and doesn't fire the forge event that Hookt intercepts. I'm not sure there is anything that Hookt can do about this.

https://github.com/TeamMetallurgy/Aquaculture/blob/master/src/main/java/com/teammetallurgy/aquaculture/handlers/EntityCustomFishHook.java#L509

@codetaylor
Copy link
Owner

I couldn't find the source for JAFF, but I assume it does something similar with its rods.

@codetaylor
Copy link
Owner

codetaylor commented May 5, 2018

Hookt does work with other mods, but the other mods need to play by the rules. They must either use the MC provided EntityFishHook or, if they implement their own hook, fire and respect the forge provided ItemFishedEvent.

For example, it works properly with Thermal Foundation's metal fishing rods.

@SeriousCreeper
Copy link
Author

I see, that makes sense! Hm i wonder if there is a mod that adds a few fishing rods without a lot of extra stuff (like Thermal Foundation).

Thanks, will look around!

@codetaylor
Copy link
Owner

I was thinking, what if I added a secondary module to the mod that adds fishing rods? The module could be easily disabled in the config and would include a .json file for adding / editing / removing rod materials.

Is this something that you would find useful?

@SeriousCreeper
Copy link
Author

That would be extremely useful! Are you thinking something similar to how the tools in Artisan Workbench work, adding fishing rods for several materials?

I was just starting to work on a small mod that adds a few fishing rods, and also let's you fish in other liquids (such as lava, starlight from astral sorcery, etc, so i can have specific rods that can fish in lava or so for special items),
But having those fishing rods themselves already would be awesome.

@codetaylor
Copy link
Owner

Yeah, that's exactly what I was thinking. I'll probably just re-use the AW system for the rods in this mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants