Data Packs Weapons and Armor

Random Item Attributes

  • Functions
  • Loot Tables
  • 6,157 views • 7 today
  • 815 downloads • 0 today
  • 24
  • 25
  • 10
TheLuckyPie
Level 20 : Expert Miner
1
FOR SNAPSHOT 24w06a-24w08a (Since it uses new attribute features introduced in this version)
NBT GOT REWORKED SO IT NO LONGER WORKS 24w09a+
<Should be Multiplayer Compatible>

This datapack randomly assigns a rarity and attributes on held armor and tools:

- Poor (10% Chance with 2x Negative Attributes)
- Common (30% Chance with 1x Negative Attribute and 50% chance of 1x Tier 1 Attribute)
- Rare (25% Chance with 1x Tier 1 or 2 Attribute and 25% chance of 1x Negative Attribute)
- Mythic (20% Chance with 2x Tier 1 to 3 Attributes and a 10% chance of 1x Negative Attribute)
- Legendary (15% Chance with 3x Tier 2 to 3 Attributes)

Depending on the rarity, it randomly assigns one of 8 attribute modifiers with 4 tiers on the selected tool: Negative, Tier 1, Tier 2, or Tier 3:

Tools (Pickaxe, Axe, Shovel, Hoe, Sword):
- Extended (Modification of Block and Entity Interaction Range) [​Tier 1 - 3]; Contracted [​Negative]
- Streamlined (Modification of Attack and Block Break Speed) [​T1-3]; Clunky [​Negative]
- Sharp (Modification of Attack Damage) [​T1-3]; Dull [​Negative]
- Heavy (Modification of Movement Speed) [​Negative]

Armor (Leather, Iron, Gold, Diamond, Netherite)
- Reinforced (Modification of Armor, Armor Toughness, and Knockback Resistance) [​T1-3]; Debilitated [​Negative]
- Vitality (Modification of Max Health) [​T1-3]; Frailty [​Negative]
- Light (Modification of Gravity, Safe Fall Distance, and Step Height) [​T1-3]; Heavy [​Negative]
- Agile (Modification of Movement Speed) [​T1-3]; Stiff [​Negative]

The exact modifiers can be found by referring to the guide in-game using the command:
/function minecraft:get_guide


Does not mess with enchantments, and items dropped by mobs or found in chests will automatically have attributes applied to them (without overwriting their original enchantments, etc.)
CompatibilityMinecraft 1.20
Tags

  Have something to say?

WerfixCz
02/17/2024 1:13 pm
Level 1 : New Miner
It doesnt work idk if it becouse im playing 1.20.1 or something else
1
TheLuckyPie
02/26/2024 10:09 am
Level 20 : Expert Miner
Yep, clearly states that you need to be on a version newer than snapshot 24w06a
1
Bwingfighter12
02/13/2024 9:50 pm
Level 29 : Expert Miner
Can you re-roll the attributes?
2
TheLuckyPie
02/14/2024 7:07 am
Level 20 : Expert Miner
history
Hey, unfortunately atm I didn't implement a system to re-roll the attributes since I couldn't find a balanced way of implementing it. If the cost of re-rolling is too cheap then you could just re-roll until you get the highest tier - too expensive and you would just craft another tool/armor instead.

If you have any suggestions, I could implement it.
1
CSlush
02/20/2024 3:40 pm
Level 1 : New Miner
history
I don't know if this is possible. However, since the only way to make re-rolling balanced with crafting a new item would be to have re-rolling cost the same amount as crafting a new copy of the same item you could sort of combine the two ideas. The thought I am thinking could make sense would be that re-rolling requires combining two of the same type of item. You could possibly also make up for the fact that you only end up with a single piece of armor afterwards by providing a partial refund of the material used to make the item (probably only makes sense for netherite and armor). This would encourage a system where you alternate between making a new copy and re-rolling while also preventing the accumulation of large amounts of bad items which otherwise would clutter your storage or just have to be destroyed.. Obviously if you implemented a partial refund when combining items for Netherite you would have to refund ancient debris rather than Netherite but really that kind of makes sense.
1
TheLuckyPie
02/26/2024 10:11 am
Level 20 : Expert Miner
That is an interesting suggestion. I suppose having crafting recipes that take two of the same armor/tool and outputs one is the easiest way of re-setting the nbt to "re-roll". I'll try implementing that for the next version
1
yelloww69
02/13/2024 7:41 pm
Level 21 : Expert Miner
This looks super cool!
2
TheLuckyPie
02/14/2024 7:08 am
Level 20 : Expert Miner
Thanks :D
1
Torrezx
02/13/2024 11:17 am
Level 87 : Elite Bear
Wow amazing !
2
TheLuckyPie
02/14/2024 7:09 am
Level 20 : Expert Miner
Thank you!
2

Welcome