TransWikia.com

Minecraft 1.17 how to create custom coloured potion texture pack

Arqade Asked by MCEnthusiast on July 29, 2021

I would like to design a texture pack with custom more distinguishable potion colours for each potion type. How do I go about doing this?

I’ve been able to unpack the .jar file, find the assetsminecrafttexturesitem directory, but I’ve only found the following potion texture files:
potion.png, potion_overlay.png, splash_potion.png, and lingering_potion.png

There doesn’t seem to be any textures specific to each type of potion. Is the colouration of each potion type designated in the game code or a json file somewhere? Is a data pack required as opposed to a texture pack?

2 Answers

Unfortunately, the default potion colours are used by adding colour filters to the potion texture you found. The default potion colours are hardcoded into the game. The only way to change the way the colour filter works is to put an NBT tag on the potion item with a number representing the colour of the potion. The game automatically changes the colour of the texture to match the number you select.

This tag is called CustomPotionColor, and the formula to find the correct value is (R << 16) + (G << 8) + B.

Sample:

give @p minecraft:potion{CustomPotionColor:16777215}

The only way to make a colour as the default colour is to set up a system that can detect a potion in your inventory and automatically replace it.

Answered by ExpertCoder14 on July 29, 2021

this unfortunately is impossible...

...because of the way the textures are handled. like ExpertCoder said, you can create your own custom in-game colors, likewise with leather armor. because of that, Minecraft takes the potion textures (which have a transparent gray texture by default) and applies an "overlay" of sorts to give it the colors it wants. since those colors are coded into the game itself, and not accessible by the player (in a way that doesn't class as a mod), you can't directly edit it.

Answered by EarthToAccess on July 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP