Skip to content

fix(blocks): honor mob-spawn config on Waterstone/Lavastone/Sand - #104

Merged
PLASMAchicken merged 2 commits into
GTNewHorizons:masterfrom
PLASMAchicken:fix/waterstone-mob-spawn
Sep 9, 2026
Merged

PLASMAchicken merged 2 commits into
GTNewHorizons:masterfrom
PLASMAchicken:fix/waterstone-mob-spawn

Conversation

@PLASMAchicken

@PLASMAchicken PLASMAchicken commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Summary

BlockWaterstone extends BlockMultiLayer, which implements ICarvable. The item tooltip logic in ItemCarvable.addInformation shows "Mobs cannot Spawn on this Block" for any ICarvable block whenever the canMobsSpawnOnTheChiselBlocks config is disabled - but only BlockCarvable actually overrode canCreatureSpawn to enforce that setting.

BlockMultiLayer never did, so Waterstone showed the tooltip without the behavior backing it up.
Lavastone (also BlockMultiLayer) has the identical underlying bug, but it's been masked because its light level of 15 incidentally blocks hostile mob spawns.

This adds the same canCreatureSpawn override to BlockMultiLayer that BlockCarvable already has, so it consults Configurations.canMobsSpawnOnTheChiselBlocks — fixing both Waterstone and Lavastone.

Same story for chiseled Sand (BlockCarvableSand) - full opaque block, no override, so added it there too. Chiseled Glass/Ice/PackedIce/Beacon show the same tooltip but don't have this bug: they never reach canCreatureSpawn at all since their material/render setup already fails vanilla's earlier "solid top surface" check.

Fixes GTNewHorizons/GT-New-Horizons-Modpack#26703

Test plan

  • In dev env: verify mobs no longer spawn on Waterstone/Lavastone/Sand with canMobsSpawnOnTheChiselBlocks=false

This Repo misses the template btw

BlockMultiLayer implements ICarvable, so its item tooltip shows "Mobs
cannot Spawn on this Block" whenever canMobsSpawnOnTheChiselBlocks is
disabled, but unlike BlockCarvable it never overrode canCreatureSpawn,
so the setting was never actually enforced on Waterstone (and
Lavastone, which happened to mask the bug via its high light level
blocking hostile spawns).

Fixes GTNewHorizons/GT-New-Horizons-Modpack#26703
@PLASMAchicken PLASMAchicken added the Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it. label Sep 8, 2026
Same root cause as Waterstone/Lavastone: BlockCarvableSand is a full
opaque block (Material.sand) implementing ICarvable, so it shows the
"Mobs cannot Spawn on this Block" tooltip whenever
canMobsSpawnOnTheChiselBlocks is disabled, but never overrode
canCreatureSpawn to actually enforce it.

Verified against the decompiled Forge source in build/rfg: unlike the
carvable Glass/Ice/PackedIce/Beacon blocks (which never reach
canCreatureSpawn at all because they fail the earlier solid-top-surface
check via a translucent material or renderAsNormalBlock=false), Sand
uses an opaque material with no such override, so it passes that check
and defaults canCreatureSpawn to true.
@PLASMAchicken PLASMAchicken changed the title fix(blocks): honor mob-spawn config on Waterstone/Lavastone fix(blocks): honor mob-spawn config on Waterstone/Lavastone/Sand Sep 8, 2026

@seventh-june seventh-june left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love when there's just a config option pointing itself to literally nowhere

@Dream-Master

Copy link
Copy Markdown
Member

Ee3 deps seems to be broken. I hope done day we can yeet all non gtnh pack mods as deps

@PLASMAchicken
PLASMAchicken merged commit 3d3260c into GTNewHorizons:master Sep 9, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Fixes a bug. Please link it in the PR if an issue exists for it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Water Stone (water bucket surrounded by stone) can spawn mobs despite NEI saying it doesn't

3 participants