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

Use follow range to dynamic set freezing distance #18

Open
Minecrafthyr opened this issue Jul 26, 2023 · 2 comments
Open

Use follow range to dynamic set freezing distance #18

Minecrafthyr opened this issue Jul 26, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Minecrafthyr
Copy link

Is your feature request related to a problem? Please describe.
Sometimes, the freezing distance < entity's follow range (Attribute minecraft:follow_range)

Describe the solution you'd like
Use attribute "minecraft:follow_range" to dynamic set freezing distance.

Describe alternatives you've considered
Examples:

execute store sucess score .temp0 nola.data store result score .temp1 nola.data run attribute @s generic.follow_range get
execute if score .temp0 nola.data matches 0 run function ... (*: no attribute, use default freezing distance)
execute if score .temp0 nola.data matches 1 run function ...
scoreboard players add .temp1 nola.data 16 (*: 1s loop may lose some distance)
execute if score .temp1 nola.data matches ..128 run function ... (*: all vanilla mobs' base attribute <100)
execute if score .temp1 nola.data matches 129.. run function ...
execute if score .temp1 nola.data matches ..64 run function ...
execute if score .temp1 nola.data matches 65.. run function ...

"(*:)" or "..." just some description.

Additional context
None.

@Minecrafthyr Minecrafthyr added the enhancement New feature or request label Jul 26, 2023
@2mal3
Copy link
Owner

2mal3 commented Aug 2, 2023

Hi, thanks for your suggestion, I'll see how that can be implemented. Unfortunately, it will make the whole thing a little less efficient, so it will probably have to be a manual switch.

@Minecrafthyr
Copy link
Author

no_ai module for 1.20.2: no_ai.zip

Also, I think check distance at player is more optimized (but target in this module is selected so I can't just modify this module).

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

No branches or pull requests

2 participants