checking if item is in main hand

Started by Tylerboy0704 on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
checking if item is in main hand

hi, i just download mcreator, and tried to make a simple "check if item is in hand, if yes: spawn this item" i used the "item in main-hand of event/target entity" but it doesnt seem to work, does anyone know how to make it work?

Active 6 months ago
Joined Oct 2021
Points:
541

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
It needs to be in the right…
Sun, 11/14/2021 - 17:11

It needs to be in the right trigger. The triggers called "When item in hand"

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
and where does that stand?…
Sun, 11/14/2021 - 17:28

and where does that stand? sorry if this is a stupid question but i cant seem to find it

Active 1 year ago
Joined Oct 2020
Points:
1616

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
on your custom item trigger…
Sun, 11/14/2021 - 18:02

on your custom item trigger click the When Item In Main Hand or smt like that, then make it spawn the item and for it not to crash make a cooldown, destroy the item etc etc however u want

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
on the global  trigger there…
Sun, 11/14/2021 - 18:54

on the global  trigger there is no: when item on main hand, or do you mean something else, im really confused. 

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
https://imgur.com/RKf1rdr…
Sun, 11/14/2021 - 18:58

https://imgur.com/RKf1rdr

this is what i have right now, if theres a better way i'd like to know it

Active 1 year ago
Joined Oct 2020
Points:
1616

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
local trigger, like on your…
Sun, 11/14/2021 - 18:58

local trigger, like on your item go to the section Triggers and select the Item in hand 

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
and where exactly do you…
Sun, 11/14/2021 - 19:03

and where exactly do you find that? sorry if im asking so many questions

Active 1 year ago
Joined Oct 2020
Points:
1616

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
you do not need to specify…
Sun, 11/14/2021 - 19:03

you do not need to specify item in main hand, remove the if statement and put it on a custom item trigger

Active 3 years ago
Joined Nov 2021
Points:
509

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
and how do you do that?
Sun, 11/14/2021 - 19:04

and how do you do that?

Active 1 year ago
Joined Oct 2020
Points:
1616

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1874
Put your item on a trigger…
Sun, 11/14/2021 - 19:06

Put your item on a trigger. Before doing a mod I recommend checking yt tutorials on how to do them. 

see the videos found here https://youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei

and if u still don't know, come back