BuddingCrystals

BuddingCrystals

265k Downloads

Custom Textures?

bobrob2004 opened this issue ยท 10 comments

commented

I added a custom item to the game using Kubejs and I want to use this mod to create custom drops. However, I am getting missing textures when I try to use my custom textures. In the JSON file I have the following:

"texture": "kubejs:item/custom_item",

Is there a different file path to put my custom textures in that I am supposed to be using? The wiki isn't very clear about it.

commented

The custom item does have a texture, it's just the items generated in the BuddingCrystals that are missing.

This is what I have in the crystal JSON file:

{
"translation": "Tanzanite",
"texture": "kubejs:item/tanzanite",
"growth_chance": 5,
"dropped_item": "kubejs:tanzanite",
"normal_drop_chance": 2,
"max_drop_chance": 4
}

Here is my latest log: https://gist.github.com/bobrob2004/7a8f8ddd34bb3f2f697bca35e4f1e618

The custom item is just a gem that I want to have and work similar to the amethyst crystal. I set up everything in Kubejs and that part seems to be working perfectly. I just can't figure out how to get the texture to work with Budding Crystals.

commented

According to the log, the texture file cannot be found: Could not find resource in pre-load: kubejs:textures/item/tanzanite.png. What's the complete folder path of the texture file?

commented

The complete folder path from the instance folder is:

kubejs:assets/kubejs/textures/item/tanzanite.png

Is that how I should put it in the JSON file?

commented

No, the texture path you currently have in the JSON should work. Can you show the KubeJS script that adds this item?

commented

onEvent('item.registry', event => {

event.create('calculator:tanzanite')
	.displayName('Tanzanite');	

});

It's a different folder path, but I copied the texture file to the kubejs folder when I was trying different things.

commented

At this point I have no idea anymore. I'll have to look into this a bit deeper in a few hours and test some stuff myself. I'll get back to you when I know more.

commented

I've spoken with the author of the DynamicAssetGenerator library I am using to generate the textures for the blocks and items in BuddingCrystals and he informed me that this is a known limitation when KubeJS and DynamicAssetGenerator are used together.

The suggested fix for this is to provide the textures you will be using in the crystal JSON via a proper resource pack instead of the resources included in the KubeJS scripts. See https://minecraft.fandom.com/wiki/Resource_pack for the documentation on how to make a proper resource pack.

Please be sure to get back to me with your findings when you've tried this.

commented

Creating a proper resource pack worked perfectly. Thank you for taking the time to help me.

commented

Awesome, thank you for the feedback. I'll add a note about this to the wiki.

commented

Any block or item texture will work, that's why the wiki doesn't specify it any further.

Does your custom item have a missing texture as well or only the blocks and items generated by BuddingCrystals?
Please show your full crystal JSON, the log file (preferably via https://gist.github.com) when you started the game with the custom item and crystal JSON present and more info about your custom item.