Using the player as a dependency

Started by Purple1988 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using the player as a dependency
Mon, 10/11/2021 - 19:39 (edited)

I am making a mod that lets you lace a dagger with poison.

and the procedure is to add the effects then remove the laced dagger and then add the regular dagger to the player's inventory when the player hits a mob with it.

But the problem is that the dependency blocks don't include the player.

I have tried all of them, Event/target entity, Source entity, Immediate source entity, and the Entity iterator.

Sorry if it is obvious I am new to making procedures

 

(solved)

 

Edited by Purple1988 on Mon, 10/11/2021 - 19:39
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
mob is hit with tool  add…
Sun, 10/10/2021 - 01:54

mob is hit with tool 

add potion effect to Event Target Entity: Venom

remove item in main hand of source entity

set item in main hand of source entity to: Dagger_Without_Venom

 

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried that but it keeps…
Sun, 10/10/2021 - 04:55

I tried that but it keeps saying that, it Failed to load dependency source entity for procedure 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
could I see the Procedure…
Sun, 10/10/2021 - 05:05

could I see the Procedure and Triggers tab?

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well I don't see why it…
Sun, 10/10/2021 - 06:02

well I don't see why it wouldn't work, just save it

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Which trigger you are using ?
Sun, 10/10/2021 - 09:29

Which trigger you are using ?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can use the link to see…
Mon, 10/11/2021 - 01:45

you can use the link to see the procedure 

https://ibb.co/cg7HKNg

And it is supposed to trigger when a living entity is hit with item

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just click save and go to…
Mon, 10/11/2021 - 01:49

just click save and go to triggers and select it

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I already did that
Mon, 10/11/2021 - 05:45

I already did that

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then what's the problem??
Mon, 10/11/2021 - 05:53

then what's the problem??

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just rebuilt the procedure…
Mon, 10/11/2021 - 18:22

I just rebuilt the procedure by scratch, in the exact same way and it worked... somewhat.

now it recognizes the player as the dependency but won't give the dagger back, after taking the poisoned one.

i have a video of it so it is easier to see

https://streamable.com/0q45vy

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
remove the Add and Remove…
Mon, 10/11/2021 - 18:27

remove the Add and Remove blocks, and instead use this:

set item in main hand of source entity to:Normal_Dagger

found in Entity Management

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok that worked but I still…
Mon, 10/11/2021 - 18:46

Ok that worked but I still need to get rid of the chat message 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what
Mon, 10/11/2021 - 18:50

what