#custom elytra

1 messages · Page 1 of 1 (latest)

chilly wind
#

i have a datapack, which spawns the elytras in the end cities with a random custom texture based on its lore tag which is set by the datapack. it worked fine on our server and still does, however it has a bug now, so whenever someone places an elytra into a itemframe, it rerolls the texture and i cant find out why

balmy glacierBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

                        🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you


                        
                        ✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
chilly wind
#

this is my advancement file which looks fine to me

  "criteria": {
    "requirement": {
      "trigger": "minecraft:location",
      "conditions": {
        "location": {
          "feature": "endcity",
          "dimension": "minecraft:the_end"
        }
      }
    }
  },
  "rewards": {
    "function": "random_elytra:check"
  }
}```
autumn moat
#

so everytime someone is inside an end city you check for any elytras in item frames?

chilly wind
#
execute as @e[type=item_frame,tag=!random_elytra,nbt={Item:{id:"minecraft:elytra",Count:1b}},distance=..100] at @s run function random_elytra:set```
chilly wind
#
tag @s add random_elytra```
#

the last two code blocks are my functions

#

my friend told me about the bug just now, but i'm honest, i made the datapack 2 years ago and had help by a friend, so i am not certain if i am missing something, because i am more of a texture guy lol

balmy glacierBOT
# balmy glacier <@&1201956957406109788>

<@&935561184806060073> <@&1202694677766348840>

**🙇 Helpers Arise!**

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

fickle gazelle
#

Add a NBT tag to the item, eg {randomised:1b}, then check if it does not have that tag

#

And remove the entity tag, as it is not needed for this method

#
execute as @e[type=item_frame,tag=!random_elytra,nbt={Item:{id:"minecraft:elytra",Count:1b}},distance=..100] unless entity @s[nbt={Item:{tag:{randomised:1b}}}] at @s run function random_elytra:set```

Here’s the New function
~~Can use unless data … but on mobile rn so too hard~~
#

Before adding the lore in your loot table, add this to each of them
{
"function": "minecraft:set_nbt",
"tag": "{randomised:1b}"
}

chilly wind
#

thank you so much, will give it a try!

grim kestrel
#

me when the elytra is custom