Help in creating a mod

Started by Thar She Blows on Thu, 04/23/2020 - 19:50

Topic category: Help with modding (Java Edition)

Last seen on 00:27, 25. Jul 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help in creating a mod
Thu, 04/23/2020 - 19:50

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…
Thu, 04/23/2020 - 20:20

 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…
Thu, 04/23/2020 - 20:22

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

Last seen on 00:27, 25. Jul 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks! 
Thu, 04/23/2020 - 20:31

Thanks! 

Last seen on 04:08, 7. Jan 2021
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
do you know how i could…
Tue, 06/30/2020 - 21:04

do you know how i could implement headshots?