Skip to content

Keep sugar cane water and stop cactus floating - #89

Merged
tastybento merged 1 commit into
developfrom
fix-sugar-cane-water-basin
Nov 5, 2026
Merged

tastybento merged 1 commit into
developfrom
fix-sugar-cane-water-basin

Conversation

@tastybento

@tastybento tastybento commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

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

  • Sugar cane has no water. The water went in at x+1 during 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.
  • Cactus and dead bush float. Sand was placed at y, overwriting the sandstone, and the plant at y+2, leaving air underneath it.

Changes

  • Water basins are placed after the loop, so nothing clears them.
  • The water sits in a sandstone basin so it can't flow: a floor, a far wall and two side walls, with the sand as the fourth side.
  • Basins extend along x, or along z in a chunk's first row, because a wall would otherwise fall outside the chunk.
  • The column at x=0, z=0 has no room for a basin in either direction, so sugar cane picked there becomes plain sandstone.
  • Cactus and dead bush now stand on sand at y+1, on sandstone at y.

Testing

  • mvn test passes 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.
  • Tested in-game on a Paper 26.3 server with sugar cane weight raised. The maintainer confirmed that it looks good.

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

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>
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@tastybento
tastybento marked this pull request as ready for review November 5, 2026 03:54
@tastybento
tastybento merged commit 5e4f813 into develop Nov 5, 2026
3 checks passed
@tastybento
tastybento deleted the fix-sugar-cane-water-basin branch November 5, 2026 03:55
@tastybento tastybento mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant