Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
961 stars 546 forks source link

added custom texture support for everything but heads #4075

Closed Kevin-writes-code closed 8 months ago

Kevin-writes-code commented 8 months ago

Description

Minecraft supports custom Textures for items since 1.14 and I thought it would be a great addition to allow TexturePack creators to add custom textures to ingots, items and so on.

Proposed changes

I added added customModelData to each items Metadata during registration, excluding heads since that'd break their textures. I also added a setter for the counter so add-ons can claim their own range for compatibility. Furthermore, and here I am a little uncertain, I had to change a line in customTextureService to not reset the customModelData. The provided Tests all passed and I am currently testing the changes on a private server. The variable customModelData could be used to get item-ids in guide.

Related Issues (if applicable)

Checklist

github-actions[bot] commented 8 months ago
Pro Tip! You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. โค๏ธ Branch naming convention Label
feature/** ๐ŸŽˆ Feature
fix/** โœจ Fix
chore/** ๐Ÿงน Chores
api/** ๐Ÿ”ง API
performance/** ๐Ÿ’ก Performance Optimization
compatibility/** ๐Ÿค Compatibility

If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! ๐Ÿ‘€

ybw0014 commented 8 months ago

We have item-models.yml, and some resource packs are already using this file.