Fixed broken fire texture on villagers/zombie villagers

This commit is contained in:
Sollace 2019-06-24 14:05:07 +02:00
parent 229e0c3c30
commit 67f1e1edbd
2 changed files with 10 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.render.entity.feature.VillagerClothingFeatureRenderer; import net.minecraft.client.render.entity.feature.VillagerClothingFeatureRenderer;
import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.entity.passive.VillagerEntity; import net.minecraft.entity.passive.VillagerEntity;
import net.minecraft.resource.ReloadableResourceManager; import net.minecraft.resource.ReloadableResourceManager;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
@ -32,9 +33,11 @@ public class RenderPonyVillager extends RenderPonyMob.Caster<VillagerEntity, Mod
@Override @Override
public void bindTexture(Identifier texture) { public void bindTexture(Identifier texture) {
if (texture != SpriteAtlasTexture.BLOCK_ATLAS_TEX) {
if (!"minelittlepony".contentEquals(texture.getNamespace())) { if (!"minelittlepony".contentEquals(texture.getNamespace())) {
texture = new Identifier("minelittlepony", texture.getPath()); texture = new Identifier("minelittlepony", texture.getPath());
} }
}
super.bindTexture(texture); super.bindTexture(texture);
} }

View file

@ -7,6 +7,7 @@ import com.minelittlepony.util.resources.ITextureSupplier;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.entity.EntityRenderDispatcher; import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.render.entity.feature.VillagerClothingFeatureRenderer; import net.minecraft.client.render.entity.feature.VillagerClothingFeatureRenderer;
import net.minecraft.client.texture.SpriteAtlasTexture;
import net.minecraft.entity.mob.ZombieVillagerEntity; import net.minecraft.entity.mob.ZombieVillagerEntity;
import net.minecraft.resource.ReloadableResourceManager; import net.minecraft.resource.ReloadableResourceManager;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
@ -31,9 +32,11 @@ public class RenderPonyZombieVillager extends RenderPonyMob.Caster<ZombieVillage
@Override @Override
public void bindTexture(Identifier texture) { public void bindTexture(Identifier texture) {
if (texture != SpriteAtlasTexture.BLOCK_ATLAS_TEX) {
if (!"minelittlepony".contentEquals(texture.getNamespace())) { if (!"minelittlepony".contentEquals(texture.getNamespace())) {
texture = new Identifier("minelittlepony", texture.getPath()); texture = new Identifier("minelittlepony", texture.getPath());
} }
}
super.bindTexture(texture); super.bindTexture(texture);
} }