Started by
vagstef
on
Topic category: Help with Minecraft modding (Java Edition)
the problem is it says i dont have a itemstack depency and yes i dont but how can i check if the player is holding that specific item then with the enchantment?
Edited by vagstef on Fri, 07/12/2024 - 14:46
use the "get item in main hand of (event/target entity)" to check if it is equal to whatever item you want and has whatever enchantment you want
let me try it
hold on i think its the thing i tried before and it said the thing for the depency but let me try again i guess
cant even find the exact block you're saying only found item in main hand block which i already tried and as said shows a dependency error. Isn't there a way to ignore dependency errors or add dependencies?
Unfortunately you can’t ignore dependency errors or add dependencies, it means the information your are asking for doesn’t exist in that context. The “provided itemstack” block requires an itemstack dependency which is pretty straight forward, but the “item in main hand” block has an entity dependency, so I wonder what the trigger you are using is. Could you send a picture of your procedure and what trigger you use?
i know that this trigger doesnt have the dependecy... ok idk why it isnt working but anyway just https://photos.app.goo.gl/QL67srejZeJzwKbr5
i just remade it right now quickly because i couldnt save it because of the error so just ignore that i can add the trigger to the item instead of the enitie taking damage thing
You’re halfway there, the part making sure the item in hand is your item is perfect, now you just need to use that exact same “item is main hand of source entity” instead of “provided itemstack” in the has enchantment block
ooh
let me try that
ok so i cant find a way to put it in the enchantment block
OK figured something out!! TYSM
Nice, glad I could help