Feature request: support minecraft-url textures
SlimeDog opened this issue ยท 2 comments
Is your feature request related to a problem? Please describe.
If a custom head is loaded directly into Minecraft.net, there is no base64 value, only the Minecraft-URL value. Normally, the Minecraft.net head texture can be retrieved by player name, but in these cases -- custom heads loaded as a player, then the player reverts to their real skin -- the head cannot be retrieved by the player name (that will return the players current head). It can be retrieved with the Minecraft-URL value, which is provided when the head is created, but that value is not accessible otherwise (that I can find).
Describe the solution you'd like
Support Minecraft-URL textures as a PLAYER_HEAD option.
PLAYER_HEAD currently supports base64 textures, for example
identifier-luckyblock:
id: PLAYER_HEAD
data-value: 3
skull-texture: 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzcxOTMwMjc4ZjAyOWM1Nzc4Yzg1YzA0NzVhMzdmYWM4YWNkMzg1MDc0MmFhZTZhMzU0MmFjZGU0NDg3ZDYzIn19fQ=='
A similar syntax could be used for Minecraft-URL textures, for example
identifier-luckyblock:
id: PLAYER_HEAD
data-value: 3
minecraft-texture: '371930278f029c5778c85c0475a37fac8acd3850742aae6a3542acde4487d63'
Both of these should produce the same dark-gray luckyblock.
This request is similar to the solution provided by DeluxeMenus. Unfortunately, their code is not public, but the call to textures.minecraft.net is straightforward. With the example above
http://textures.minecraft.net/texture/371930278f029c5778c85c0475a37fac8acd3850742aae6a3542acde4487d63
Okay so, I have added this in the latest snapshot.
Since minecraft.net textures bytes are always less than 100 and skull-texture maps are always greater than 100 they simply use the same skull-texture
identifier as it is easy to distinguish the two. Simply add url-
at the beginning before typing your Minecraft texture value. This input will take either the Minecraft texture value OR it will take ANY URL that leads to a texture value so simply pasting http://textures.minecraft.net/texture/13e8bbc8d174aecd6b46888fa63f9bade14b042e5e17063139d67f8e0163a38
would work as well.
I have no idea why but I cannot get your provided URL to work, however, I was able to get any other URL I tried to function so I am not sure what to make of it. It may be my specific MC version as it looks like the texture map is missing several faces. Let me know if this is an ItemJoin issue as every other texture seems to work fine.
The latest snapshot will now support the following;
skull1:
id: PLAYER_HEAD
skull-texture: 'url-13e8bbc8d174aecd6b46888fa63f9bade14b042e5e17063139d67f8e0163a38'
skull2:
id: PLAYER_HEAD
skull-texture: 'url-http://textures.minecraft.net/texture/955d611a878e821231749b2965708cad942650672db09e26847a88e2fac2946'
Btw, tip; data-value
no longer exists for ItemJoin. The proper way to specify these now is id: PLAYER_HEAD:3
but you should also note that PLAYER_HEAD no longer needs the data-value 3 since it no longer shares the data ids with creeper/zombie/etc heads.
Link; https://ci.craftationgaming.com/job/ItemJoin/717/
Remember to remove your old ItemJoin.jar file
Hopefully, that makes sense, it's quite late lol.
Let me know!~
Spigot 1.16.5
ItemJoin 5.2.2-b717
Okay so, I have added this in the latest snapshot.
Excellent!
I have no idea why but I cannot get your provided URL to work, however, I was able to get any other URL I tried to function so I am not sure what to make of it. It may be my specific MC version as it looks like the texture map is missing several faces. Let me know if this is an ItemJoin issue as every other texture seems to work fine.
Probably because the head cited above has been replaced. However, the current value works great:
id: PLAYER_HEAD
skull-texture: 'url-c7b187e38b407feabaf190879d98a67f4c7052f3201f72e44571f537ea89d4c7'
Thank you.