Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Sky's Grass Slabs 26.2 NeoForge CI
name: Sky's Grass Slabs 26.3 NeoForge CI

on:
push:
branches:
- master-26.2-neo
- master-26.3-neo
pull_request:
branches:
- master-26.2-neo
- master-26.3-neo

permissions:
contents: read

concurrency:
group: skysgrassslabs-26.2-neo-${{ github.workflow }}-${{ github.ref }}
group: skysgrassslabs-26.3-neo-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -107,21 +107,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysGrassSlabs-26.2-${{ github.sha }}
name: SkysGrassSlabs-26.3-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysGrassSlabs-1.1.2.2602002.jar
build/libs/SkysGrassSlabs-1.1.2.2602002-sources.jar
build/libs/SkysGrassSlabs-1.1.2.2602002-javadoc.jar
build/libs/SkysGrassSlabs-1.1.2.2603002.jar
build/libs/SkysGrassSlabs-1.1.2.2603002-sources.jar
build/libs/SkysGrassSlabs-1.1.2.2603002-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysGrassSlabs-26.2-diagnostics-${{ github.sha }}
name: SkysGrassSlabs-26.3-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CodeQL
on:
push:
branches:
- master-26.2-neo
- master-26.3-neo
pull_request:
branches:
- master-26.2-neo
- master-26.3-neo
schedule:
- cron: '53 7 * * 4'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Validate Gradle Wrapper
on:
push:
branches:
- master-26.2-neo
- master-26.3-neo
pull_request:
branches:
- master-26.2-neo
- master-26.3-neo

permissions:
contents: read
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.1.2.2603002 - Minecraft 26.3 (NeoForge)

- Ported the accepted NeoForge release to Minecraft 26.3.
- Preserved blocks, recipes, configuration, world data and legacy upgrades.

## 1.1.2.2602002 - Minecraft 26.2 (NeoForge)

- Corrected snowy grass slabs so their top surface uses snow instead of green
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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 26.2. Version `1.1.2.2602002` requires NeoForge
26.2.0.45-beta and Java 25.
This branch is for Minecraft 26.3. Version `1.1.2.2603002` requires NeoForge
26.3.0.1-beta and Java 25.

## Installation

Expand Down Expand Up @@ -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.2.2602002.md)
- [Release notes](docs/RELEASE-1.1.2.2603002.md)

## License

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
id 'idea'
id 'java-library'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.1.38'
id 'net.neoforged.gradle.userdev' version '7.1.39'
}

