Interface ISkinOverlay


  • public interface ISkinOverlay
    A skin overlay object for both NPCs and players. Several skin overlays at a time can be layered on top of each other. In an NPC's case, the old overlay texture is now the skin overlay with ID 0.

    Modifying these attributes, an overlay can be made to look like a powered creeper effect, just a new skin, or both!

    • Method Detail

      • setTexture

        void setTexture​(String texture)
        Sets the directory texture of the overlay. Does not support URLs.
        Parameters:
        texture - the texture path
      • getTexture

        String getTexture()
      • setGlow

        void setGlow​(boolean glow)
        Sets whether this overlay glows in the dark or not.
        Parameters:
        glow - whether to glow
      • getGlow

        boolean getGlow()
      • setBlend

        void setBlend​(boolean blend)
        Sets whether this overlay blends on top of bottom textures at any alpha value.
        Parameters:
        blend - whether to blend
      • getBlend

        boolean getBlend()
      • setAlpha

        void setAlpha​(float alpha)
        Sets the transparency of the overlay, from 0 to 1.
        Parameters:
        alpha - the alpha value
      • getAlpha

        float getAlpha()
      • setSize

        void setSize​(float size)
        Sets the size of the entire overlay when rendered on the entity. By default, overlays render slightly on top of the entity's model.
        Parameters:
        size - the overlay size
      • getSize

        float getSize()
      • setColor

        void setColor​(int color)
      • getColor

        int getColor()
      • setTextureScale

        void setTextureScale​(float scaleX,
                             float scaleY)
        Sets the texture scale of the overlay. Higher values will "zoom in" to the texture more.
        Parameters:
        scaleX - horizontal scale
        scaleY - vertical scale
      • getTextureScaleX

        float getTextureScaleX()
      • getTextureScaleY

        float getTextureScaleY()
      • setSpeed

        void setSpeed​(float speedX,
                      float speedY)
        Sets the "texture speed" by which the texture shifts on each render tick. Used to create a powered creeper effect! This does not move the entire overlay, it just moves the position at which the texture begins rendering.
        Parameters:
        speedX - horizontal speed
        speedY - vertical speed
      • getSpeedX

        float getSpeedX()
      • getSpeedY

        float getSpeedY()
      • setOffset

        void setOffset​(float offsetX,
                       float offsetY,
                       float offsetZ)
        Sets the amount in each direction by which the overlay will be offset from the entity.
        Parameters:
        offsetX - horizontal render offset
        offsetY - vertical render offset
        offsetZ - depth render offset
      • getOffsetX

        float getOffsetX()
      • getOffsetY

        float getOffsetY()
      • getOffsetZ

        float getOffsetZ()