Help with ranged item and mob cooldown

Started by aoooodi2 on Thu, 10/15/2020 - 15:54

Topic category: Help with modding (Java Edition)

Last seen on 23:09, 4. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with ranged item and mob cooldown
Thu, 10/15/2020 - 15:54

I would like to know how to add a cooldown to a ranged item and how to add a cooldown to a mob,like a skeleton because the mob i made shoots to fast.

Last seen on 18:21, 28. Nov 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i don't think you can change…
Fri, 10/16/2020 - 01:05

i don't think you can change a custom mob's shooting speed without coding. but if you're up for modifying source code, its a fairly simple thing to change. which minecraft version you modding?

Last seen on 23:09, 4. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
1.15
Fri, 10/16/2020 - 14:59

1.15

Last seen on 18:21, 28. Nov 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
edit code of your custom…
Fri, 10/16/2020 - 21:35

edit code of your custom entity element. look for a line that looks like this:

this.goalSelector.addGoal(1, new RangedAttackGoal(this, 1.25D, 20, 10.0F));

in this line of code, 1.25D is the entity's movement speed, 20 is the max attack interval in ticks (so around once per second), 10.0F is the max distance it will shoot. modify the 20 to maybe 40 for 2 second intervals or 60 for 3 second intervals.

Last seen on 23:09, 4. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you very much,it…
Sat, 10/17/2020 - 20:28

Thank you very much,it really helped and i learned how to changed entity cooldown and range,but im still strugiln with item cooldown

Last seen on 18:21, 28. Nov 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
there's a code block to set…
Sun, 10/18/2020 - 17:03

there's a code block to set an item's cooldown:

https://cdn.discordapp.com/attachments/599250311852458006/767432619255660654/unknown.png

Last seen on 23:09, 4. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i know but for some reason…
Mon, 10/19/2020 - 18:58

i know but for some reason that didnt work

Last seen on 18:21, 28. Nov 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
be specific. how does it not…
Mon, 10/19/2020 - 21:24

be specific. how does it not work. how are you doing it?

Last seen on 23:09, 4. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
like i put the cooldown…
Tue, 10/20/2020 - 16:07

like i put the cooldown procedure in a when item is used trigger but i can just spam bullets