Data Packs Cosmetic

Roleplay Items v1 || Customize your items!

  • 4.1k views 0 today
  • save_alt 151 downloads
Compatibility
Minecraft 1.14
to version
Minecraft 1.19
Changes include
  • Functions
Added CreditBello666 for original sword texture
  • 5
  • 7
  • 5
Required Resource Pack
Gubs II
Lvl 34Artisan Goblin
14
Customize your world!
With this Datapack, you can change the models and textures of your items.


This Datapack allows you to modify the CustomModelData tag of any item at will. On its own this does nothing, but paired with a resource pack, this allows you to make your items look like anything you want.

To change an item, you have to hold the item and use a command. This is a trigger command that anyone can use.

To use the command, type /trigger rp_ApplyModel set <number>
The number will be the value you set the CustomModelData tag to. Keep in mind this Datapack only supports numbers 1-5 for now.
If I wanted to give something CustomModelData of 2, for instance, I would type /trigger rp_ApplyModel set 2.

More like this

  Have something to say?

_Zeta
11/12/2022 8:46 am
Level 3 : Apprentice Miner
the resourcepack doesn't work. I try to use it but it doesn't work
1
_Zeta
11/12/2022 5:22 am
Level 3 : Apprentice Miner
How to customize the resourcepack?
1
_Zeta
11/18/2022 3:33 pm
Level 3 : Apprentice Miner
Okay, I fixed the thing and customized the datapack. It works now. I hope you are going to fix the files here, because you need to edit those in order to make them work.
2
Lordphenex
11/08/2022 3:10 am
Level 44 : Master Miner
Your datapack idea is great but not implemented efficiently.

With your version of it, you are using the /item command that only appeared in 1.17 so you can't claim your datapack is 1.14 compatible.
A better way (in my opinion) to achive your goal is to run a function as all player that triggered the score.
In this function, you can copy player score to a storage and then use an item_modifier to modify the item CustomModelData from the storage by using the copy_nbt tag.

It would look something like this :
tick.mcfunction : execute as @a[scores={rp_ApplyModel=1}] run function rp_items:apply_model
apply_model.mcfunction : execute store result storage temp CMD int run scoreboard players get @s rp_ApplyModel
item modify entity @s weapon.mainhand rp_items:apply_model

apply_model.json :
[
  {
    "function": "minecraft:copy_nbt",
    "source": "minecraft:temp",
    "ops": [
      {
        "source": "CMD",
        "target": "CustomModelData",
        "op": "replace"
      }
    ]
  }
]

I may have made syntax mistakes so feel free to ask if something isn't working properly.
With these changes, you will be able to use any number as a CustomModelData without having to hardcode each and every single value.
I hope this will help you.
3
Gubs II
11/21/2022 8:06 pm
Level 34 : Artisan Goblin
Thank you for the input! I tried to do this originally but I couldn't get it to work. I will definitely try to update the pack with these changes in the future.



Also, sorry that it says 1.14+, it autofilled a version and I forgot to check.
2

Welcome