#Hi I need help modifying a datapack
1 messages · Page 1 of 1 (latest)
Also this is less important but if anyone knows a better block sound than the shield one that would be great
Have you considered changing the reference to the swords tag to an axes tag?
I tried that
It didn't work
What exactly did you try?
I also tried "swords" to "axes"
Show your work
And then I tried changing "swords" to "axes" and then also changing "weapons" to "tools"
Well
I can in a few minutes
Can't really help if I can't see what you're doing
That's about all I tried though
Is it okay if I get back to you in about 20-30 minutes?
I was hoping that Image would be enough
Hey I'm back
Can you still help me?
I'm still waiting on info from you
I don't know if replacing tool with weapon was the right thing to do
But I figured since axes take double damage from being used as weapons Minecraft probably doesn't label them as such
It was not
It's not about what kind of item it is, it's about the slot you're checking for it in
The item you're holding in your main hand is in the weapon.mainhand slot
There is no tool.mainhand slot
... I just told you
Well yes but I already tried using it as just weapon.mainhand
Show your work
And just replacing swords with axes
I can take your word for it all I want, and I do, but I need to see what you actually physically entered to confirm it's correct or identify other issues
I cannot read your mind
Looks fine at a glance. Does the function validate?
What does that mean
Does Minecraft recognize it as a function? Can you run it in chat?
Try just running the command yourself directly in chat, but just everything before the run
The command that's in the function, starting with execute and all the way until it says, but excluding, run
When I type /execute
Run is the next command
There is no command between execute and run
You don't need to type anything, you just need to copy and paste from the function you already have
What you're seeing is the in-game autofill
Copy and pasted it correctly like you said
Didn't include run
Great
It said test passed, count 1
Yes I see that
When I did it correctly
Yes, thank you, got it, understood
So, it seems like the component is being applied to the axe correctly, which suggests that it may just not work on axes because they already technically have right click behavior
Essentially the command works fine, and axes just can't be made to block
Oh
Is there any way to remove axes stripping
To allow for the right click to be freed up
Not really, unfortunately that isn't a component yet that can just be removed. The alternative would be to replace the axe with a totally different item that uses an axe item model and all the other components of vanilla axes, plus the blocks_damage component, but doesn't have any right click behavior
Which is certainly doable but not something we can easily walk you through with the level of experience you have
If you're looking to get into data packs more fully, I recommend starting with our guide
Not a waste of time, I'm here to help