ContentTweaker

ContentTweaker

27M Downloads

Possible to copy texture/model of existing item?

WACriminalG2 opened this issue ยท 2 comments

commented

Thermal Foundation includes a non-block geode item (thermalfoundation:geode) that I'd like to create variants of for the modpack I'm developing. They don't need to look different, they just need to process differently in my modular machines.

Looking through the documentation, I wasn't sure...is there a quick way to create new items and have them copy the textures/models from an existing item? My first instinct after reading the document would be to try something like this:

#loader contenttweaker

import crafttweaker.item.IItemDefinition;
import crafttweaker.item.IItemStack;
import mods.contenttweaker.Item;
import mods.contenttweaker.IResourceLocationSupplier;
import mods.contenttweaker.ResourceLocation;

var FireyGeode = VanillaFactory.createItem("Firey_Geode");
FireyGeode.displayName = "Firey Geode";
FireyGeode.itemTextureLocationSupplier = <thermalfoundation:geode>.itemTextureLocationSupplier;

...but my gut is usually wrong about these things. I suppose I could find and copy the texture over into the resource folder, but I just wanted to see if there was a simpler way to achieve the same effect.

commented

You can try to modify the created firey_geode.json model file to point to the same texture location as TF.

commented

OK, I was able to get it working. I ended up just doing it the normal way.