package com.tiedup.remake.entities; import net.minecraft.resources.ResourceLocation; /** * Interface for entities that provide their own skin texture. * *
This interface eliminates instanceof cascades in renderers by allowing * each entity subclass to define its own texture logic polymorphically. * *
Issue #19: DamselRenderer had 6+ instanceof checks to determine * which texture method to call. With this interface, the renderer simply calls * {@link #getSkinTexture()} and each entity type returns the appropriate texture. * * @see DamselRenderer */ public interface ISkinnedEntity { /** * Get the skin texture for this entity. * *
Implementations should return the appropriate texture based on * the entity's current state (variant, skin selection, etc.). * * @return The texture ResourceLocation, never null */ ResourceLocation getSkinTexture(); }