Custom Textures and sound From Ressourcepack


#1

Hello, i have a custom ressourcepack and i found on a server who apply customs textures on 1 item at the same place (look in inventory). It can be good if we can do that, do you know how i can do that?
thx

(i have the same problem with sound, wan we apply personal sound from resource pack, i saw it in a server)


#2

For the custom texture, that’s not something you can control. All you can do is retexture the item. As for custom sounds, you can use SoundType.of().


#3

I didn’t quite understand your question but you can retexture an item at a specific damage value if that helps.


#4

Yes, but in Mining Dead server it’s work without mod, is a spigot server or something similar with a bungeecord manager and it make this possible.

Here normal mode.


Here aim mode

When you look the texturepack structure you can see custom sounds file and a new file .json :


And when you take a look to the models folder you can see other custom path and textures models:

TheSebakl talk about this type of thing :slight_smile:
But we don’t know how to make this type of thing with sponge.


#5

That is a retextured item. You can do these things in vanilla by setting the resources pack in the server config or additionally send the pack manually from code in sponge.


#6

I think there’s a bit of confusion about the item textures: You can’t create new items with custom textures. Instead, you replace the texture of an existing, built-in item via a resource pack and give that item to the player.


#7

Yes, it’s one vanilla item (a stone pickaxe for exemple) but they have custom texture and custom path to the texture.
When you left click you have the “stone pickaxe” with no aim and when you click again you a “stone pickaxe” with the aim. It’s not 2 items! It’s one item with 2 textures! First time with the path (/asset/models/guns/ak47noaim) and the second time (ak47withaim).
I know you think it’s impossible but go to the server and see by yourself :wink:




#8

And there’s your answer


#9

Ohhhh ! ok, Thanks <3
Do you have a line exemple to use custom path in sponge ? Like the SoundType.of() but for texture.

But with path in parameter to use custom texture :slight_smile:

Thanks a lot :heart:


#10

The retexturing happens in the resource pack. There’s no difference for vanilla, sponge or bukkit.

Sending the resource can be done in the vanilla server settings(look at minecraft wiki how to do that).
Alternatively you can send a resource pack to players specifcly via code: https://github.com/SpongePowered/SpongeAPI/tree/bleeding/src/main/java/org/spongepowered/api/resourcepack and Player#sendResourcePack() helps.

When you used different damage values for the different textures of one item(I recommend a diamond hoe) you obviously have to set that item to the specific damage value. You do that with the data API of Sponge. Key: https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/data/key/Keys.java#L639


#11

thx, i’ve understand about texture,

like Jordan said do you have an exemple of path to own SoundType.of()?

if i want to get assets/minecraft/models/guns do i have to spécify something like SoundType.of(“models/guns”); or something else?

Thx for your help