Issue with throwable item

Started by Alessandro15204 on

Topic category: Help with modding (Java Edition)

Last seen on 01:35, 27. Mar 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Issue with throwable item
Thu, 01/06/2022 - 00:40 (edited)

G'day all
I made a throwable item that should explode when hit something(block,item and players).(basically a grenade)
The problem is that when I throw it explodes on me 

I have the same procedure on when hits player、 when hits block and when hits living entity.

So how can I avoid to explode when I throw it?

And which animation should I choose for it?

Edited by Alessandro15204 on Thu, 01/06/2022 - 00:40
Last seen on 01:35, 27. Mar 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Solved by myself    Two…
Thu, 01/06/2022 - 00:40

Solved by myself 

 

Two procedures are needed 

first go in "when ranged item is used"

make this

[set event/target entity data logic NBT tag "tag name" to true]

[cooldown provided itemstack for (time in ticks) ticks for event/target entity]

[set event/target entity data logic NBT tag "tag name" to true]

2nd ones

in "when item hit living entity"

| if not get event/target entity  data logic NBT tag "tag name"
|
|do explode at x y z  with power "chose power(4 is tnt power)" type break]

 

I hope to been useful for anyone wants made explosive ranged items that can explode when touch entity or players but not you when you're throwing it 

For any other question on this feel free to reply 

 

 

Last seen on 01:35, 27. Mar 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Thu, 01/06/2022 - 00:44

"The procedures for the item MCreator 2021.3"

Last seen on 09:27, 29. Mar 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The image isn't showing up…
Fri, 01/07/2022 - 01:37

The image isn't showing up so I'll just paste the link Alessandro is supposed to show.

https://m.imgur.com/a/Gauk7AG

Last seen on 01:35, 27. Mar 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks cloud1076
Fri, 01/28/2022 - 23:10

Thanks cloud1076