Minecraft Data Packs / Weapons and Armor

Random Item Attributes

  • check_circle Functions
  • check_circle Loot Tables
  • 3,331 views, 24 today
  • 575 downloads, 5 today
  • 20
  • 19
  • 10
TheLuckyPie's Avatar TheLuckyPie
Level 15 : Journeyman 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

Create an account or sign in to comment.

1
02/17/2024 1:13 pm
Level 1 : New Miner
WerfixCz
WerfixCz's Avatar
It doesnt work idk if it becouse im playing 1.20.1 or something else
1
02/26/2024 10:09 am
Level 15 : Journeyman Miner
TheLuckyPie
TheLuckyPie's Avatar
Yep, clearly states that you need to be on a version newer than snapshot 24w06a
2
02/13/2024 9:50 pm
Level 29 : Expert Miner
Bwingfighter12
Bwingfighter12's Avatar
Can you re-roll the attributes?
1
02/14/2024 7:07 amhistory
Level 15 : Journeyman Miner
TheLuckyPie
TheLuckyPie's Avatar
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
02/20/2024 3:40 pmhistory
Level 1 : New Miner
CSlush
CSlush's Avatar
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
02/26/2024 10:11 am
Level 15 : Journeyman Miner
TheLuckyPie
TheLuckyPie's Avatar
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
2
02/13/2024 7:41 pm
Level 1 : New Miner
yelloww69
yelloww69's Avatar
This looks super cool!
1
02/14/2024 7:08 am
Level 15 : Journeyman Miner
TheLuckyPie
TheLuckyPie's Avatar
Thanks :D
2
02/13/2024 11:17 am
Level 82 : Elite Bear
Torrezx
Torrezx's Avatar
Wow amazing !
2
02/14/2024 7:09 am
Level 15 : Journeyman Miner
TheLuckyPie
TheLuckyPie's Avatar
Thank you!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome