Skip to content

Commit

Permalink
Removed more unneeded code from DialogueAnimationData
Browse files Browse the repository at this point in the history
  • Loading branch information
Dweblenod committed Apr 10, 2024
1 parent d74cedf commit 094eb44
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.AbstractTexture;
import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite;
import net.minecraft.client.renderer.texture.SimpleTexture;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.resources.ResourceLocation;

Expand Down Expand Up @@ -67,12 +66,7 @@ public ResourceLocation getRenderPath(String spriteType)
//if the sprite for the given emotion cannot be found, it will try to render the generic sprite instead. If the generic sprite cannot be found, the invalid texture is allowed to proceed
if(abstractTexture == MissingTextureAtlasSprite.getTexture())
{
ResourceLocation fallbackSpritePath = new ResourceLocation(Minestuck.MOD_ID, "textures/gui/dialogue/entity/" + spriteType + "/" + GENERIC_EMOTION + ".png");
if(Minecraft.getInstance().getTextureManager().getTexture(fallbackSpritePath) instanceof SimpleTexture)
{
return fallbackSpritePath;
} else
return spritePath;
return new ResourceLocation(Minestuck.MOD_ID, "textures/gui/dialogue/entity/" + spriteType + "/" + GENERIC_EMOTION + ".png");
}

return spritePath;
Expand Down

0 comments on commit 094eb44

Please sign in to comment.