Oh, okay
- casperthepancake
- Registered Member
-
Member for 2 years and 9 months
Last active Sat, Feb, 4 2023 06:32:31
- 1 Follower
- 40 Total Posts
- 3 Thanks
-
1
FireDashy posted a message on How to detect player which triggered command block? (Bedrock)Posted in: Commands, Command Blocks and Functions -
974
jamioflan posted a message on Flan's Mod 5.5.2 Update : 1.12.2, 100s of new Skins! : Helicopters, Mechas, Planes, Vehicles, 3D Guns, Multiplayer, TDM, CTFPosted in: Minecraft ModsThe new Flan's Mod Website is up!For downloads, content packs, servers and more, go check it out
If it is down, you can get all the files for the mod and official content packs HERE
Check out the Flan's Mod: Apocalypse teaser trailer and new videos on my YouTube channel
Also, like my mod on Facebook for development updates and follow my Twitter for more random mod related stuff
Check out the mod trailer here:
I'm restarting my Patreon page on which you can pledge support and get sweet rewards such as getting your favourite guns and vehicles added to Flan's Mod official content packs!
If you are looking for the perfect present for your Flan's Mod obsessed friends, why not get them some 3D printed vehicle icons and make them some badges or fridge magnets?
Check these and other models out at my Shapeways store
Looking for downloads? Everything is on my website, flansmod.com -
1
robotnrp posted a message on How to detect if mob takes damage (1.14)?Posted in: Commands, Command Blocks and FunctionsGlad I could Help!
-
1
Juiseboy posted a message on How to detect if mob takes damage (1.14)?Posted in: Commands, Command Blocks and FunctionsThank you good sir! It worked perfectly and I also figured out how to make the death sound because of you. I used absorption hearts tag to make the death sound since it didn't work with normal health.
Here's the command if someone is interested:
/execute at @e[tag=boss,nbt={AbsorptionAmount:0f}] run playsound minecraft:entity.husk.death hostile @a ~ ~ ~ 0.9 0.7
-
2
robotnrp posted a message on How to detect if mob takes damage (1.14)?Posted in: Commands, Command Blocks and FunctionsThe same concept holds. Use the target selector @e[tag=YourMobTag,nbt={HurtTime:10s}]. It doesn't have to look exactly like this to work, but for what you're doing, it's probably the best.
The full command would look something like this.
/execute at @e[tag=YourMobTag,nbt={HurtTime:10s}] run playsound ...
-
1
Juiseboy posted a message on How to detect if mob takes damage (1.14)?Posted in: Commands, Command Blocks and FunctionsI'm trying to make custom sounds for a mob when it takes damage or dies. I tried to use the commands from the links below but it seems that they don't work in 1.14. So any ideas how to execute sound command at mob when it takes damage or dies?
- To post a comment, please login.
1
You can give the player a stick to use for this with a custom tag like so:
Then you can add a custom advancement to a datapack (.json) with any name you want, I chose 'hurt_test.json'. The code is this:
The code checks if the player has been hurt by any entity (including other players), and checks if that entity was holding a stick with the 'levitation:1' tag. If this is all true it runs the function 'hurt_by_stick' from your datapack. Now you can add some code in that function:
This function (ran when the advancement checking for damage with the stick is dealt) gives the effect for 5 seconds with an amplifier of 2 (can be changed between 0-255) and it removes the testing advancement from the player so that the method can be used again.
I didn't have time to test all this myself, but everything should work. The only things that I'm uncertain about are the custom tags and the advancement.
1
Hello! To me everything seems perfect, I even tried it myself and it works flawlessly. So you have these commands in a ticked function or repeating command blocks:
This works without problems, maybe you just made a small mistake when using the commands?
1
You can store the player's starting armor damage in a score like this:
Of course, this is damage, not the durability value, but that does not matter for our use. You cannot directly modify the player's NBT (so their inventory), but you can other entities'. We will summon an armor stand holding an iron chestplate like so:
I gave it a damage value of 1 because then we can modify it (if there is no damage, we can't modify the value). We will now copy the scoreboard value to the damage of the armor stand's iron chestplate like this:
Finally, we can copy the item from the armor stand to the player like so:
Using all these commands and a simple command to decrease the durability value, you can do exactly that!