• check_circle Functions
  • 12,966 views, 2 today
  • 2,678 downloads, 0 today
  • 11
  • 14
  • 17
ArwenOC's Avatar ArwenOC
Level 52 : Grandmaster Programmer
89
Armor to Elytra v 1.0.1

Armor to Elytra is a datapack that allows the player to apply their armor enchantments and attributes (Armor amount / toughness / knockback resistance ) to their elytra using an anvil.

How to use:
Throw an elytra on top of an anvil, right click it with a chestplate / tunic of choice, and pick it up for your new armored elytra!

- By ArwenOC
CompatibilityMinecraft 1.17
toMinecraft 1.18
Tags

1 Update Logs

1.0.1 : by ArwenOC 07/29/2021 4:12:55 pmJul 29th, 2021

+ Bugfix: - fixed critical error that made the pack only useable in the 10 blocks around 0,0

Create an account or sign in to comment.

Rignchen
03/02/2022 12:57 pm
Level 46 : Master Necromancer
Rignchen's Avatar
I just toke a look in your files (I had a problem to set the armor points in my datapack) and I saw that you use the tick file to detect the item with a nbt test in it. That's really not optimised, that's what I propose you: use an advencement "item_change" with a function as reward and do your nbt test in here (and don't forget to revoke the advencement), that's way more optimised
1
Rignchen
03/02/2022 1:00 pm
Level 46 : Master Necromancer
Rignchen's Avatar
actually the datapack I am working on is an armored elytra, I do it cause like everyone you found have this optimisation problem (you have it to).

If I told you the problem it's not to insult you or anything like that but for you to be able to do better
1
ArwenOC
06/02/2022 3:51 pm
Level 52 : Grandmaster Programmer
ArwenOC's Avatar
I'm glad you pointed this out it could be more optimized but I actually just coded this for a server my friends and I were playing in like 10 mins lol. I don't really see any point in changing it too much since there's hardly any commands running at all for this pack, so it's not really an issue. I might update it and then change it.
1
jobins
02/15/2022 2:31 pm
Level 1 : New Miner
jobins's Avatar
And how do you take off?
1
ArwenOC
02/16/2022 3:17 pm
Level 52 : Grandmaster Programmer
ArwenOC's Avatar
You don't. Applying a chestplate to an elytra is permanent
1
KuyRaisus
08/12/2021 5:30 am
Level 1 : New Miner
KuyRaisus's Avatar
How to make "Elytra to armor"
2
Xenithn
08/10/2021 3:46 pm
Level 1 : New Collective
history
Xenithn's Avatar
Sadly the netherite elytra is not lava-proof. :\
1
ArwenOC
08/10/2021 4:08 pm
Level 52 : Grandmaster Programmer
history
ArwenOC's Avatar
I tried to apply that, but unfortunately nothing really worked. Sorry
1
Rignchen
02/04/2022 1:13 pm
Level 46 : Master Necromancer
Rignchen's Avatar
did you try that:

advencemet that detect if you die + advencement that detect if you drop an item (inventory change + condition of having an item in a 1 block range)
both of thoses advencement have for reward the same function witch:
-revoke the both of the advencement advencements (else it will be a single use)
-execute as every netherite elytra that don't have a certain tag another function

what the second function does is:
-giving them the certain tag
-changing the data "Invulnerable" of the item to 1b
1
Rignchen
02/04/2022 1:55 pm
Level 46 : Master Necromancer
history
Rignchen's Avatar
(I wrote all of that from head so there might be some mistakes)
an exemple of how it can be: (what is between # and & is what you can change the name of)

in the advencement file:
#drop&.json
{
"criteria": {
"#loot&": {
"trigger": "minecraft:inventory_changed",
"conditions": {}
}
},
"requirements": [
[
"@e[​type=item,nbt={Item:[id:\"minecraft:elytra\",tag=#netherite_elytra&],distance=..1}"
]
],
"rewards": {
"function": "#namespace:netherite_drop&"
}
}
#death&.json
{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_killed_player"
}
},
"requirements": [
[
"@e[​type=item,nbt={Item:[id:\\\"minecraft:elytra\\\",tag=#netherite_elytra&],distance=..1}"
]
],
"rewards": {
"function": "#namespace:netherite_drop&"
}
}

in the functions file
#netherite_drop&.mcfunction
advencement revoke only #namespace:drop&
advencement revoke only #namespace:death&
execute as @e[​type=item,nbt={Item:[id:"minecraft:elytra",tag="#netherite_elytra&]},tag=!#lava&] run function #namespace:lava%
#lava&.mcfunction
tag @s add "#lava&"
data merge entity @s {Invulnerable:1b}

(there is some easier way to do it but they are well less optimised cause they use the main/tick.mcfunction witch is one of the less optimised file in a datapack (cause it executed 20 times per tick))
1

Welcome