Repository navigation
Keep sugar cane water and stop cactus floating - #89
Merged
Merged
Conversation
The water next to sugar cane was placed during the generation loop and then cleared when the loop reached that column, so the cane had no water. Place it after the loop, inside a sandstone basin so it cannot flow. The corner column of a chunk has no room for a basin, so it gets sandstone. Cactus and dead bush had their sand placed over the sandstone, leaving them floating. Put the sand on top of the sandstone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Follow-up to #82, where sugar cane was reported as floating and popping off. Reported again in-game: no water appears next to sugar cane.
Problem
x+1during the generation loop. When the loop reached that column, which isn't a grid column, it cleared it to air. Without water, sugar cane can't survive.y, overwriting the sandstone, and the plant aty+2, leaving air underneath it.Changes
x, or alongzin a chunk's first row, because a wall would otherwise fall outside the chunk.x=0, z=0has no room for a basin in either direction, so sugar cane picked there becomes plain sandstone.y+1, on sandstone aty.Testing
mvn testpasses on Java 21 (169 tests). Against the previous generator, 4 of the 6 new tests fail; the other 2 check behaviour that was already right.Known behaviour
Basin water can freeze in cold biomes, because vanilla decorations are still on. Sugar cane can't use ice as its water source, so it may not survive there. The maintainer has seen the freezing and accepted it, so this PR doesn't change it.
🤖 Generated with Claude Code