Started by
Hollowplayz
on
Topic category: Help with Minecraft modding (Java Edition)
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.
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
Dude this took so long to write xd
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!
Uhm at the first Imgur page the images are in the wrong direction xd But it's not so important.
I followed your instructions but it didn't have any effect coming out, Is it i make something wrong?
You have to do Before Entity Attacked, and the duration is (25 ticks = 1 second) so go off that
For some reason i can't find the "Get level of enchantment of" and instead get a "Get level of enchantment (insert enchantment) of ProvidedItemStack, any help please?
Nvm, i fixed it.