public class WTiledSprite extends WSprite
currentFrame, currentFrameTime, frames, frameTime, lastFrame, singleImage, tint| Constructor and Description |
|---|
WTiledSprite(int tileWidth,
int tileHeight,
net.minecraft.util.Identifier image)
Create a tiled sprite.
|
WTiledSprite(int tileWidth,
int tileHeight,
int frameTime,
net.minecraft.util.Identifier... frames)
Create a new animated tiled sprite.
|
WTiledSprite(int tileWidth,
int tileHeight,
int frameTime,
Texture... frames)
Create a new animated tiled sprite.
|
WTiledSprite(int tileWidth,
int tileHeight,
Texture image)
Create a tiled sprite.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getTileHeight()
Gets the tile height of this sprite.
|
int |
getTileWidth()
Gets the tile width of this sprite.
|
void |
paintFrame(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
Texture texture)
Paints a single frame for this sprite.
|
WTiledSprite |
setTileHeight(int tileHeight)
Sets the tile height of this sprite.
|
void |
setTileSize(int width,
int height)
Sets the tiling size.
|
WTiledSprite |
setTileWidth(int tileWidth)
Sets the tile width of this sprite.
|
canResize, paint, setFrames, setFrames, setImage, setImage, setOpaqueTint, setTint, setUvaddPainters, addTooltip, canFocus, createPeers, cycleFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, hit, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onHidden, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseScroll, onMouseUp, onShown, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, setSize, tick, validatepublic WTiledSprite(int tileWidth,
int tileHeight,
net.minecraft.util.Identifier image)
tileWidth - The width a tiletileHeight - The height of a tileimage - The image to tilepublic WTiledSprite(int tileWidth,
int tileHeight,
int frameTime,
net.minecraft.util.Identifier... frames)
tileWidth - The width a tiletileHeight - The height of a tileframeTime - How long in milliseconds to display for. (1 tick = 50 ms)frames - The locations of the frames of the animation.public WTiledSprite(int tileWidth,
int tileHeight,
Texture image)
tileWidth - The width a tiletileHeight - The height of a tileimage - The image to tilepublic WTiledSprite(int tileWidth,
int tileHeight,
int frameTime,
Texture... frames)
tileWidth - The width a tiletileHeight - The height of a tileframeTime - How long in milliseconds to display for. (1 tick = 50 ms)frames - The locations of the frames of the animation.public void setTileSize(int width,
int height)
width - the new tiling widthheight - the new tiling heightpublic int getTileWidth()
public int getTileHeight()
public WTiledSprite setTileWidth(int tileWidth)
tileWidth - the new tile widthpublic WTiledSprite setTileHeight(int tileHeight)
tileHeight - the new tile height@Environment(value=CLIENT)
public void paintFrame(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
Texture texture)
WSpritepaintFrame in class WSpritematrices - the rendering matrix stackx - the X coordinate to draw it aty - the Y coordinate to draw it attexture - the texture to draw