How do I make a Poison-Aspect like enchantment?

Started by Hollowplayz on Fri, 09/11/2020 - 10:36

Topic category: Help with modding (Java Edition)

Last seen on 14:03, 8. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How do I make a Poison-Aspect like enchantment?
Fri, 09/11/2020 - 10:36

I have tried all ideas, however, it doesn't work. It has 3 levels, and I've used the forums and the tutorial, but I cant figure out how. When you hit a mob, it's supposed to afflict poison, but it does nothing.

Last seen on 14:00, 22. Jun 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hollowplayz, I'm currently…
Fri, 09/11/2020 - 12:41

Hollowplayz, I'm currently developing an Enchantment Mod with a Poison Aspect Enchantment! So I can help you.

First, create an Enchantment: https://imgur.com/a/DzelAR7

Then, you need to edit it (1-3 or more Levels) (2nd picture of this link ^)

After that, create an Procedure.

In this Prodecure, we use the Trigger "Entity attacked". Then we add an If-Statement:

"If the hitting Entity (SourceEntity) has Poison Aspect on his Sword, then..." or in 1:1, "If the SourceEntity doesn't have an Sword with Poison Aspect Level 0 (Meaning: Higher Level then 0): https://imgur.com/eUgS4qV

I think, you mean, that if the Level of the Enchantment is higher, it takes longer. Because Level doesn't make sense because it doesn't change anything (I think), So if the Poison will take 5 Seconds * Level of Enchantment (Max 15sec), then do this:

Add an "Add Potion Effect" inside the If-Statement. Choose "with Level" 0 and the Potion Effect you want (Poison). You need to scroll a bit for the Poison Effect. Then select the Duration (In ticks). First, take out the "60". Use an Operation and select * (multiplication). Remove the 60 and enter a 100 (5 Seconds). Put it in the first gap (5 Seconds * ???).

Now choose the "Get Level of Enchantment on item" again, and again with the Block: Get Item in Mainhand (Just Duplicate the Block of the If-Statement). So, it multiplicates 5 Seconds * The Level of the Enchantment. That's what you wanted, right?

https://imgur.com/EC0DmlD (In this Picture i made a mistake, i typed "Level 1 instead of 0" and I typed 60 instead of 100.

So now you can test it.

 

If you want, that it's not every hit, only with a 25% Chance, you can add that, that's not to explain, just search Random(0,1) here.

So is it that what you want or can I help you somehow else?

Greetings, MPM

Last seen on 14:00, 22. Jun 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Dude this took so long to…
Fri, 09/11/2020 - 12:42

Dude this took so long to write xd

Last seen on 14:03, 8. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks a lot! This helps a…
Fri, 09/11/2020 - 19:17

Thanks a lot! This helps a lot, and I appreciate your time in answering my question! this has been really important because of my mod, PROJECT-LITHSCAPE, that is launching on an RPG and MMO server planned on March 20 of 2021. Thanks again!

Last seen on 14:00, 22. Jun 2021
Joined Jan 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Uhm at the first Imgur page…
Fri, 09/11/2020 - 19:58

Uhm at the first Imgur page the images are in the wrong direction xd But it's not so important.

Last seen on 04:30, 2. May 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I followed your instructions…
Mon, 09/21/2020 - 10:54

I followed your instructions but it didn't have any effect coming out, Is it i make something wrong?

 

Last seen on 14:03, 8. Mar 2021
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You have to do Before Entity…
Fri, 09/25/2020 - 19:40

You have to do Before Entity Attacked, and the duration is (25 ticks = 1 second) so go off that