Sprinklers-1.6.16
What's new
HytaleSprinklers — Changelog 1.6.0 → 1.6.16
New Features
-
Hoe Tilling (
Tool_Hoe_...): Interacting with the funneled sprinkler while holding a hoe tills allSoil_Dirt_...blocks (excluding half-block/slab variants) andSoil_Grass_...within the perimeter intoSoil_Dirt_Tilled. Consumes 1 hoe durability per tilled block (can be disabled via config). -
Crystallization with
Tool_Fertilizer_Crystal: Converts tilled soil (TilledSoilBlock, both dry and wet) within the perimeter intoSoil_Dirt_Crystal. Consumes 1 crystal fertilizer from the stack per block (can be disabled via config). -
Fertilization with
Tool_Fertilizer: SetssetFertilized(true)on tilled soil within the perimeter (both dry and wet) and wakes up the tick of the block (and the crop above, if present) so the engine actually applies the state. Consumes 1 tool durability per block (can be disabled via config). -
Berry Bush Planting: Items of type
Plant_Crop_Berry_Block(which do not have aSeedIdand were previously not recognized as seeds) can now be planted via the funneled sprinkler just like standard seeds. -
Planting on
Soil_Dirt_Crystal: Allowed exclusively for a whitelist of seeds (health/stamina/mana, tiers 1-3); planting on all other soil types remains unchanged. -
3 New Configuration Settings: Added to
SprinklerSettings(in the samesickle_configfile as before):HoeDurabilityLossOnTill,FertilizerBagConsumedOnUse,FertilizerDurabilityLossOnUse— all set totrueby default. -
Funnel Interaction Text: Updated to explicitly mention hoes/tilling and seeds/cuttings: "Press [{key}] to activate / with hoe to till dirt / with seeds or sapling to plant them / with sickle to harvest".
Bug Fixes
-
Seeds/Cuttings Never Planted (pre-existing bug in 1.5.2): The check verifying if the cell above the soil was empty relied on the literal string
"Empty"instead of the game'sBlockType.EMPTYconstant — causing the check to never evaluate as true. Watering and harvesting were unaffected. -
Planting Silently Failing due to Wrong Reference:
tryPlaceSeedpassed a chunk-level reference toBlockPlaceUtils.placeBlockinstead of a section-level reference assectionReference, triggering a silent internal failure; additionally, original code ignored the return value ofplaceBlockand always reported success. Resolved by retrieving the correct section reference viaworld.getChunkStore().getChunkSectionReferenceAtBlock(...)and returning the actual outcome. -
Wall-Supported Seeds (e.g., Bloodrose/
Plant_Seeds_Health3) Planted Only by Chance: CertainBlockTypes declare a required lateral support (RequiredBlockFaceSupport) that depends on the block's placement rotation; the code was hardcoding rotationNone(index 0), causing seeds to root only when a wall happened to be on that specific side.BlockOperations.testPlaceBlock()(used in an initial fix attempt) turned out not to validate support at all — it constantly returnedtrueeven without adjacent walls, leaving real validation to the next engine tick insideBlockPhysicsUtil, which immediately broke the freshly placed block and dropped its drops (causing seeds to "vanish"). Fixed by directly callingBlockPhysicsUtil.testBlockPhysics(...)— the engine's true validation logic — via a customSupportReader(SprinklerSupportReader, new class) that bypasses internal tick-cycle accessor requirements; it iterates through each rotation (0-3) until a valid one is found. -
Crystallization Working Only on Dry Tilled Soil: The block-type validation compared block IDs using
startsWith("Soil_Dirt_Tilled"), an assumption about the wet variant's ID that did not match the actual engine ID — effectively excluding wet soil. Resolved by employing the base game's actual verification method (BlockEntity.declaresComponent(blockType, TilledSoilBlock.getComponentType()), confirmed via decompiled bytecode), which behaves consistently across tilling, planting, fertilization, and crystallization. -
Planting/Harvesting Impossible on
Soil_Dirt_Crystal:callForPerimeterexplicitly requires theTilledSoilBlockcomponent, whichSoil_Dirt_Crystal(a base game block) never declares — discarding those cells before any whitelist could even be evaluated. Introduced acallForPerimeterBlockTypevariant (a newBlockTypeFunctionhelper) operating directly on raw blocks instead of requiring that component, utilized for planting, harvesting, tilling, and crystallization where needed. -
Unreliable Sprinkler Periodic Tick: The engine's ticking mechanism based on
BlockSection.forEachTicking()/ internal ticking bitsets failed to reliably reschedule future tick requests (BlockSection.preTick()was only invoked during initial chunk loads) — an engine bug, not a mod bug. Bypassed by directly tracking active sprinkler block indices per section in a static map (ACTIVE_SPRINKLER_SECTIONS), checked on every section tick rather than depending on the engine's bitset; entries are cleaned up upon sprinkler removal. -
Sprinkler Reloaded with Expired
nextRun: A sprinkler whose persistednextRuntimestamp (from a previous session) ended up in the past relative to current game time could become stuck without ever being rescheduled; it is now recalculated in this "stale" state, rather than only whennullor markedforNext. -
Water Particles Never Visible: Calls to
ParticleUtil.spawnParticleEffect(both for ground splash effects on wet soil and the 4 jets from active sprinklers) were passing an empty target player list — leaving the internal loop sending theSpawnParticleSystempacket with no clients to dispatch to (producing a silent no-op instead of an exception). Fixed by leveragingParticleUtil's automatic nearby-player collection for splashes, and implementing an equivalent manual collection (collectNearbyPlayershelper) for jets, where rotation handling is also required.
Technical / Internal Changes
-
SprinklerHelper.getGlobalPositionandscheduleTickupdated to useblockStateInfo.fillWorldPos(...)/getSectionRef()instead of the legacygetChunkRef()+BlockChunkpattern, matching updated server APIs. -
FarmingUtil.harvest(...)is now invoked with the chunk store'sComponentAccessor<ChunkStore>rather than theWorlddirectly (reflecting a server-side method signature change). -
SprinklerTickHandlerrewritten to useBlockComponentSectioninstead ofBlockComponentChunk/BlockTickStrategy(removed), keeping it in line with the newACTIVE_SPRINKLER_SECTIONStracking model. -
SprinklerLifecycleHandler.onEntityRemoveis no longer a no-op: it purges the sprinkler index fromACTIVE_SPRINKLER_SECTIONSupon removal (safe local bookkeeping at that point in the lifecycle — unlikedestroy(), which is deliberately omitted here to prevent known chunk-unload deadlocks). -
manifest.json:ServerVersionupdated from>=0.5.0 <0.6.0to>=0.6.0 <0.7.0; mod version bumped from1.5.2to1.6.16.
This mod has no additional files

