Minecraft Data Packs / Cosmetic

Roleplay Items v1 || Customize your items!

  • check_circle Functions
  • 3,296 views, 2 today
  • 138 downloads, 0 today
  • 5
  • 5
  • 5
Required Resource Pack
Gubs II's Avatar Gubs II
Level 31 : Artisan Goblin
13
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.
CreditBello666 for original sword texture
CompatibilityMinecraft 1.14
toMinecraft 1.19
Tags

Create an account or sign in to comment.

1
11/12/2022 8:46 am
Level 3 : Apprentice Miner
_Zeta
_Zeta's Avatar
the resourcepack doesn't work. I try to use it but it doesn't work
1
11/12/2022 5:22 am
Level 3 : Apprentice Miner
_Zeta
_Zeta's Avatar
How to customize the resourcepack?
2
11/18/2022 3:33 pm
Level 3 : Apprentice Miner
_Zeta
_Zeta's Avatar
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.
3
11/08/2022 3:10 am
Level 39 : Artisan Miner
Lordphenex
Lordphenex's Avatar
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.
2
11/21/2022 8:06 pm
Level 31 : Artisan Goblin
Gubs II
Gubs II's Avatar
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.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome