Farmer's Delight

Farmer's Delight

97M Downloads

[1.16.5] Dog food is useless if Doggy Talents is also installed

Fisk24 opened this issue ยท 9 comments

commented

Description
Because the doggytalents:dog is a different entity then minecraft:wolf, dog food is not usable on them.

Steps to reproduce:
Have both Famrers Delight and Doggy Talents installed.
Obtain Dog Food item.
Obtain Doggy Talents tamed Dog.
Attempt to feed Dog Food item to Doggy Talents Dog by right clicking Dog Food Item while looking at dog

Expected behavior:
The advertised potion effects of Dog Food should have been applied to my dog

Logs
Im sure they wont be applicable.
Based on my interpretation of the source code the dog food item looks specifically for the vanilla wolf.

Mod list:
forge-1.16.5-36.0.42-client.jar
FarmersDelight-1.16.3-0.3.2.jar
DoggyTalents-1.16.4-2.0.1.3.jar

I would suggest that a configuration option be added for each of the mob specific foods, wherein you can specify a list of mobs that the food items effect.

something like:

DogFoodEffectedMobs: {
minecraft:wolf
doggytalents:dog
}

commented

I cannot do this on Aternos, is there any way to do it? It's not in the config file, so I cannot edit it on Aternos.

commented

You need to add doggytalents:dog to the dog_food_users tag, using datapacks. Those can be added to the server's world folder, if you have access to it.

commented

Ahhh nice! Glad to know it sorted out! ๐Ÿ˜„

commented

Hey @vectorwing, sorry to bother you but in 1.18.2 the dog_food_users tag doesn't seem to be working for me. Here's my KubeJS script:

// Add Doggy Talents dogs to FD Dog Food
onEvent('entity_type.tags', event => {
  event.add("farmersdelight:dog_food_users", "doggytalents:dog");
})

This runs in server_scripts. Does it need to be in startup or something? It isn't just a Doggy Talents problem because I tried minecraft:pig and that didn't work either. It's possible there's something unforeseen wrong with my script, but at the KubeJS discord they said my script was correct.

commented

Hmm... I'm unfamiliar with KubeJS scripts, but if they said it's correct, it should be tagged.

My guess is that the Doggy Talents dog might not have a isTamed field, since the mob is inherently tamed when it's created. Dog Food verified if the wolf is tamed before allowing you to feed it. I can take a look at a workaround to bypass taming requirements later.

commented

Thank you, I really appreciate it. Is there a way I can double-check that the tag was added in the meantime, to ensure my script is working?

commented

Hey @vectorwing sorry to waste your time, but I did some additional testing and it seems I was given incorrect advice in the KubeJS discord. It's all working now. For anyone wishing to add dogs the the dog_food_users in 1.18.2, here's the working KubeJS script:

// Add Doggy Talents dogs to FD Dog Food
onEvent('tags.entity_types', event => {
  event.add("farmersdelight:dog_food_users", "doggytalents:dog");
})
commented

Hmm... Perhaps Doggy Talents never actually inherits from the WolfEntity class, but instead overriding them with its own entirely. Maybe I might have to add some form of tag/config support after all. Will test it this week.

commented

As of PR #231, Dog Food and Horse Feed now check for tags to determine which entities can be fed with them. This allows the doggytalents:dog to be added to it, but it isn't added by default (since DT already has a balanced system for leveling up dog stats).

Should be up in the next version! ๐Ÿ‘