diff options
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java index d49074f..5ef49ab 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTiledSprite.java @@ -52,6 +52,14 @@ public class WTiledSprite extends WSprite { tileHeight = height; } + public int getTileWidth() { + return tileWidth; + } + + public int getTileHeight() { + return tileHeight; + } + @Environment(EnvType.CLIENT) @Override public void paintFrame(int x, int y, Identifier texture) { @@ -65,7 +73,7 @@ public class WTiledSprite extends WSprite { x + tileXOffset, y + tileYOffset, // but using the set tileWidth and tileHeight instead of the full height and // width - tileWidth, tileHeight, + getTileWidth(), getTileHeight(), // render the current texture texture, // clips the texture if wanted |