#A more user-friendly way to use player heads in recipes

82 messages · Page 1 of 1 (latest)

dull forge
#

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:

plain sandalBOT
#

Paste version of message.js from @dull forge

clever nymphBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

stoic python
#

you need quotation marks around the player names i think. you would need to do:
head_1('farmersdelight:tomato', '{SkullOwner:"JimmyHere"}')

dull forge
#

Oh? Ill giv that a try later on!

dull forge
dull forge
#

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

dull forge
#

still no news on an easier way to get player heads by username rather than UUID?

stoic python
plain sandalBOT
#

[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)

dull forge
#

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

stoic python
#

can try asking them

dull forge
#

will do, just gonna surf through the search first

queen bramble
#

you can use UUID directly with .putUUID

#

if you need help you can ask me

dull forge
#

oh? how do, if u dont mind my asking?

#

im still fairly new, so i might b a bit of a derp

queen bramble
#

first you need to teach me how does a head work xD do you have a wiki link or something

dull forge
#

well

#

heads in NBT store the UUID as 4 numerics

queen bramble
#

let me see wiki on player head

dull forge
#
Minecraft Wiki

A head or skull is a block modeled after the head of a specific entity. There are seven types of heads: player (Steve's head by default), zombie, skeleton, wither skeleton, creeper, piglin, and...

queen bramble
#

ok, got it, launching game here

queen bramble
#

@dull forge I have bad news

dull forge
#

uh oh...

#

giv it to me straight, doc

#

says the pan/les, poly, trans gorl

queen bramble
#

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

dull forge
#

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

queen bramble
#

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

queen bramble
#

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

dull forge
#

actually, it's in tandem w Player Mobs, so some of the users wont ever be seen in another person's world, lol

queen bramble
#

@dull forge now talking about the recipe, did you managed it to work?

#

i think you need to remove the ' '

#

to make it work

dull forge
#

im actually done w MC for the night, ill try it when i get home tomorrow

dull forge
#

where would u say i'd need to remove the 's?

queen bramble
#

head_1('farmersdelight:tomato', '{SkullOwner:JimmyHere}')

to this:
head_1('farmersdelight:tomato', {SkullOwner:JimmyHere})

scenic wave
#

well, it shouldn't matter

#

plus lat will scream at you heh

queen bramble
#

make the typewrapper work

plain sandalBOT
#
lat

[Quote ➤](#1109891547979321414 message) pls dont use object verison of nbt

scenic wave
queen bramble
#

😠

scenic wave
queen bramble
#

NBT.toCompoundTag({SkullOwner: "JimmyHere"})

#

?

#

or something

#

don't use NBT. too much

dull forge
queen bramble
#

checked here, it is NBT.toTagCompound

dull forge
dull forge
#

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?

karmic crow
#

Does milling even support NBT ingredients?

dull forge
#

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

dull forge
clever nymphBOT
#

Ticket re-opened!

dull forge
#

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

dull forge
#

i kind of need to have some way to fix my issues concerning /reload breaking my recipes being able to work

stoic python
#

what does the log say after you do /reload ? Do all recipes Break or only some of them?

dull forge
#

id check, but the server is being stupid

#

nvm

dull forge
#

only the head milling recipes

stoic python
#

and the kubejs server log doesn't say anything about those?

dull forge
#

Nothing out of the ordinary

#

It's as if when i use the command, the .weakNBT gets treated as .strongNBT

dull forge
#

Idk y it would do that, but it's very annoying