Package noppes.npcs.api
Interface ISkinOverlay
-
public interface ISkinOverlayA 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetAlpha()booleangetBlend()intgetColor()booleangetGlow()floatgetOffsetX()floatgetOffsetY()floatgetOffsetZ()floatgetSize()floatgetSpeedX()floatgetSpeedY()StringgetTexture()floatgetTextureScaleX()floatgetTextureScaleY()voidsetAlpha(float alpha)Sets the transparency of the overlay, from 0 to 1.voidsetBlend(boolean blend)Sets whether this overlay blends on top of bottom textures at any alpha value.voidsetColor(int color)voidsetGlow(boolean glow)Sets whether this overlay glows in the dark or not.voidsetOffset(float offsetX, float offsetY, float offsetZ)Sets the amount in each direction by which the overlay will be offset from the entity.voidsetSize(float size)Sets the size of the entire overlay when rendered on the entity.voidsetSpeed(float speedX, float speedY)Sets the "texture speed" by which the texture shifts on each render tick.voidsetTexture(String texture)Sets the directory texture of the overlay.voidsetTextureScale(float scaleX, float scaleY)Sets the texture scale of the overlay.
-
-
-
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 scalescaleY- 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 speedspeedY- 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 offsetoffsetY- vertical render offsetoffsetZ- depth render offset
-
getOffsetX
float getOffsetX()
-
getOffsetY
float getOffsetY()
-
getOffsetZ
float getOffsetZ()
-
-