diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28b409a..4da39c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,9 +134,9 @@ jobs: if-no-files-found: error retention-days: 30 path: | - build/libs/SkysGrassSlabs-1.1.0.118021.jar - build/libs/SkysGrassSlabs-1.1.0.118021-sources.jar - build/libs/SkysGrassSlabs-1.1.0.118021-javadoc.jar + build/libs/SkysGrassSlabs-1.1.1.118021.jar + build/libs/SkysGrassSlabs-1.1.1.118021-sources.jar + build/libs/SkysGrassSlabs-1.1.1.118021-javadoc.jar build/release/SHA256SUMS CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a5352..f7a1955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.1.1.118021 - Minecraft 1.18.2 + +- Corrected snowy grass slabs so their exposed top uses the snow texture + instead of remaining biome coloured green. +- Preserved the existing snowy side edges and all world data. + ## 1.1.0.118021 - Minecraft 1.18.2 - Added an automatic upgrade path for matching grass, dirt and dirt path slabs diff --git a/README.md b/README.md index 88cfe88..0961879 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ thin layer of turf. Grass spreads naturally between full blocks and slabs, while new Overworld terrain uses grass slabs to soften suitable one block steps. -This branch is for Minecraft 1.18.2. Version `1.1.0.118021` requires Forge +This branch is for Minecraft 1.18.2. Version `1.1.1.118021` requires Forge 40.3.0 or a compatible Forge 40 build and Java 17. ## Installation @@ -34,7 +34,7 @@ or updating world changing mods. - [Gameplay and recipes](docs/GAMEPLAY.md) - [Configuration](docs/CONFIGURATION.md) - [Upgrading an older world](docs/WORLD-UPGRADES.md) -- [Release notes](docs/RELEASE-1.1.0.118021.md) +- [Release notes](docs/RELEASE-1.1.1.118021.md) ## License diff --git a/docs/RELEASE-1.1.1.118021.md b/docs/RELEASE-1.1.1.118021.md new file mode 100644 index 0000000..da4a0e7 --- /dev/null +++ b/docs/RELEASE-1.1.1.118021.md @@ -0,0 +1,10 @@ +# Sky's Grass Slabs 1.1.1 for Minecraft 1.18.2 + +This update corrects the snowy appearance of grass slabs. When a grass slab +shows snowy side edges, its exposed top now uses the matching snow texture +instead of remaining green. + +All blocks, recipes, configuration options and world data remain compatible +with the previous Forge 1.18.2 release. + +Requires Minecraft 1.18.2, Forge 40.3.0 and Java 17. diff --git a/docs/WORLD-UPGRADES.md b/docs/WORLD-UPGRADES.md index d291993..4cdd5bd 100644 --- a/docs/WORLD-UPGRADES.md +++ b/docs/WORLD-UPGRADES.md @@ -6,7 +6,7 @@ world has been checked in game. ## Sky's Grass Slabs content -Install `SkysGrassSlabs-1.1.0.118021.jar` before opening a world that used an +Install `SkysGrassSlabs-1.1.1.118021.jar` before opening a world that used an earlier release. The permanent dirt slab, grass slab, path slab and turf IDs are unchanged. diff --git a/gradle.properties b/gradle.properties index 1ef8086..5358cab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -62,7 +62,7 @@ mod_name=Sky's Grass Slabs # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=LGPL-2.1-only # The mod version. See https://semver.org/ -mod_version=1.1.0.118021 +mod_version=1.1.1.118021 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/zone/moddev/mc/skysgrassslabs/SkysGrassSlabs.java b/src/main/java/zone/moddev/mc/skysgrassslabs/SkysGrassSlabs.java index 5241524..24c1b2c 100644 --- a/src/main/java/zone/moddev/mc/skysgrassslabs/SkysGrassSlabs.java +++ b/src/main/java/zone/moddev/mc/skysgrassslabs/SkysGrassSlabs.java @@ -26,7 +26,7 @@ public final class SkysGrassSlabs { /** Stable Forge mod identifier and resource namespace. */ public static final String MOD_ID = "skysgrassslabs"; public static final String NAME = "Sky's Grass Slabs"; - public static final String VERSION = "1.1.0.118021"; + public static final String VERSION = "1.1.1.118021"; public static final Logger LOGGER = LogManager.getLogger(); /** Registers content, configuration, world generation, and persistent state. */ diff --git a/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_snow.json b/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_snow.json index 1d55b0c..9733047 100644 --- a/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_snow.json +++ b/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_snow.json @@ -1,11 +1,11 @@ { "parent": "minecraft:block/block", - "textures": { "particle": "minecraft:block/dirt", "bottom": "minecraft:block/dirt", "top": "minecraft:block/grass_block_top", "side": "minecraft:block/grass_block_snow" }, + "textures": { "particle": "minecraft:block/dirt", "bottom": "minecraft:block/dirt", "top": "minecraft:block/snow", "side": "minecraft:block/grass_block_snow" }, "elements": [{ "from": [0, 0, 0], "to": [16, 8, 16], "faces": { "down": { "uv": [0, 0, 16, 16], "texture": "#bottom", "cullface": "down" }, - "up": { "uv": [0, 0, 16, 16], "texture": "#top", "cullface": "up", "tintindex": 0 }, + "up": { "uv": [0, 0, 16, 16], "texture": "#top", "cullface": "up" }, "north": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "north" }, "south": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "south" }, "west": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "west" }, diff --git a/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_top_snow.json b/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_top_snow.json index 496cb61..484d6e6 100644 --- a/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_top_snow.json +++ b/src/main/resources/assets/skysgrassslabs/models/block/grass_slab_top_snow.json @@ -1,11 +1,11 @@ { "parent": "minecraft:block/block", - "textures": { "particle": "minecraft:block/dirt", "bottom": "minecraft:block/dirt", "top": "minecraft:block/grass_block_top", "side": "minecraft:block/grass_block_snow" }, + "textures": { "particle": "minecraft:block/dirt", "bottom": "minecraft:block/dirt", "top": "minecraft:block/snow", "side": "minecraft:block/grass_block_snow" }, "elements": [{ "from": [0, 8, 0], "to": [16, 16, 16], "faces": { "down": { "uv": [0, 0, 16, 16], "texture": "#bottom", "cullface": "down" }, - "up": { "uv": [0, 0, 16, 16], "texture": "#top", "cullface": "up", "tintindex": 0 }, + "up": { "uv": [0, 0, 16, 16], "texture": "#top", "cullface": "up" }, "north": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "north" }, "south": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "south" }, "west": { "uv": [0, 0, 16, 8], "texture": "#side", "cullface": "west" }, diff --git a/src/test/java/zone/moddev/mc/skysgrassslabs/ProjectContractTest.java b/src/test/java/zone/moddev/mc/skysgrassslabs/ProjectContractTest.java index dc6f483..f694e12 100644 --- a/src/test/java/zone/moddev/mc/skysgrassslabs/ProjectContractTest.java +++ b/src/test/java/zone/moddev/mc/skysgrassslabs/ProjectContractTest.java @@ -32,14 +32,14 @@ public void playerAndMaintainerDocumentsExist() { assertTrue(Files.isRegularFile(Path.of("docs/GAMEPLAY.md"))); assertTrue(Files.isRegularFile(Path.of("docs/WORLD-UPGRADES.md"))); assertFalse(Files.exists(Path.of("docs/REPOSITORY.md"))); - assertTrue(Files.isRegularFile(Path.of("docs/RELEASE-1.1.0.118021.md"))); + assertTrue(Files.isRegularFile(Path.of("docs/RELEASE-1.1.1.118021.md"))); assertTrue(Files.isRegularFile(Path.of("docs/BETA-0.2.0.118021.md"))); } @Test public void releaseIdentityAndLicenseAreStable() throws Exception { String properties = Files.readString(Path.of("gradle.properties"), StandardCharsets.UTF_8); - assertTrue(properties.contains("mod_version=1.1.0.118021")); + assertTrue(properties.contains("mod_version=1.1.1.118021")); assertTrue(properties.contains("mod_license=LGPL-2.1-only")); assertEquals("LGPL-2.1-only", Files.readString(Path.of("LICENSE.spdx"), StandardCharsets.UTF_8).trim()); assertTrue(Files.readString(Path.of("NOTICE"), StandardCharsets.UTF_8) @@ -102,7 +102,7 @@ public void commonConfigAndWorldStateUsePermanentKeys() throws Exception { assertTrue(config.contains("push(\"compat\")")); assertTrue(config.contains("define(FORCE_REPLACE_BUILDINGBRICKS_SLABS, false)")); assertTrue(config.contains("define(FORCE_REPLACE_GRASS_SLABS_MOD_CONTENT, false)")); - assertTrue(main.contains("VERSION = \"1.1.0.118021\"")); + assertTrue(main.contains("VERSION = \"1.1.1.118021\"")); assertTrue(state.contains("skysgrassslabs_world_state")); assertTrue(state.contains("SCHEMA_VERSION = 1")); assertTrue(state.contains("schema_version")); @@ -190,9 +190,9 @@ public void continuousIntegrationTargetsTheStableBranchAndArtifacts() throws Exc } String ci = Files.readString(Path.of(".github/workflows/ci.yml"), StandardCharsets.UTF_8); - assertTrue(ci.contains("SkysGrassSlabs-1.1.0.118021.jar")); - assertTrue(ci.contains("SkysGrassSlabs-1.1.0.118021-sources.jar")); - assertTrue(ci.contains("SkysGrassSlabs-1.1.0.118021-javadoc.jar")); + assertTrue(ci.contains("SkysGrassSlabs-1.1.1.118021.jar")); + assertTrue(ci.contains("SkysGrassSlabs-1.1.1.118021-sources.jar")); + assertTrue(ci.contains("SkysGrassSlabs-1.1.1.118021-javadoc.jar")); assertTrue(ci.contains("if-no-files-found: error")); assertEquals(2, ci.lines() .filter(line -> line.contains("java-version: '8.0.502+7'")) diff --git a/src/test/java/zone/moddev/mc/skysgrassslabs/ResourceContractTest.java b/src/test/java/zone/moddev/mc/skysgrassslabs/ResourceContractTest.java index a32b1da..007abd1 100644 --- a/src/test/java/zone/moddev/mc/skysgrassslabs/ResourceContractTest.java +++ b/src/test/java/zone/moddev/mc/skysgrassslabs/ResourceContractTest.java @@ -1,6 +1,7 @@ package zone.moddev.mc.skysgrassslabs; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.IOException; @@ -65,6 +66,24 @@ public void turfModelIsOnePixelHighAndBiomeTinted() throws Exception { } } + @Test + public void snowyGrassSlabModelsUseUntintedSnowCaps() throws Exception { + for (String modelName : new String[] {"grass_slab_snow", "grass_slab_top_snow"}) { + JsonElement model = JsonParser.parseString(Files.readString(Path.of( + "src/main/resources/assets/skysgrassslabs/models/block/" + + modelName + ".json"))); + var object = model.getAsJsonObject(); + assertEquals("minecraft:block/snow", + object.getAsJsonObject("textures").get("top").getAsString()); + assertEquals("minecraft:block/grass_block_snow", + object.getAsJsonObject("textures").get("side").getAsString()); + var up = object.getAsJsonArray("elements").get(0).getAsJsonObject() + .getAsJsonObject("faces").getAsJsonObject("up"); + assertEquals("#top", up.get("texture").getAsString()); + assertFalse(up.has("tintindex")); + } + } + @Test public void grassSlabUsesVanillaGrassCutoutLayer() throws Exception { String client = Files.readString(Path.of(