Make the generator AcidIsland-aware - #174
Conversation
AcidIsland water is acid, so its LavaCheck listener turns stone, that vanilla creates when lava pours into water, back into water. It does that by checking one tick later if the block is still stone. This addon replaced the forming stone with a generator block before that check ran, so the block survived and a single lava bucket could be used to convert an entire ocean into generator blocks. The addon now skips block generation when a water block turns into stone in a world that is managed by AcidIsland and that has acid damage enabled, so AcidIsland can revert it as it normally does. Cobblestone generators form the block at the lava block, so they are not affected. AcidIsland is a soft dependency, so the game mode is recognised by its name and the acid damage value is read reflectively. Can be disabled with the new `acid-island-aware` config option. #173 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SDLdE5LSXRwc6NQhYvzyiv
|
|
Like I am not appose to this, but people could just disable stone generators in acid island, as this is basically what it will do. |
|
Thanks @BONNe, that answers it — I did not realise the generator type was already a per-tier switch over the four lava mechanics, and the height range covers the sea level case neatly too. Agreed that this is better handled by the admin than automatically: the code here silently stops a The real gap is that none of this is discoverable. The docs only said |



Problem
Fixes #173.
Vanilla forms two different blocks from lava + water, at two different positions:
COBBLESTONESTONEAcidIsland only blocks the second case:
LavaChecklistens toBlockFromToEventwhere the target block is water and, one tick later, reverts the block to water if it is stillSTONE. That is why AcidIsland players cannot farm the ocean with a lava bucket, while normal cobblestone generators keep working.This addon defeated that protection.
VanillaGeneratorListenerruns onBlockFormEventatMONITORand rewrites the new state to a generator block, so AcidIsland's next-tick== STONEcheck no longer matched and the block survived. A single lava bucket over an ocean could therefore be used to convert huge amounts of water into diamond ore and to boost the island level massively. SinceUtil.getWorld()maps nether and end back to the overworld, AcidIsland intends this protection in all three dimensions, which matches the report.Fix
AcidIslandHelperutility that reports whether AcidIsland will revert stone formed in water: it looks the game mode up withIslandWorldManager#getAddon(World), checks that its name isAcidIsland, and readsgetAcidDamage()from its world settings reflectively (cachedMethod). AcidIsland is only a soft dependency, so this adds no new build dependency and does nothing when AcidIsland is not installed.VanillaGeneratorListenerskips generation when a water block turns into stone in such a world, and reports the reason throughWhy, so/[admin] why generatorexplains it. Cobblestone generators form their block at the lava block, so they are unaffected.acid-island-awareconfig option (defaulttrue) to turn the behaviour off.Tests
New
VanillaGeneratorListenerTest, the first test for this listener, covering five cases: block is skipped in acid water; block is still replaced when acid damage is 0, when the option is disabled, and in other game modes; and the classic cobblestone generator still works in AcidIsland.Full suite: 170 tests, 0 failures.
Note
This only helps AcidIsland. In game modes with no acid water, a large protected ocean can still be used the same way, since nothing reverts the stone there. A general option to skip water-to-stone generation in any game mode could be added if wanted, but it was left out here because it would silently disable legitimate
STONEtype generators.🤖 Generated with Claude Code
https://claude.ai/code/session_01SDLdE5LSXRwc6NQhYvzyiv