So I'm working on creating a verity of RPG-like items on a vanilla server. I've put together a simple system based off threads here to have a bow that shoots unique arrows due to it's damage value, and then the arrows summon a bolt of lightning where they land. It works great, but I wanted to be able to modify that for Skeleton - so we could have different types of custom mobs.
However it seems that Skeletons have different damage values for the arrows they shoot, even if they use the same bow I'm using.
So this is the command that tests for the arrow damage value (This is the damage for a level 6 power bow)
scoreboard players set @e[type=Arrow] Thor 1 {damage:5.5}
and here is the spawner I was using to test the skeletons
Any thoughts on the best way to identify arrows shot by skeletons? I tried various values from 2.0 to 7.5 just to see if they got additional damage due to the server being on hard, but I can't seem to identify what makes their arrows different than ones shot by a player. I also tried to use the pickup tag, but it never seemed to properly identify their arrows either.
Arrows fired from skeletons have their damage randomly altered (rather than a straight 5.5, it can be 5.75 or other random modification). Because of this, you cannot detect arrows shot by skeletons based on the damage of the arrow. The "pickup" tag has a tag-type of 'byte', so you'll need to append it with a 'b'. Arrows shot by skeletons will have a value of 0:
/scoreboard players set @e[type=Arrow] OBJECTIVE 1 {pickup:0b}
So I'm working on creating a verity of RPG-like items on a vanilla server. I've put together a simple system based off threads here to have a bow that shoots unique arrows due to it's damage value, and then the arrows summon a bolt of lightning where they land. It works great, but I wanted to be able to modify that for Skeleton - so we could have different types of custom mobs.
However it seems that Skeletons have different damage values for the arrows they shoot, even if they use the same bow I'm using.
So this is the command that tests for the arrow damage value (This is the damage for a level 6 power bow)
scoreboard players set @e[type=Arrow] Thor 1 {damage:5.5}
and here is the spawner I was using to test the skeletons
/setblock ~ ~-2 ~ minecraft:mob_spawner 0 destroy {EntityId:Skeleton,SpawnData:
{Equipment:[{id:261,Count:1,tag:{ench:[{id:48,lvl:6}]}},{id:},{},{id:},{id:}],
SpawnRange:10}}
Any thoughts on the best way to identify arrows shot by skeletons? I tried various values from 2.0 to 7.5 just to see if they got additional damage due to the server being on hard, but I can't seem to identify what makes their arrows different than ones shot by a player. I also tried to use the pickup tag, but it never seemed to properly identify their arrows either.
Arrows fired from skeletons have their damage randomly altered (rather than a straight 5.5, it can be 5.75 or other random modification). Because of this, you cannot detect arrows shot by skeletons based on the damage of the arrow. The "pickup" tag has a tag-type of 'byte', so you'll need to append it with a 'b'. Arrows shot by skeletons will have a value of 0:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Excellent! I forgot that tags required their cast (I tried pickup with 0.0 but forgot about b )
You're amazing.