-
Bug
-
Resolution: Fixed
-
20w51a, 21w03a, 21w08b, 21w10a, 21w14a, 21w15a, 21w17a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Release Candidate 1, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w37a, 21w38a, 21w40a, 1.18 Pre-release 5, 1.18, 1.18.1, 1.18.2, 22w14a, 1.19 Pre-release 1, 1.19 Pre-release 3, 1.19 Pre-release 5, 1.19 Release Candidate 2, 1.19, 1.19.2, 22w45a, 1.19.3
-
Confirmed
-
Game Events
-
Normal
The Bug:
Sculk sensors are not activated upon sheep being dyed.
Steps to Reproduce:
- Place down a sculk sensor and summon a sheep nearby by using the command provided below.
/summon minecraft:sheep ~ ~ ~ {NoAI:1b}
- Apply any kind of dye to the sheep, and watch the sculk sensor closely as you do this.
- Take note as to whether or not sculk sensors are activated upon sheep being dyed.
Observed Behavior:
Sculk sensors aren't activated.
Expected Behavior:
Sculk sensors would be activated.
Code Analysis:
Code analysis by Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
public class DyeItem extends Item { ... public InteractionResult interactLivingEntity(ItemStack $is, Player $p, LivingEntity $le, InteractionHand $ih) { if ($le instanceof Sheep) { Sheep sheep = (Sheep)$le; if (sheep.isAlive() && !sheep.isSheared() && sheep.getColor() != this.dyeColor) { sheep.level.playSound($p, sheep, SoundEvents.DYE_USE, SoundSource.PLAYERS, 1.0F, 1.0F); if (!$p.level.isClientSide) { sheep.setColor(this.dyeColor); $is.shrink(1); } return InteractionResult.sidedSuccess($p.level.isClientSide); } } return InteractionResult.PASS; } ...
If we look at the above class, we can see that sheep being dyed 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. I feel as if a new game event tag would be expected to be used here as none of the currently existing ones seem to fit this action accordingly.
- relates to
-
MC-210484 Sculk sensors are not activated upon a sheep changing from blue to red, through the use of an evoker
- Resolved
-
MC-207515 Sculk sensors don't react to evokers or illusioners waving their hands
- Resolved
-
MC-212278 Sculk sensors do not detect signs being dyed
- Resolved
-
MC-214619 Sculk sensors cannot detect application of ink sacs to signs
- Resolved