Using the player as a dependency

Started by Purple1988 on

Topic category: Help with Minecraft modding (Java Edition)

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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
Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1879
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

 

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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 

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

could I see the Procedure and Triggers tab?

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
https://ibb.co/cg7HKNg I don…
Sun, 10/10/2021 - 05:29

https://ibb.co/cg7HKNg

I don't know what you mean, but here is the procedure  

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1879
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

Active 9 hours ago
Joined Mar 2021
Points:
933

User statistics:

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

Which trigger you are using ?

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

just click save and go to triggers and select it

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

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

I already did that

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

then what's the problem??

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1879
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

Active 3 years ago
Joined Jun 2021
Points:
515

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 13
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 

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

what