mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-28 23:10:32 +00:00
Draw small decoration tops in palette previews
Icons now show each box's top above its front, half as deep and lit as Minecraft lights each side, so sea pickles, candles and eggs show caps. Model used: Claude Opus 5.5
This commit is contained in:
1 parent
360f38a819
commit
065c6fed1d
2 files changed
+95
-46
No files matched your search
@@ -41,15 +41,22 @@ public final class ModelFrontViewTest {
|
||||
public void bodyShowsItsOwnPartOfTheTexture() throws Exception {
|
||||
ModelFrontView front = draw(SEA_PICKLE);
|
||||
|
||||
assertEquals(texture.getRGB(0, 5), front.image().getRGB(6, 10));
|
||||
assertEquals(texture.getRGB(3, 10), front.image().getRGB(9, 15));
|
||||
assertEquals(litAsFront(0, 5), front.image().getRGB(6, 7));
|
||||
assertEquals(litAsFront(3, 10), front.image().getRGB(9, 12));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void topShowsAboveTheFrontOverThePlaneJustUnderIt() throws Exception {
|
||||
ModelFrontView front = draw(SEA_PICKLE);
|
||||
|
||||
assertEquals(texture.getRGB(5, 2), front.image().getRGB(7, 5));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void crossedPlaneIsMirroredWhereItsUvRunsBackwards() throws Exception {
|
||||
ModelFrontView front = draw(SEA_PICKLE);
|
||||
|
||||
assertEquals(texture.getRGB(1, 3), front.image().getRGB(8, 9));
|
||||
assertEquals(litAsFront(1, 1), front.image().getRGB(8, 4));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -70,6 +77,10 @@ public final class ModelFrontViewTest {
|
||||
assertTrue(ModelFrontView.fillsMostOfItsSpotFromAbove(elements(PRESSURE_PLATE)));
|
||||
}
|
||||
|
||||
private int litAsFront(int textureX, int textureY) {
|
||||
return 0xFF000000 | BlockPreviewColors.shade(texture.getRGB(textureX, textureY), CubeFace.SOUTH.shade());
|
||||
}
|
||||
|
||||
private ModelFrontView draw(String elements) throws Exception {
|
||||
ModelFrontView front = ModelFrontView.draw(elements(elements), TEXTURES, name -> texture);
|
||||
assertNotNull(front);
|
||||
|
||||
Reference in new issue
Block a user