The Bug:
Sculk sensors are not activated upon frogs laying frogspawn.
Steps to Reproduce:
Summon two frogs near some water.
Breed the frogs and place down a sculk sensor nearby.
Wait until one of the frogs lays frogspawn.
Take note as to whether or not sculk sensors are activated upon frogs laying frogspawn.
Observed Behavior:
Sculk sensors aren't activated.
Expected Behavior:
Sculk sensors would be activated.
Code Analysis:
Code analysis by @unknown can be found below.
The following is based on a decompiled version of Minecraft 1.19 Pre-release 2 using Mojang mappings.
net.minecraft.world.entity.ai.behavior.TryLaySpawnOnWaterNearLand.java
public class TryLaySpawnOnWaterNearLand extends Behavior<Frog> {
private final Block spawnBlock;
private final MemoryModuleType<?> memoryModule;
...
@Override
protected void start(ServerLevel serverLevel, Frog frog, long l) {
BlockPos blockPos = frog.blockPosition().below();
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockPos blockPos2;
BlockPos blockPos3 = blockPos.relative(direction);
if (!serverLevel.getBlockState(blockPos3).is(Blocks.WATER) || !serverLevel.getBlockState(blockPos2 = blockPos3.above()).isAir()) continue;
serverLevel.setBlock(blockPos2, this.spawnBlock.defaultBlockState(), 3);
serverLevel.playSound(null, frog, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0f, 1.0f);
frog.getBrain().eraseMemory(this.memoryModule);
return;
}
}
...
If we look at the above class, we can see that frogs laying frogspawn simply isn't registered as a game event as the gameEvent()
method is never called, thus not detecting this action as a vibration.
Linked issues
Attachments
Comments 2
Possibly relates to MC-215767 ?
In 1.19 Pre-2.