Sculk sensors are not activated upon comparators clicking
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator along with a sculk sensor nearby.
- Right-click on the comparator to make it click and watch the sculk sensor closely as you do this.
- Take note as to whether or not sculk sensors are activated upon comparators clicking.
Observed Behavior:
Sculk sensors aren't activated.
Expected Behavior:
Sculk sensors would be activated.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
public class ComparatorBlock extends DiodeBlock implements EntityBlock { ... public InteractionResult use(BlockState $bs, Level $l, BlockPos $bp, Player $p, InteractionHand $ih, BlockHitResult $bhr) { if (!$p.getAbilities().mayBuild) { return InteractionResult.PASS; } else { $bs = $bs.cycle(MODE); float f = $bs.getValue(MODE) == ComparatorMode.SUBTRACT ? 0.55F : 0.5F; $l.playSound($p, $bp, SoundEvents.COMPARATOR_CLICK, SoundSource.BLOCKS, 0.3F, f); $l.setBlock($bp, $bs, 2); this.refreshOutputState($l, $bp, $bs); return InteractionResult.sidedSuccess($l.isClientSide); } } ...
If we look at the above class, we can see that switching modes on comparators simply isn't registered as a game event as the gameEvent() method is never called, thus not detecting this action as a vibration.
Potential Fix:
Simply calling the gameEvent() method where appropriate within this piece of code should resolve this problem. The "BLOCK_CHANGE" game event tag would be expected to be used here as the block states of comparators are changed when their modes are changed. The following line of code could be used in order to fix this:
$LEVEL.gameEvent($PLAYER, GameEvent.BLOCK_CHANGE, $BLOCKPOS);
- Unresolved
[Mod] Avoma- 15
- 6
- Confirmed
Low
- Gameplay
- Game Events
- sculk_sensor
20w51a - 1.21.4
20w51a 21w03a 21w05a 21w05b 21w06a 21w07a 21w08b 21w10a 21w11a 21w14a 21w15a 21w17a 21w19a 21w20a 1.17-pre1 1.17-rc1 1.17 1.17.1-pre1 1.17.1-rc1 1.17.1 21w37a 21w38a 21w40a 1.18 1.18.1 22w03a 1.18.2 22w14a 22w18a 1.19-pre1 1.19-pre2 1.19-pre3 1.19 1.19.1-pre3 1.19.2 1.19.3 23w06a 1.19.4-pre1 1.19.4 1.20.1 23w33a 23w43a 24w11a 1.21 1.21.3 1.21.4
Created Issue:
Sculk sensors are not activated upon comparators clicking
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place a sculk sensor.
- Place a comparator nearby.
- Right-click on it to make it click (switch modes).
→Notice how the sculk sensor does not activate upon doing this.
Additional Information:
Quote from the 20w49a Changelog, "A vibration is anything that causes physical motion". I would definitely consider this as physical motion, as you are physically interacting with the comparator.
is duplicated by
is duplicated by
relates to
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place
a sculk sensor.- Place
a comparator nearby.- Right-click on it to make it click (switch modes).
→Notice how
thesculk sensordoesnot activate upondoing this.Additional Information:
Quote from the 20w49a Changelog, "A vibration is anything that causes physical motion". I would definitely consider this as physical motion, as you are physically interacting with the comparator.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
- →
Notice how sculk sensors are not activated upon comparators clicking.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
- →
Notice how sculk sensors are not activated upon comparators clicking.
Expected Behavior:
The expected behavior would be that sculk sensors are activated upon comparators clicking.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
- →
Notice how sculk sensors are not activated upon comparators clicking.
Expected Behavior:
The expected behavior would bethat sculk sensors areactivated upon comparators clicking.The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
Observed Behavior:
Sculk sensors are not activated upon comparators clicking.
Expected Behavior:
Sculk sensors would be activated upon comparators clicking.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
Observed Behavior:
Sculk sensors are not activated upon comparators clicking.
Expected Behavior:
Sculk sensors would be activated upon comparators clicking.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
- Take note as to whether or not sculk sensors are activated upon comparators clicking.
Observed Behavior:
Sculk sensors are not activated upon comparators clicking.
Expected Behavior:
Sculk sensors would be activated upon comparators clicking.
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
- Place down a sculk sensor nearby.
- Right-click on the comparator to make it click.
- Take note as to whether or not sculk sensors are activated upon comparators clicking.
Observed Behavior:
Sculk sensors are not activated upon comparators clicking.
Expected Behavior:
Sculk sensors would be activated upon comparators clicking.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
net.minecraft.world.level.block.ComparatorBlock.javapublic class ComparatorBlock extends DiodeBlock implements EntityBlock { ... public InteractionResult use(BlockState $bs, Level $l, BlockPos $bp, Player $p, InteractionHand $ih, BlockHitResult $bhr) { if (!$p.getAbilities().mayBuild) { return InteractionResult.PASS; } else { $bs = $bs.cycle(MODE); float f = $bs.getValue(MODE) == ComparatorMode.SUBTRACT ? 0.55F : 0.5F; $l.playSound($p, $bp, SoundEvents.COMPARATOR_CLICK, SoundSource.BLOCKS, 0.3F, f); $l.setBlock($bp, $bs, 2); this.refreshOutputState($l, $bp, $bs); return InteractionResult.sidedSuccess($l.isClientSide); } } ...If we look at the above class, we can see that switching modes on comparators simply isn't registered as a game event as the gameEvent() method is never called, thus not detecting this action as a vibration.
Potential Fix:
Simply calling the gameEvent() method where appropriate within this piece of code should resolve this problem. The "BLOCK_CHANGE" game event tag would be expected to be used here as the block states of comparators are changed when their modes are changed. The following line of code could be used in order to fix this:
$LEVEL.gameEvent($PLAYER, GameEvent.BLOCK_CHANGE, $BLOCKPOS);
The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator.
Place down a sculk sensor nearby.Right-click on the comparator to make itclick.- Take note as to whether or not sculk sensors are activated upon comparators clicking.
Observed Behavior:
Sculk sensors are
not activatedupon comparators clicking.Expected Behavior:
Sculk sensors would be activated
upon comparators clicking.Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
net.minecraft.world.level.block.ComparatorBlock.javapublic class ComparatorBlock extends DiodeBlock implements EntityBlock { ... public InteractionResult use(BlockState $bs, Level $l, BlockPos $bp, Player $p, InteractionHand $ih, BlockHitResult $bhr) { if (!$p.getAbilities().mayBuild) { return InteractionResult.PASS; } else { $bs = $bs.cycle(MODE); float f = $bs.getValue(MODE) == ComparatorMode.SUBTRACT ? 0.55F : 0.5F; $l.playSound($p, $bp, SoundEvents.COMPARATOR_CLICK, SoundSource.BLOCKS, 0.3F, f); $l.setBlock($bp, $bs, 2); this.refreshOutputState($l, $bp, $bs); return InteractionResult.sidedSuccess($l.isClientSide); } } ...If we look at the above class, we can see that switching modes on comparators simply isn't registered as a game event as the gameEvent() method is never called, thus not detecting this action as a vibration.
Potential Fix:
Simply calling the gameEvent() method where appropriate within this piece of code should resolve this problem. The "BLOCK_CHANGE" game event tag would be expected to be used here as the block states of comparators are changed when their modes are changed. The following line of code could be used in order to fix this:
$LEVEL.gameEvent($PLAYER, GameEvent.BLOCK_CHANGE, $BLOCKPOS);The Bug:
Sculk sensors are not activated upon comparators clicking.
Steps to Reproduce:
- Place down a comparator along with a sculk sensor nearby.
- Right-click on the comparator to make it click and watch the sculk sensor closely as you do this.
- Take note as to whether or not sculk sensors are activated upon comparators clicking.
Observed Behavior:
Sculk sensors aren't activated.
Expected Behavior:
Sculk sensors would be activated.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
net.minecraft.world.level.block.ComparatorBlock.javapublic class ComparatorBlock extends DiodeBlock implements EntityBlock { ... public InteractionResult use(BlockState $bs, Level $l, BlockPos $bp, Player $p, InteractionHand $ih, BlockHitResult $bhr) { if (!$p.getAbilities().mayBuild) { return InteractionResult.PASS; } else { $bs = $bs.cycle(MODE); float f = $bs.getValue(MODE) == ComparatorMode.SUBTRACT ? 0.55F : 0.5F; $l.playSound($p, $bp, SoundEvents.COMPARATOR_CLICK, SoundSource.BLOCKS, 0.3F, f); $l.setBlock($bp, $bs, 2); this.refreshOutputState($l, $bp, $bs); return InteractionResult.sidedSuccess($l.isClientSide); } } ...If we look at the above class, we can see that switching modes on comparators simply isn't registered as a game event as the gameEvent() method is never called, thus not detecting this action as a vibration.
Potential Fix:
Simply calling the gameEvent() method where appropriate within this piece of code should resolve this problem. The "BLOCK_CHANGE" game event tag would be expected to be used here as the block states of comparators are changed when their modes are changed. The following line of code could be used in order to fix this:
$LEVEL.gameEvent($PLAYER, GameEvent.BLOCK_CHANGE, $BLOCKPOS);
Does MC-211331 describe this issue?
Thank you for your report!
We're tracking this issue in MC-207268, MC-208805, MC-209798, MC-211331, MC-212278, MC-214621, and MC-214623, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit
Relates to MC-211331.
Is this still an issue in snapshot 21w05a or later?
This is still an issue in 21w05a. I've updated this ticket accordingly.
Relates to MC-214621.
Can confirm in 21w37a.
Can confirm in 21w40a.
Affects 1.19-pre1
Affects 1.19-pre2
Affects 1.19-pre3