Files
TiedUp-/src/main/java/com/tiedup/remake/entities/ISkinnedEntity.java
NotEvil f6466360b6 Clean repo for open source release
Remove build artifacts, dev tool configs, unused dependencies,
and third-party source dumps. Add proper README, update .gitignore,
clean up Makefile.
2026-04-12 00:51:22 +02:00

28 lines
926 B
Java

package com.tiedup.remake.entities;
import net.minecraft.resources.ResourceLocation;
/**
* Interface for entities that provide their own skin texture.
*
* <p>This interface eliminates instanceof cascades in renderers by allowing
* each entity subclass to define its own texture logic polymorphically.
*
* <p><b>Issue #19:</b> 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.
*
* <p>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();
}