So I'm using Create milling to make player heads mill into unique things depending on who's head it is. Unfortunately, using SkullOwner:<username_here> appears to not work and i need to pull the UUID and Name values associated to the head as that is how the item NBT is stored as which is EXTREMELY tedious if i wanted to do this in bulk for a variety of player heads, which i wish to do. It also makes it so if i look in JEI for the recipe, the player's skin will not render, which is kinda important. is there some way i can convert the name into UUID automatically or will i need to leave a request to allow the mod to look for player heads w SkullOwner in simpler terms?
Here is the script i am working with and manually converting since i learned the hard way KubeJS doesnt like what i did as it stands:
#A more user-friendly way to use player heads in recipes
82 messages · Page 1 of 1 (latest)
Paste version of message.js from @dull forge
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you need quotation marks around the player names i think. you would need to do:
head_1('farmersdelight:tomato', '{SkullOwner:"JimmyHere"}')
Oh? Ill giv that a try later on!
just tried that and it didn't work, i guess ill hav to do it the hard way...
Is it perhaps possible to make a script that can make JEI show the player skin on the recipe UI? That's the real stinker im having w the method i need to use here
still no news on an easier way to get player heads by username rather than UUID?
idk if this helps #1086733445058809856 message, could also try searching this discord with the keywords player heads
[Quote ➤](#1086733445058809856 message) Solved it, just needed to import net.minecraft.nbt CompoundTag and IntArrayTag to construct the nbt manually, plus java.lang.Integer to instantiate the IntArrayTag with an array of Integer.valueOf(n)
i saw this earlier, but im not sure how to implement it since they solved it and said wut they did w/o showing wut they did, lol
im a bit of a derp
can try asking them
will do, just gonna surf through the search first
oh? how do, if u dont mind my asking?
im still fairly new, so i might b a bit of a derp
first you need to teach me how does a head work xD do you have a wiki link or something
let me see wiki on player head
ok, got it, launching game here
@dull forge I have bad news
to have a skin it needs to connect to internet but KubeJS does not allow it.
I can try to add a mod that adds that capability and try to use that via KubeJS
i will try Just Player Heads
that's...odd
when i used similar methods with CraftTweaker, using the SkullOwner:<user_here> in leu of the UUID crap worked flawlessly as it somehow knew wut each head was supposed to be
as i said in an earlier message, using the UUID in the recipe allowed it to work, it's just not that easy to replicate over and over, even with variables
You just need Collective mod
const $HeadFunctions = Java.loadClass("com.natamus.collective_common_forge.functions.HeadFunctions")
BlockEvents.rightClicked("stone", event => {
const {player, hand} = event
if (hand.name() == "MAIN_HAND"){
let playerHead = $HeadFunctions.getPlayerHead(player.username, 1)
player.give(playerHead)
}
})
don't need to bother UUID, it does everything via playername
it works only if heads are cached, like playing with friends, etc
is it your intentions?
not from some random players?
oh ok, now i'm reading your original post
yes you are getting diff heads
nice
actually, it's in tandem w Player Mobs, so some of the users wont ever be seen in another person's world, lol
@dull forge now talking about the recipe, did you managed it to work?
i think you need to remove the ' '
to make it work
im actually done w MC for the night, ill try it when i get home tomorrow
where would u say i'd need to remove the 's?
head_1('farmersdelight:tomato', '{SkullOwner:JimmyHere}')
to this:
head_1('farmersdelight:tomato', {SkullOwner:JimmyHere})
no.
well, it shouldn't matter
plus lat will scream at you 
make the typewrapper work
[Quote ➤](#1109891547979321414 message) pls dont use object verison of nbt

😠

NBT.toCompoundTag({SkullOwner: "JimmyHere"})
?
or something
don't use NBT. too much
this made the game scream at me
i don't know the exact method, those NBT methods are very confusing
checked here, it is NBT.toTagCompound
it went through with no errors, but the recipe wont go through...
so apparently when i give myself a player head using the SkullOwner:<user> method, Kube will recognize it as valid and will let it pass
even .weakNBT() isnt liked...
IDEA ALERT!
is there any sort of majik way to change the NBT from UUID based to Simplistic?
Does milling even support NBT ingredients?
JEI shows it can and CraftTweaker allowed me to
but w how specific Kube is, id need to make it either not specific or auto-convert the NBT data
nvm, .weakNBT() was accepted, i just had to reload the game! XD
Ticket re-opened!
the only other issue i have is that the recipe at first wont display the player's skin until you do a /reload which is a JEI skill issue, but when doing /reload the recipes just refuse to work until i either do a world reopen or game restart
i kind of need to have some way to fix my issues concerning /reload breaking my recipes being able to work
what does the log say after you do /reload ? Do all recipes Break or only some of them?
only the head milling recipes
and the kubejs server log doesn't say anything about those?
Nothing out of the ordinary
It's as if when i use the command, the .weakNBT gets treated as .strongNBT
Idk y it would do that, but it's very annoying