Jump to content

Recommended Posts

Posted

So I'm trying to make an animated horse armor texture (the actual armor not the item), is there any way to do this?

I saw this link but couldn't find what the post referred to.

I've looked around and all I could think of was

a) using reflection inside an onClientTick event to change the texture

b) making a PR to forge to put a hook inside the HorseArmorType enum class's getArmorTexture() method to allow modders to return a custom texture

 

which one should I use, or is there another way?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
37 minutes ago, Cadiboo said:

which one should I use, or is there another way?

public String getHorseArmorTexture(net.minecraft.entity.EntityLiving wearer, ItemStack stack)

Which exists inside the Item class.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
57 minutes ago, Animefan8888 said:

public String getHorseArmorTexture(net.minecraft.entity.EntityLiving wearer, ItemStack stack)

Which exists inside the Item class.

I'll go quietly...

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

It isn't exactly animatable though, the texture location is cached

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
41 minutes ago, Cadiboo said:

It isn't exactly animatable though, the texture location is cached

Define animated if you mean like fire, return a different texture based on world time, if you dont you will have to manually render this in RenderLivingEvent.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
56 minutes ago, Animefan8888 said:

Define animated if you mean like fire, return a different texture based on world time,

the texture's location from getHorseArmorTexture is cached, and getHorseArmorTexture is only called when something about the horse changes (like putting a saddle on it or feeding it)

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
1 minute ago, Cadiboo said:

the texture's location from getHorseArmorTexture is cached, and getHorseArmorTexture is only called when something about the horse changes (like putting a saddle on it or feeding it) 

Well then you could simulate that if you wanted to, most likely, but you could also

1 hour ago, Animefan8888 said:

manually render this in RenderLivingEvent.

as an alternative.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
1 minute ago, Animefan8888 said:

Well then you could simulate that if you wanted to, most likely, but you could also manually render this in RenderLivingEvent as an alternative.

Yeah, the random updates actually fits in with my theme more, but how would I disable the normal rendering of the armor? Would I use a transparent texture?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
1 minute ago, Cadiboo said:

Yeah, the random updates actually fits in with my theme more, but how would I disable the normal rendering of the armor? Would I use a transparent texture?

I believe so, also the first string you pass in to the EnumHelper.addArmor will point to the name of the armor at "textures/entity/horse/armor/horse_armor_" + name

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
Just now, Animefan8888 said:

I believe so, also the first string you pass in to the EnumHelper.addArmor will point to the name of the armor at "textures/entity/horse/armor/horse_armor_" + name

Yeah, this is solved, but I should have started out with what I was trying to do rather than my solution.
I'm trying to have a material that (ore, block, ingot, armor, tools etc.) that switches between 2 textures at a random interval.

I've gotten all the block models to work and now I'm moving on to the items. I'm doing horse armors first because I can't figure out how custom item models work. 

My problem was that I couldn't use 2 textures for the horse armor enum.

 

Heres my code if it helps anyone in the future

Switching between 2 textures:

ItemModHorseArmor.java#L41-L50

Normal horse armor enum

ModEnums.java#L227-L239

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.