#Totem Sword

1 messages · Page 1 of 1 (latest)

grim acorn
#

So iam trying to make a datapack with netherite sword with CustomModelData:1 that has the same effect as a totem when holding in hand and dying. If you die a lot times in a row, you dont die because the sword activates the totemeffect every time you die. Unfortunately it doesnt work. Its in 1.20.4 Please help

surreal tiger
#

What exactly doesn't work?

grim acorn
#

Everything. The sword is supposed to activate the totem effect without consuming but it doesn't even activate any effects

surreal tiger
#

What did you do to make it act like a totem?

#

@grim acorn

grim acorn
#

I made it execute the different totem effects and reset health to 20, play the totem sound and do the particles when killed and scoreboards that count the deaths for it to trigger

#

It is also my first datapack and I tried to make it with Chatgpt because I couldn't find anything about it on the Internet

surreal tiger
#

Gotcha, so a few things:

  1. ChatGPT is not very good at helping with data packs. It doesn't have enough information in its data set, and so even when it does get command syntax right (which is not 100% of the time), it doesn't know how to string multiple together into something that works
  2. Well done trying to recreate the Totem effects from scratch! However that is indeed unlikely to work, or at least, unlikely to be able to save the player from lethal damage. Once the player dies, the only thing that can save them is a real totem
#

Fortunately, there is a solution. Instead of making your item a Netherite Sword with custom model data, you can instead make it a Totem of Undying with custom model data, as well as attribute modifiers so that it has the attack damage and speed of a Netherite Sword

#

That way you don't have to recreate any of the totem effects, that'll all get handled automatically. The only thing you'll have to do is replace the totem after the player is revived, which can be done easily by detecting the totem use with an advancement

high totem
#

You can use the new tool components to give the totem the sweeping effect that swords have to! 😄

surreal tiger
#

However, this isn't trivial stuff, so it may be a bit involved for a first data pack. We can help, but we're not gonna do it for you

grim acorn
#

Thanks but there is a good reason why it should be a netherite sword. Iam trying to recreate a weapon from a german minecraft project called "youtuber insel 2"

high totem
#

It can be any sword, you’re the one setting the attributes.

#

It can even have stats that no vanilla sword has, if you want.

grim acorn
#

The only thing i want to do is give a specific sword the abilities of a totem without consuming in 1.20.4 and i dont know how

surreal tiger
#

That's not really a thing that's possible. You can make a Totem of Undying that acts like a sword, but not the other way around

#

How is your sword meant to be obtained?

grim acorn
#

The sword is meant to only be obtained through commands

surreal tiger
#

Then there should be absolutely no issue with the solution we proposed

high totem
#

You can’t use the tool component to give the sword the sweeping ability if you’re below 1.20.5 😬

#

Sorry

surreal tiger
#

Other than that 😅

grim acorn
#

You can't understand why it has to be a sword until you have seen the original sorry

surreal tiger
#

I don't think you understand that the method we are suggesting will make it behave like a sword

#

But if you don't want our help, that's your prerogative

grim acorn
#

Do you guys know if its possible with plugins? If yes then i will do it with plugins instead of a datapack

surreal tiger
#

No idea, we're data pack developers, not plugin developers

grim acorn
#

Nevertheless, thanks for at least the clarification

surreal tiger
#

So what do you want to do? Would you like help from us, or are you going elsewhere?

high totem
grim acorn
#

Iam going elsewhere, sorry