mojira.dev
MC-2440

Beacons keep higher level effects when partially destroyed

The bug

When you set an effect in a beacon that requires more than 1 layer, and then break the layers so that it shouldn’t be able to give the effect anymore, it will still give you the effect.

How to reproduce

  1. Build a 2 layers tall beacon pyramid

  2. Set the resistance effect or the jump boost effect

  3. Break one block of the lowest layer
    ❌ It will still give you the effect even though the pyramid only has one full layer.

Code analysis

Code analysis by @unknown can be found in this comment.


Original Description:
I can create a four-tier pyramid, then set the beacon to provide the primary power of the strength boost and the secondary power of regeneration, and then break the fourth, third, and second levels of the pyramid, and the primary power of strength will continue to refresh, although only out to 20 blocks, and the secondary power will not refresh.

If I then repair the pyramid's second layer, the range of the primary power will extend out to 30 blocks. Repairing the third layer will increase the range to 40 blocks. And repairing the fourth layer will return the beacon to full functionality. If I break the first level(leaving the beacon block itself intact), then the primary power will stop, but if I then restore only the first level of the pyramid, the beacon will continue to provide the primary power of strength out to 20 blocks.

Ultimately, the beacon is properly checking to see if it should apply the secondary power, and how far a range it should apply primary or secondary powers out to, but is not checking to see if the TYPE of primary power it is set to provide is still supported by the appropriate number of layers required to initially select it.

Related issues

Attachments

Comments

migrated
[media][media]
migrated

Confirmed. You can also destroy part of the top layer to disable the beacon, re-establish the top layer to reactivate the beacon and the effect is still active.

migrated

You can also downgrade a level II effect or deactivate regeneration by breaking the lowest layer and reactivate them by restoring the layer.

migrated

I've noticed this same bug is still present in 1.7.5 and 14w11b. To give some more detail on the nature of the bug:

For example, I can create a four-tier pyramid, then set the beacon to provide the primary power of the strength boost and the secondary power of regeneration, and then break the fourth, third, and second levels of the pyramid, and the primary power of strength will continue to refresh, although only out to 20 blocks, and the secondary power will not refresh.

If I then repair the pyramid's second layer, the range of the primary power will extend out to 30 blocks. Repairing the third layer will increase the range to 40 blocks. And repairing the fourth layer will return the beacon to full functionality. If I break the first level(leaving the beacon block itself intact), then the primary power will stop, but if I then restore only the first level of the pyramid, the beacon will continue to provide the primary power of strength out to 20 blocks.

Ultimately, the beacon is properly checking to see if it should apply the secondary power, and how far a range it should apply primary or secondary powers out to, but is not checking to see if the TYPE of primary power it is set to provide is still supported by the appropriate number of layers required to initially select it.

galaxy_2alex

Changed description to the better one from Varilence.

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

The reason for this is that the method net.minecraft.tileentity.TileEntityBeacon.updateSegmentColors() only updates the net.minecraft.tileentity.TileEntityBeacon.levels field but does not test if the selected effects are valid for the new levels value.

migrated

Confirmed for 1.13.1.

pine1needle

1.15.2 Pre-Release 2 is affected.

pine1needle

20w06a is affected.

migrated

I’d like to request ownership of this report. The original reporter hasn’t been active since March 2014 and I’ll continue updating the ticket.

Avoma

Can confirm in 1.17.1.

CallMeChris

Requesting ownership of this issue since the owners account was deleted.

Brain81505

Can confirm in 23w06a and 1.19.3

migrated

Affects 1.20.1 Release Candidate 1

[Mod] turbo

(Unassigned)

Confirmed

Gameplay

Low

Beacon

beacon, boost, effect, jump, level

Minecraft 1.4.3, Minecraft 1.7.5, Minecraft 14w11b, Minecraft 1.8, Minecraft 1.8.1-pre3, ..., 1.20.5, 1.20.6, 1.21, 1.21.3, 1.21.4

Retrieved