Started by
6hertz
on
Topic category: Help with Minecraft modding (Java Edition)
I was wondering if there was a way to make it so I could have a weapon that increases in damage if I have a certain item in my inventory. An example of this would be if I had a diamond sword, I could have diamonds in my inventory and the damage of the diamond sword would increase. I have been looking for how to do this for about an hour now and can't seem to find anything.
You could make another item, then make a procedure for the less powerful version where it detects f the item is in the person's inv, and another one for the more powerful version that senses if it isn't in their inventory
Use item NBT data. When the sword hits an entity deal the NBT data damage to the entity.
IF entity holding diamond_sword AND inventory has diamond, add potion effect Strength