def sha256Of = { File inputFile ->
Expand Down Expand Up @@ -215,11 +215,11 @@ def releaseFiles = provider {
tasks.register('verifyReleaseMetadata') {
group = 'verification'
doLast {
if (project.minecraft_version != '26.2' || project.neo_version != '26.2.0.45-beta' ||
if (project.minecraft_version != '26.3' || project.neo_version != '26.3.0.1-beta' ||
project.loader_name != 'neoforge' || project.loader_code != '2' ||
project.java_version != '25' || project.java_toolchain_version != '25.0.3+9' ||
project.gradle_java_version != '25' || project.curseforge_project_id != '1677588') {
throw new GradleException('Unexpected 26.2 release metadata')
throw new GradleException('Unexpected 26.3 release metadata')
}
}
}
Expand Down Expand Up @@ -300,8 +300,8 @@ tasks.register('verifyReleaseArtifacts') {

String metadata = zip.getInputStream(zip.getEntry('META-INF/neoforge.mods.toml'))
.getText(StandardCharsets.UTF_8.name())
if (!metadata.contains('versionRange="[26.2]"') ||
!metadata.contains('versionRange="[26.2.0.45-beta,26.2.1)"')) {
if (!metadata.contains('versionRange="[26.3]"') ||
!metadata.contains('versionRange="[26.3.0.1-beta,26.3.1)"')) {
throw new GradleException('Packaged NeoForge metadata targets the wrong version')
}
def manifest = new Manifest(zip.getInputStream(zip.getEntry('META-INF/MANIFEST.MF')))
Expand Down
7 changes: 7 additions & 0 deletions docs/RELEASE-1.1.2.2603002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sky's Grass Slabs 1.1.2 for Minecraft 26.3

This release brings Sky's Grass Slabs to Minecraft 26.3 on NeoForge while
preserving the blocks, recipes, configuration and world data from earlier
versions.

Requires Minecraft 26.3, NeoForge 26.3.0.1-beta and Java 25.
8 changes: 4 additions & 4 deletions docs/WORLD-UPGRADES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ world has been checked in game.

## Sky's Grass Slabs content

Install `SkysGrassSlabs-1.1.2.2602002.jar` before opening a world that used an
Install `SkysGrassSlabs-1.1.2.2603002.jar` before opening a world that used an
earlier release. The permanent dirt slab, grass slab, path slab and turf IDs
are unchanged.

Expand All @@ -15,7 +15,7 @@ when their chunks are first opened. Old top and bottom slab orientations are
retained and begin dry. Keep the mod installed during the first upgraded start
so unopened chunks can be converted when they are later visited.

Minecraft 1.13.2 through 26.1.2 worlds already use named block states. Their
Minecraft 1.13.2 through 26.3 worlds already use named block states. Their
orientation, snowy and waterlogged states load through Minecraft's normal
upgrade process.

Expand Down Expand Up @@ -69,8 +69,8 @@ When both mods remain installed, their content is left alone by default. See
## Modpack checklist

1. Back up the complete instance and world.
2. Update NeoForge and every required mod to a matching Minecraft 26.2 build.
3. Install the 26.2 Sky's Grass Slabs jar before the first upgraded start.
2. Update NeoForge and every required mod to a matching Minecraft 26.3 build.
3. Install the 26.3 Sky's Grass Slabs jar before the first upgraded start.
4. Read the complete NeoForge missing content list before confirming it.
5. Check representative slabs, turf, paths, inventories and old terrain.
6. Stop and start the upgraded copy once more, then repeat the checks.
Expand Down
16 changes: 10 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ org.gradle.daemon=false
org.gradle.configuration-cache=false
org.gradle.caching=true
org.gradle.parallel=false
# NeoForge 26.3 requires additional heap for Vineflower's TreeFeature pass.
neogradle.subsystems.decompiler.enabled=true
neogradle.subsystems.decompiler.maxMemory=8g
neogradle.subsystems.decompiler.maxThreads=1

# Cross-version release dispatcher metadata
loader_name=neoforge
Expand All @@ -19,14 +23,14 @@ curseforge_project_id=1677588
## Environment Properties

# The Minecraft version must agree with the NeoForge version to get a valid artifact
minecraft_version=26.2
minecraft_version=26.3
# The Minecraft version range can use any release version of Minecraft as bounds.
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
# as they do not follow standard versioning conventions.
minecraft_version_range=[26.2]
# NeoForge 26.2.0.45-beta targets Minecraft 26.2.
neo_version=26.2.0.45-beta
neo_version_range=[26.2.0.45-beta,26.2.1)
minecraft_version_range=[26.3]
# NeoForge 26.3.0.1-beta targets Minecraft 26.3.
neo_version=26.3.0.1-beta
neo_version_range=[26.3.0.1-beta,26.3.1)


## Mod Properties
Expand All @@ -39,7 +43,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.2.2602002
mod_version=1.1.2.2603002
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import net.minecraft.world.item.crafting.CraftingRecipe;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BonemealSource;
import net.minecraft.world.level.block.FenceBlock;
import net.minecraft.world.level.block.SlabBlock;
import net.minecraft.world.level.gamerules.GameRules;
Expand All @@ -40,13 +41,15 @@
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.ItemAbilities;
import net.neoforged.neoforge.common.extensions.IBlockExtension;
import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent;
import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent;
import zone.moddev.mc.skysgrassslabs.SkysGrassSlabs;
import zone.moddev.mc.skysgrassslabs.block.DirtSlabBlock;
import zone.moddev.mc.skysgrassslabs.block.GrassSlabBlock;
import zone.moddev.mc.skysgrassslabs.block.GrassSpread;
import zone.moddev.mc.skysgrassslabs.block.PathSlabBlock;
import zone.moddev.mc.skysgrassslabs.block.SlabFlattening;
import zone.moddev.mc.skysgrassslabs.block.TurfBlock;
import zone.moddev.mc.skysgrassslabs.init.ModBlocks;
import zone.moddev.mc.skysgrassslabs.init.ModRecipes;
Expand Down Expand Up @@ -85,37 +88,42 @@ private static void setClockTime(GameTestHelper helper, int time) {

public static void shovelFlatteningPreservesOrientation(GameTestHelper helper) {
BlockPos pos = helper.absolutePos(new BlockPos(1, 2, 1));
UseOnContext context = context(helper, pos, new ItemStack(Items.IRON_SHOVEL));
BlockState dirtTop = ModBlocks.DIRT_SLAB.get().defaultBlockState()
.setValue(SlabBlock.TYPE, SlabType.TOP);
BlockState grassBottom = ModBlocks.GRASS_SLAB.get().defaultBlockState();
BlockState waterlogged = dirtTop.setValue(SlabBlock.WATERLOGGED, true);
BlockState doubled = dirtTop.setValue(SlabBlock.TYPE, SlabType.DOUBLE)
.setValue(SlabBlock.WATERLOGGED, false);

BlockState topPath = dirtTop.getToolModifiedState(context, ItemAbilities.SHOVEL_FLATTEN, false);
BlockState bottomPath = grassBottom.getToolModifiedState(context, ItemAbilities.SHOVEL_FLATTEN, false);
Player player = helper.makeMockPlayer(GameType.SURVIVAL);
ItemStack shovel = new ItemStack(Items.IRON_SHOVEL);
player.setItemInHand(InteractionHand.MAIN_HAND, shovel);

helper.getLevel().setBlock(pos, dirtTop, Block.UPDATE_ALL);
flatten(player, pos);
BlockState topPath = helper.getLevel().getBlockState(pos);
require(helper, topPath != null && topPath.is(ModBlocks.PATH_SLAB.get())
&& topPath.getValue(SlabBlock.TYPE) == SlabType.TOP, "top orientation was lost");

helper.getLevel().setBlock(pos, grassBottom, Block.UPDATE_ALL);
flatten(player, pos);
BlockState bottomPath = helper.getLevel().getBlockState(pos);
require(helper, bottomPath != null && bottomPath.is(ModBlocks.PATH_SLAB.get())
&& bottomPath.getValue(SlabBlock.TYPE) == SlabType.BOTTOM,
"bottom orientation was lost");
require(helper, waterlogged.getToolModifiedState(context,
ItemAbilities.SHOVEL_FLATTEN, false) == null, "waterlogged dirt flattened");
BlockState fullPath = doubled.getToolModifiedState(context, ItemAbilities.SHOVEL_FLATTEN, false);

helper.getLevel().setBlock(pos, waterlogged, Block.UPDATE_ALL);
flatten(player, pos);
require(helper, helper.getLevel().getBlockState(pos).equals(waterlogged),
"waterlogged dirt flattened");

helper.getLevel().setBlock(pos, doubled, Block.UPDATE_ALL);
flatten(player, pos);
BlockState fullPath = helper.getLevel().getBlockState(pos);
require(helper, fullPath != null && fullPath.is(Blocks.DIRT_PATH),
"double dirt slab did not normalize to vanilla path");

helper.getLevel().setBlock(pos, dirtTop, Block.UPDATE_ALL);
Player player = helper.makeMockPlayer(GameType.CREATIVE);
ItemStack shovel = new ItemStack(Items.IRON_SHOVEL);
player.setItemInHand(InteractionHand.MAIN_HAND, shovel);
shovel.useOn(new UseOnContext(player, InteractionHand.MAIN_HAND,
new BlockHitResult(Vec3.atCenterOf(pos), Direction.UP, pos, false)));
require(helper, helper.getLevel().getBlockState(pos).is(ModBlocks.PATH_SLAB.get())
&& helper.getLevel().getBlockState(pos).getValue(SlabBlock.TYPE) == SlabType.TOP,
"vanilla shovel use did not create a top path slab");
require(helper, shovel.getDamageValue() == 1, "shovel durability was not consumed");
require(helper, shovel.getDamageValue() == 3,
"successful slab flattening did not consume durability exactly once");
helper.succeed();
}

Expand Down Expand Up @@ -274,15 +282,17 @@ public static void snowPlantsBonemealAndWaterAreTopAware(GameTestHelper helper)
BlockState bottom = grass.defaultBlockState();
BlockState top = bottom.setValue(SlabBlock.TYPE, SlabType.TOP);

require(helper, !grass.isValidBonemealTarget(helper.getLevel(), pos, bottom),
require(helper, !grass.isValidBonemealTarget(helper.getLevel(), pos, bottom,
BonemealSource.INTERACTION),
"bottom grass slab accepted bonemeal");
require(helper, grass.isValidBonemealTarget(helper.getLevel(), pos, top),
require(helper, grass.isValidBonemealTarget(helper.getLevel(), pos, top,
BonemealSource.INTERACTION),
"top grass slab rejected bonemeal");
require(helper, grass.canSustainPlant(bottom, helper.getLevel(), pos, Direction.UP,
Blocks.DANDELION.defaultBlockState()).isFalse(),
Blocks.DANDELION.defaultBlockState()) == net.minecraft.util.TriState.FALSE,
"bottom grass slab sustained a plant");
require(helper, grass.canSustainPlant(top, helper.getLevel(), pos, Direction.UP,
Blocks.DANDELION.defaultBlockState()).isTrue(),
Blocks.DANDELION.defaultBlockState()) == net.minecraft.util.TriState.TRUE,
"top grass slab rejected a plant");

helper.getLevel().setBlock(pos, top, Block.UPDATE_ALL);
Expand Down Expand Up @@ -339,7 +349,7 @@ public static void snowPlantsBonemealAndWaterAreTopAware(GameTestHelper helper)
require(helper, Identifier.fromNamespaceAndPath(SkysGrassSlabs.MOD_ID, "path_slab")
.equals(BuiltInRegistries.BLOCK.getKey(ModBlocks.PATH_SLAB.get())),
"path slab registry ID changed");
require(helper, BuiltInRegistries.FEATURE.containsKey(
require(helper, BuiltInRegistries.FEATURE_TYPE.containsKey(
Identifier.fromNamespaceAndPath(
SkysGrassSlabs.MOD_ID, "grass_slab_smoothing")),
"worldgen feature registry ID changed");
Expand All @@ -360,8 +370,11 @@ public static void turfMatchesPhysicalCarpetAndDropsFromInvalidSoil(GameTestHelp
CollisionContext.empty()).bounds().maxY == 1.0D / 16.0D,
"turf collision is not one pixel high");
require(helper, !state.hasBlockEntity(), "turf unexpectedly has a block entity");
require(helper, state.getFlammability(helper.getLevel(), dirtTurf, Direction.UP) == 20
&& state.getFireSpreadSpeed(helper.getLevel(), dirtTurf, Direction.UP) == 60,
IBlockExtension turfExtension = (IBlockExtension) state.getBlock();
require(helper, turfExtension.getFlammability(state, helper.getLevel(), dirtTurf,
Direction.UP) == 20
&& turfExtension.getFireSpreadSpeed(state, helper.getLevel(), dirtTurf,
Direction.UP) == 60,
"turf does not match carpet flammability");
require(helper, !ModBlocks.TURF.get().defaultBlockState().is(BlockTags.WOOL_CARPETS)
&& !new ItemStack(ModBlocks.TURF_ITEM.get()).is(ItemTags.WOOL_CARPETS),
Expand Down Expand Up @@ -643,7 +656,7 @@ public static void sheepEatTurfOnceAndRespectMobGriefing(GameTestHelper helper)
sheep.setSheared(true);
CommonEvents.addTurfEatingGoal(new EntityJoinLevelEvent(sheep, helper.getLevel()));
CommonEvents.addTurfEatingGoal(new EntityJoinLevelEvent(sheep, helper.getLevel()));
long goalCount = sheep.goalSelector.getAvailableGoals().stream()
long goalCount = sheep.getGoalSelector().getAvailableGoals().stream()
.filter(goal -> goal.getGoal() instanceof TurfEatingGoal).count();
require(helper, goalCount == 1, "sheep received duplicate turf eating goals");

Expand Down Expand Up @@ -700,17 +713,20 @@ private static ItemStack useTurfOn(Player player, BlockPos pos) {
return turf;
}

private static UseOnContext context(GameTestHelper helper, BlockPos pos, ItemStack stack) {
return new UseOnContext(helper.getLevel(), null, InteractionHand.MAIN_HAND, stack,
new BlockHitResult(Vec3.atCenterOf(pos), Direction.UP, pos, false));
}

private static BlockPlaceContext placeContext(GameTestHelper helper, BlockPos pos,
ItemStack stack) {
return new BlockPlaceContext(helper.getLevel(), null, InteractionHand.MAIN_HAND, stack,
Player player = helper.makeMockPlayer(GameType.CREATIVE);
player.setItemInHand(InteractionHand.MAIN_HAND, stack);
return new BlockPlaceContext(player, InteractionHand.MAIN_HAND, stack,
new BlockHitResult(Vec3.atCenterOf(pos), Direction.UP, pos, false));
}

private static void flatten(Player player, BlockPos pos) {
SlabFlattening.handle(new PlayerInteractEvent.RightClickBlock(player,
InteractionHand.MAIN_HAND, pos,
new BlockHitResult(Vec3.atCenterOf(pos), Direction.UP, pos, false)));
}

private static void require(GameTestHelper helper, boolean condition, String message) {
if (!condition) {
helper.fail(message);
Expand Down
Loading
Loading