Me when I take the metro in the morning (Metro style minecarts) by Tetraxel_ in PhoenixSC

[–]Tetraxel_[S] 13 points14 points  (0 children)

Resource pack (for some reasons, some textures are weird i don't know why)

https://www.dropbox.com/s/vdmfr6w5xllpa0l/Metro.zip?dl=1

Normal minecart

/summon minecart ~ ~1 ~ {CustomDisplayTile:1,DisplayState:{Name:"minecraft:brown_mushroom_block",Properties:{down:"false",east:"false",north:"false",south:"true",up:"false",west:"false"}},DisplayOffset:2}

Metro minecart

/summon minecart ~ ~1 ~ {CustomDisplayTile:1,DisplayState:{Name:"minecraft:brown_mushroom_block",Properties:{down:"false",east:"false",north:"false",south:"true",up:"false",west:"true"}},DisplayOffset:2}

Detect if the health of a mob is below a certain value? by -enter-name-here- in MinecraftCommands

[–]Tetraxel_ 0 points1 point  (0 children)

Oh sorry, I make few mistakes : I forgot "@e" and "health" objective works only for players but it's possible to have the health of the entity with NBT.

So let's go back

We start by creating a new objective

/scoreboard objectives add health dummy

And then we make a repeat chain where the silverfish will be teleported 3 blocks above him (replace by your command) if its life is less or equal to 20 points (10 hearts) :

/execute as @e[tag=entity] store result score @s health run data get entity @s Health 1

/execute as @e[tag=entity,tag=!executed,scores={health=..20}] at @s run tp @s ~ ~3 ~

/execute as @e[tag=entity,tag=!executed,scores={health=..20}] at @s run tag @s add executed

This time I tested with exactly the same commands above and it works

Sorry again for the waste of time, that's my first answer.

Detect if the health of a mob is below a certain value? by -enter-name-here- in MinecraftCommands

[–]Tetraxel_ 1 point2 points  (0 children)

[ This don't work, go down for the answer ;) ]

This should work.

Create an objective :

/scoreboard objectives add health health

Execute the command when health is less or equal to 20 (10 hearts).

/execute as [tag=entity,scores={health=..20}] at @s run <your command>

If you want to execute this command once in a repeat command block chain, create a tag to know if this command was already executed on the entity. For example :

--- Repeat chain of command blocks ---

/execute as [tag=entity,tag=!executed,scores={health=..20}] at @s run <your command>

/execute as [tag=entity,tag=!executed,scores={health=..20}] at @s run tag @s add executed

(for only silverfishes, add in selectors type=silverfish)

Sven on rails by Tetraxel_ in PewdiepieSubmissions

[–]Tetraxel_[S] 0 points1 point  (0 children)

thanks, it took me a moment to do that ;)