#Replacing an item texture

21 messages · Page 1 of 1 (latest)

proud drum
#

I have an item I want to replace the texture of, via kubeJS.

I made a texture I liked using

event.create('sweg:cobalt_dust')
    .displayName("Cobalt Dust")
    .textureJson({
        layer0: "thermal:item/iron_dust"
    })
    .color(0, "#2665ff")

But I recently found JAOCPA which adds a bunch of missing ore processing items. However, I would rather use the texture for cobalt dust that I was able to create above.

The following code only partially works for some reason (see video, first cobalt dust is the one I made, but the jaocpa one is still the output for various jaocpa recipes)

// replace jaopca cobalt dust with better looking dust in all recipes
event.replaceInput('jaopca:dusts.cobalt', 'sweg:cobalt_dust')
event.replaceOutput({}, 'jaopca:dusts.cobalt', 'sweg:cobalt_dust')

Not all the recipes are converted and I think it is because jaopca generates the recipes dynamically, and perhaps kubejs runs before that? Considering I just want to replace the texture though, creating a new item is probably the wrong way to do it. I am open to other suggestions as to how to code this.

teal chasmBOT
#

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

silk grotto
#

Replacing textures doesn't require kubejs

#

It's a vanilla feature

proud drum
#

my issue is, the texture I created for the new item was done with kubeJS. I don't have a texture or anything to put into the assets folder

#

Is there like a way to dump the texture file from kube?

silk grotto
#

By that you mean the iron dust texture with the red hue?

#

Or rgb I mea

#

N

#

Ffs phone keyboard

proud drum
#

pretty much

#

I originally created the dust item because I was making new items for ore processing. Then I found a mod that does it

silk grotto
#

In that case not really, best option is to go to thermal's github or jar file and extract the texture

#

Then just apply the same hue with something like paint.net

proud drum
#

I can see about playing around with image editing the iron dust, I was just hoping there might be a way with KubeJS to say, modify the texture of an existing item like you can when creating a custom one. I am assuming KubeJS doesn't have that functionality?

silk grotto
#

I'm a bit confused by your wording

#

If it's just the texture that needs changing, that's just vanilla

If you need to create an item with an existing texture from a mod, there's .texture()

proud drum
#

So say I event.create('magic_steak'). I can chain functions to this like .displayName(name) and .glow(true/false), any of the functions which are listed here:
https://wiki.latvian.dev/books/kubejs-legacy/page/custom-items

Are the functions in the above docs applicable to the 'item.modification' event, from the docs here:
https://wiki.latvian.dev/books/kubejs-legacy/page/item-modification

Is there some way I can do something like event.modify('minecraft:ender_pearl').displayName(newName).texture(...)?

It would be nice to programmatically replace textures for several dust items based on thermal's iron dust, for example

solar rose
#

textures are controlled by model files

#

you can dynamically generate those with kubejs, and i believe apply tinting to them, but it would be kinda advanced

proud drum
#

Alright. I think ultimately, this is probably going to be more effort than the benefit will be worth. Like if I use a paint program to modify the dust texture, then I'll start to want to modify other textures to clean things up, and at that point I am manually creating a texture pack. I have enough to focus on with recipe modification / balancing and this will do more for the modpack than pretty pictures. So I am just going to abandon doing this and use the default textures. I appreciate the help / suggestions though