mojira.dev
MC-307982

Bucketed sulfur cubes do not retain the armor of initial sulfur cube

The bug

When an empty bucket is used on a sulfur cube with armor, the bucket of sulfur cube given to the player does not spawn a sulfur cube with the armor that the initial sulfur cube had.

How to reproduce

  1. Open a new world

  2. Set up a dispenser with boots in it, and pressure plate on the side the dispenser is facing

  3. Spawn a sulfur cube on the pressure plate

  4. Run the command

/execute as @e[type=minecraft:sulfur_cube,sort=nearest] run data get entity @s equipment

  1. Observe the armor status of the mob

  2. Use an empty bucket on the sulfur cube

  3. Kill the original sulfur cube

  4. Place down the bucket of sulfur cube

  5. Run the command again

/execute as @e[type=minecraft:sulfur_cube,sort=nearest] run data get entity @s equipment

  1. Observe the spawned sulfur cube has no armor

Expected results

The sulfur cube spawned with the bucket of sulfur cube item should be spawned with the armor values of the original bucketed sulfur cube.

The bug in code

public void saveToBucketTag(final ItemStack bucket) {...} in SulfurCube.Class makes no mention of the armor the sulfur cube is wearing, and only saves the block the sulfur cube is holding in bucket.copyFrom(DataComponents.SULFUR_CUBE_CONTENT, this);

Linked issues

Comments 2

I think the actual bug is MC-307929

would love to see MC-307929 implemented as a feature, with this bug fix along side it

Smoerpl

(Unassigned)

Unconfirmed

26.2 Snapshot 6

Retrieved