How Do I Right Click On Mobs

Started by yelfog on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Apr 2022
Points:
474

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
How Do I Right Click On Mobs

So I put together a procedure that is supposed to open a gui when I right click on a spider. The problem is I cant right click on mobs while in game. Is there a easy solutution to this?

"my procedure"

Active 3 years ago
Joined Apr 2022
Points:
474

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
I If the image isn't showing…
Fri, 04/08/2022 - 21:55

I If the image isn't showing up here is the link for it

https://ibb.co/zXpFKs9

Active 1 day ago
Joined May 2021
Points:
842

User statistics:

  • Modifications: 4
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 352
Change is source entity to…
Fri, 04/08/2022 - 22:40

Change is source entity to entity. The Player is the source entity (who is right clicking), the entity is the splider (who receives the right click).Same with deal <###> damage to source entity, change it to entity.

Active 3 months ago
Joined Oct 2021
Points:
541

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
Wow, Really Thanks, I Also…
Wed, 10/25/2023 - 04:51

Wow, Really Thanks, I Also Had The Same Problem and You We're Right I Swapped Them and It Worked

Active 6 hours ago
Joined Dec 2019
Points:
1122

User statistics:

  • Modifications: 7
  • Forum topics: 71
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 96
# Trigger an external call…
Wed, 10/25/2023 - 07:25

# Trigger an external call or when a player right-clicks on an entity
Events trigger - triggered external call
Or when (global trigger) player right-clicks on entity:

# Check if the source is a sub-type of a spider
If source is (sub)type of spider:
 # Open the "normalspiderGui" screen for the targeted entity at coordinates (x, y, z)
 Do open screen events/target entity x y z gui normalspiderGui
 
 # Check if there are items in slot 0 of the "currency" GUI in the targeted entity
 If get number of items from slot 0 of the currency > 0:
   # Deal 100 damage to the source entity with the generic type
   Deal 100 damage to source entity type generic
   
   # Spawn a "custom spiderwithsadle" living entity at coordinates (x, y, z)
   Spawn x y z living entity custom spiderwithsadle
   
   # Close any open GUI for the targeted entity
   Close any GUI open for events/target entity
   
   # Open the "spiderwithsadle" screen for the targeted entity at coordinates (x, y, z)
   Open screen for events/target entity, passing location x y z, GUI spiderwithsadle