Question about glowing item models
thiakil opened this issue · 3 comments
I was told your mod makes some item models glow, using ASM.
As I don't really understand Kotlin, are you able to provide a brief rundown of how you do this?
`public class ItemMagicWand extends ItemMod implements IGlowingItem {
public ItemMagicWand() {
super("magic_wand");
setMaxStackSize(1);
}
@SideOnly(Side.CLIENT)
@Override
public int packedGlowCoords(@Nonnull ItemStack itemStack, @Nonnull IBakedModel iBakedModel) {
return 0xf000f0;
}
@SideOnly(Side.CLIENT)
@Nullable
@Override
public IBakedModel transformToGlow(@Nonnull ItemStack itemStack, @Nonnull IBakedModel iBakedModel) {
return IGlowingItem.Helper.wrapperBake(iBakedModel, false, 1);
}
@SideOnly(Side.CLIENT)
@Override
public boolean shouldDisableLightingForGlow(@Nonnull ItemStack itemStack, @Nonnull IBakedModel iBakedModel) {
return true;
}
}`
From Wizardry which uses LibLib. (the glowing texture is a seperate texture for the tips of the item)