Hi everyone! I'm trying to create an Ultra-Hardcore Minecraft data pack, where one of the features is mobs can see players from super far away, the thinking is that that way mobs are continuously coming towards the player. However, I have struggled to find a way to do this, I have tried using atributemodifiers "genericFollow range" or whatever, but found that this only affects how far mobs can see players, once they are already agro at the player.
And so i tried the usual method of trying to agro mobs towards a player, I used this command;
execute as @r at @e[type=minecraft:creeper] run summon minecraft:snowball ~ ~2.5 ~ {ownerName:"BluePC1"}
Unfortunately, that didn't work either, I have no idea why. The snowballs were summoned and the mobs took damage, but they didn't become agro toward me.
What is the best way of making mobs see far? Is what I'm trying to do the correct system? If so what am I doing wrong that makes the command not work properly?
/execute as @e[type=spider] at @s run summon minecraft:snowball ~ ~1.5 ~ {owner:{L:<uuid_least_here>,M:<uuid_most_here>}}
to get your UUID most and least:
/data get entity @s UUIDMost
/data get entity @s UUIDLeast
Also, the mobs have to see what they are attacking. The follow range attribute simply modifies the distance the mob will start attacking the player at (if the mob sees the player).
No, but you can store the UUIDMost and UUIDLeast of the nearest player into the snowball via /data:
/data modify entity @e[type=minecraft:snowball,limit=1,sort=nearest] owner.M set from entity @p UUIDMost
/data modify entity @e[type=minecraft:snowball,limit=1,sort=nearest] owner.L set from entity @p UUIDLeast
Hi everyone! I'm trying to create an Ultra-Hardcore Minecraft data pack, where one of the features is mobs can see players from super far away, the thinking is that that way mobs are continuously coming towards the player. However, I have struggled to find a way to do this, I have tried using atributemodifiers "genericFollow range" or whatever, but found that this only affects how far mobs can see players, once they are already agro at the player.
And so i tried the usual method of trying to agro mobs towards a player, I used this command;
Unfortunately, that didn't work either, I have no idea why. The snowballs were summoned and the mobs took damage, but they didn't become agro toward me.
What is the best way of making mobs see far? Is what I'm trying to do the correct system? If so what am I doing wrong that makes the command not work properly?
Thanks for your help,
BluePC1
Snowballs don't have a tag called "ownerName". There is a tag called owner, however, and it accepts a UUIDMost and UUIDLeast (https://minecraft.gamepedia.com/Snowball#Data_values).
Example:
to get your UUID most and least:
Also, the mobs have to see what they are attacking. The follow range attribute simply modifies the distance the mob will start attacking the player at (if the mob sees the player).
Command block engineer // Developer // #TeamTrees
Ok. That shouldn't be a problem. Thanks for your help!
Soz I should have done a bit more research, I just assumed ownerName was a data tag cause it says it is on MCStacker.
Thanks again!
Is there any way of replacing the UUIDL and most with a target selector? Eg: @p
No, but you can store the UUIDMost and UUIDLeast of the nearest player into the snowball via /data:
Command block engineer // Developer // #TeamTrees
Is there a way to make the snowballs only summon on idle zombies??
Idle zombies have this motion: 0.0d,-0.0784000015258789d,0.0d. You can test for those values in the selector like this:
Command block engineer // Developer // #TeamTrees
post can be deleted