Water Storage Talent idea and implemenetation
DashieDev opened this issue ยท 1 comments
Feature Description:
Notice the dog fur, it is very good at absorbing water :) I got the idea from their fur, for a new talent, the Water Storage Talent.
It is a talent which let you give water to your dog and he will store it, and when you or your other dogs are on fire, he will run towards you or that dog and attempt to put the fire out. This is helpfull especially when your other dogs are on fire while low on health and you cannot reach your bucket in time, and there is no water nearby
My current implementation:
So far i have created a fully working demo (it still in the dev stage so it is not yet ready for the mainstream cause some testing is required and the huge amount of logging), which works this way :
There is a water counter, each success extinguish attempt will cost some amount. To re -fill it up, the dog must be either in rain or in water, if they are, then the water storage will slowly fill up.
When the water counter is at an amount which let the dog do at least one more success extinguish attempt, the dog actively search for targets within the SEARCH_RADIUS which satisfy this condition :
Entity e -> (e is owner || e is dog of the same owner) && e is on fire && e is not in lava
if there target is within the EFFECT_RADIUS then the dog will lauch the water which will extinguish all of the targets and put out any fire block in each target surrounding 3x1x3 platform.
Afterwards the dog will find the nearest targets out of the remaining ones and set it as the follow target and chase it.
There is a cooldown for each extinguish attempt, after each water launch, there is a cooldown time where the dog cannot extinguish anything.
The cooldown time is cakculated according to the level
In each extinguish attempt, the target on fire time is set to itselft times a decrease factor, which also choose according to the level.
Currently it also works in the nether, (i think it would be very helpful) , but am still thinking if it should be.
How do you think? If ok then i will finish the code to the final stage and pr.
Clips :
Water Storage Dog extinguishing his owner
2021-11-22.23-41-50_Trim.mp4
Water Storage Dog extinguishing another dog of the same owner
2021-11-22.23-39-57_Trim_Trim.mp4
Relation to any Known/Unknown Bug:
Additional Information:
Hey, thanks for taking the time to create this issue and I'm sorry I didn't get round to resolving it. I've not worked on this project for a while and have decided to archive the git repository. Fear not, there is a fork https://github.com/DashieDev/DoggyTalentsNext which might be of interest. I don't expect to be back within the Minecraft community so farewell and happy mining!