The bug
Right-clicking a redstone ore with a water/lava/fish bucket activates the redstone ore, but does not place the water or lava.
Code Analysis
Code analysis provided by @unknown
Currently the interaction on redstone ore is always a success. We can fix this by adding a check if the redstone ore is lit and if it is lit then fail the interaction
Current Code
net/minecraft/world/level/block/RedStoneOreBlock.java
public InteractionResult use(BlockState p_55472_, Level p_55473_, BlockPos p_55474_, Player p_55475_, InteractionHand p_55476_, BlockHitResult p_55477_) {
if (p_55473_.isClientSide) {
spawnParticles(p_55473_, p_55474_);
} else {
interact(p_55472_, p_55473_, p_55474_);
}
ItemStack itemstack = p_55475_.getItemInHand(p_55476_);
return itemstack.getItem() instanceof BlockItem && (new BlockPlaceContext(p_55475_, p_55476_, itemstack, p_55477_)).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS;
}
Fixed Code
net/minecraft/world/level/block/RedStoneOreBlock.java
public InteractionResult use(BlockState p_55472_, Level p_55473_, BlockPos p_55474_, Player p_55475_, InteractionHand p_55476_, BlockHitResult p_55477_) {
//Checking if its already lit then failing the result if it is lit fixes MC-165510 & MC-195094
if(!p_55472_.getValue(LIT)) {
if (p_55473_.isClientSide) {
spawnParticles(p_55473_, p_55474_);
} else {
interact(p_55472_, p_55473_, p_55474_);
}
}
else
{
return InteractionResult.FAIL;
}
ItemStack itemstack = p_55475_.getItemInHand(p_55476_);
return itemstack.getItem() instanceof BlockItem && (new BlockPlaceContext(p_55475_, p_55476_, itemstack, p_55477_)).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS;
}
Linked issues
is duplicated by 11
Attachments
Comments 46
@unknown, please don't comment for confirming outdated versions. Usually, only the latest release and the latest snapshot/pre-release can be added to Affected Versions.
The suggested fix and current code actually makes part of the code (the code after the else) unused, it should be removed from the fix suggestion.
Related to MC-149663
Can confirm. It happens to me also