mojira.dev
MC-165510

Water and lava can't be placed on redstone ore

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;
   }

Related issues

Attachments

Comments

migrated
[media]
[MOD] Greymagic27

Can confirm. It happens to me also

SPGoding

Confirmed for 1.15-pre2.

migrated

Confirmed for me too - 1.15-pre1 & pre2

migrated

Confirmed 19w42a, 19w44a, 19w45b

SPGoding

@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.

C_moneySmith

This effects release 1.15, as well. Additionally, it is not just limited to water. Lava bucket emptying, attempting to throw a trident or shoot a bow, consume anything (food or potion) also do not work unless sneaking. Basically any right-click interaction, other than placing a block, does not work.

migrated

I can shoot a block of redstone ore or eat while looking at it if I am outside melee range, 5 blocks.

Tested in 1.15.1

I guess that's only to be expected, since the redstone ore can't be interacted with from more than 5 blocks away it won't interfere with the right click action.

violine1101

@unknown, that's a different issue. Please create a new ticket for that, if we don't have one already.

migrated

No, I'm commenting on this issue, C_moneySmith pointed out that the issue affects a lot more than water buckets and I'm pointing out that the issue only occurs within 5 blocks of the redstone ore. (Water buckets can't be placed from more than 5 blocks away but water can be picked up even if the redstone is more than 5 blocks away as long as the water is closer.)

migrated

I have confirmed that this happens in 1.15.2 only if I am not sneaking. When sneak mode is activated, I can place the water on the redstone ore.

migrated

You can crouch to place it. It seems like the "make particles appear hehe" from right clicking is overriding actions used on the ore, just like how trying to place a block on a sign doesn't work.

anthony cicinelli

This also affects Lava Buckets and Fish Buckets

C_moneySmith

Confirmed for 20w13a

migrated

This also prevents eating and placing torches and redstone from your off hand.

Jayceebee

20w16a

migrated

Confirmed for 20w18a

MMK21

20w21a

C_moneySmith

Confirmed for 1.16 pre-release 3

migrated

@unknown: 1.16-pre3 is already marked as affected.

C_moneySmith

Confirmed for 1.16 pre-release 7

C_moneySmith

Confirmed for release 1.16

migrated

This might be intended/wanted behaviour. You can place the bucket while shifting. Much like how chests work, the water won't place itself on the chest unless you are shifting.

bluecrab2

Confirmed in 1.16.1

pulpetti

In 20w29a (Redstone should pop off and not just stay there until water reaches it.)

C_moneySmith

Confirmed for 1.16.2 Pre-Release 1

migrated

Works as intended (watch the video)

C_moneySmith

@unknown, that isn't working as intended. In all previous versions of Minecraft prior to 1.15 (I just tested myself in 1.14.4), you could still cause the redstone ore to light up while also completing your preferred interaction (water bucket, food consumption, bow draw). This bug prevents that from happening. It hurts no one to revert it to the old, proper functionality since this can lead to issues with caving, among other things.

anthony cicinelli

It also affects Fish Buckets

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w13a.

Avoma

Can confirm in 21w14a.

migrated

Can confirm in 21w17a

MMK21

Affects 1.17

ic22487

Try Shift+Right Clicking

Avoma

Can confirm in 1.17.1.

MMK21

Affects 1.18 🙂

MMK21

Affects 1.18.1

Avoma

Can confirm in 1.18.2.

Avoma

Can confirm in 1.19.

migrated

Still present in 1.19.1.
Right-clicking with lava bucket cause the ore to lit and thats it.

You can still pour lava if you Shift+RMB

Avoma

Can confirm in 1.19.2 and 22w42a.

migrated

Can confirm in 1.20.1

migrated

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.

[Mod] Jingy

Related to MC-149663

himazinn_Japan

Can confirm in 1.21.4.

skztr

(Unassigned)

Confirmed

Gameplay

Low

Player

redstone_ore

19w45b, 19w46b, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, ..., 1.19.2, 22w42a, 1.20.1, 1.21, 1.21.4

Retrieved