Started by
Thar She Blows
on
Topic category: Help with Minecraft modding (Java Edition)
Hello! I would be very happy if you could help me with a few of the difficulties described below, thank you in advance!
1) Let's say I have a certain weapon that can deal critical damage with a certain chance, I would like to make it so that the player can put on special armor that increases the probability of damage to certain weapons, how can I implement this ?
2) Let's say I have a certain weapon, I would like to make it so that when dealing damage to an enemy creature , an effect is applied to me(the player), only when I hold this weapon, if I don't hold it, the effect is removed , how could I implement this ?
First, create a tool, Then create an event triggered using when a mob is hit with that tool
Procedure below
When a mob is hit using the weapon Ulu Knife, a sound will play,
for a 50% chance, 3 more damage will be dealt and the entity will be hit 3 blocks high.
For more the increased chance of bonus damage when wearing armor, do the following
Play sound
If checking for armor in slot x = Minecraft item identifier [place armor]
if random 0,1<Bonus chance for armor on
Do extra attack
end if
else
if random 0,1<Bonus chance for no armor on
Do extra attack
Number 2)
Use when an item is on hand procedures or you can use attributes
For examples, this
/give @p diamond_axe{AttributeModifiers:[{Slot:"mainhand", AttributeName:"generic.attackDamage", Name:"generic.attackDamage", Amount:20.0, Operation:0, UUIDMost:-827189226435083L, UUIDLeast:-694401732771116L}]}
Extra attack damage
Thanks!
do you know how i could implement headshots?