mojira.dev
MC-83003

Barrier particle not visible if barrier block is in offhand

The bug

While holding a barrier block in the offhand you will not see the particle effect in placed barrier blocks.

Code analysis

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

Linked issues

MC-85767 Barrier particles not shown when barrier is in off hand MC-86329 Barrier in off-hand won't show barrier particles MC-87011 When Barrier In Offhand Slot Barriers Stay Invisible MC-87609 Barrier particles doesn't show up when barrier is held in off-hand MC-87815 Barriers in second hand do not trigger the particle MC-89911 Barrier indications doesn't appear with barrier hold in secondary hand MC-96329 Barrier particle will not appear in Offhand MC-97977 Barrier block in left hand does not render barrier particles MC-98151 Holding barrier block MC-99373 Holding barrier does not show other barrier MC-103575 Left handed barriers don't summon barrier partcicles MC-108923 its a bug with the kinda new of hand slot this is it barrier block if you hold it in your main hand you can see placed down barrier blocks but if you put it in the of hand then you cant see placed down barrier blocks MC-111606 Barrier block item bug MC-112953 When a barrier is held in the left hand, it doesn't show placed barriers. MC-114367 Barriers dont appear in off hand MC-115233 Barrier Particle Not Appearing MC-132599 Barrier block particle not displayed MC-161827 Barrier in off hand does not display barrier blocks placed in world

Attachments

Comments

Christoforos Charalambous

Confirmed

[Mod]Les3awe

Confirmed for 15w40b

tomudding

Confirmed for 15w41a

[Mod]Les3awe

Confirmed for 15w41b

[Mod]Les3awe

Confirmed for 15w42a

[Mod]Les3awe

Confirmed for 15w43a

[Mod]Les3awe

Confirmed for 15w44a

SupahYayaz

Confirmed snapshot 15w45a

[Mod]Les3awe

Confirmed for 15w46a

42Richtofen42

Confirmed for 15w47c

Ely G

confirmed for 15w49a, 15w49b, and 15w50a. It affects the primary hand as well.

James (inactive)

Confirmed for 15w51b. Affects offhand; does not affect main hand.

Étienne B.

Strange enough, the bug happens also in the main hand. Well, at least for me.

user-f2760

@unknown turn particles on in the video settings

Étienne B.

O.O

...I never existed... ...You saw nothing at all...

James (inactive)

Confirmed for 16w02a.

19Spleen

Confirmed for 1.9-pre4

marcono1234

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this is happening is because the net.minecraft.client.multiplayer.WorldClient.doVoidFogParticles(int, int, int) method only tests if the player holds a barrier block in his mainhand.

public void doVoidFogParticles(int posX, int posY, int posZ)
{
    int i = 32;
    Random random = new Random();
    // Replaced this
//ItemStack itemstack = this.mc.thePlayer.getHeldItemMainhand();
//boolean flag = this.mc.playerController.getCurrentGameType() == WorldSettings.GameType.CREATIVE && itemstack != null && Block.getBlockFromItem(itemstack.getItem()) == Blocks.barrier;
    ItemStack itemStackMainhand = this.mc.thePlayer.getHeldItemMainhand();
    ItemStack itemStackOffhand = this.mc.thePlayer.getHeldItemOffhand();
    boolean flag = this.mc.playerController.getCurrentGameType() == WorldSettings.GameType.CREATIVE && (
            (itemStackMainhand != null && Block.getBlockFromItem(itemStackMainhand.getItem()) == Blocks.barrier) || 
            (itemStackOffhand != null && Block.getBlockFromItem(itemStackOffhand.getItem()) == Blocks.barrier));
    
    BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

    for (int j = 0; j < 667; ++j)
    {
        this.func_184153_a(posX, posY, posZ, 16, random, flag, blockpos$mutableblockpos);
        this.func_184153_a(posX, posY, posZ, 32, random, flag, blockpos$mutableblockpos);
    }
}
James (inactive)

Confirmed for 1.9.1-pre3.

null

Confirmed for 1.9.3-pre3.

Craft

Conirmed for 1.9.4-Pre4

user-f2760

@unknown there's no such thing as 1.9.3-pre4 (yet).

null

Confirmed for 1.9.4.

null

Confirmed for 16w20a.

null

Confirmed for 16w21a.

null

Confirmed for 16w21b.

null

Confirmed for 1.10-pre1.

null

Confirmed for 1.10-pre2.

null

Confirmed for 1.10.

null

Confirmed for 1.10.1.

Joeri

Confirmed for every version up to 1.12-pre6

bemoty

Can confirm for MC 1.12.1.

Yovach

Confirmed to 18w14b

Yanis48

Still in 18w19b

Meri Diana

Confirmed for 18w21b.

Alawnely

Attached screenshot for 1.13-pre1

EDIT: Please change title to "Barrier particle not visible when held"

Asteraoth

Confirmed for 1.13-pre7

Asteraoth

Confirmed for 1.13-pre8

Asteraoth

Confirmed for 1.13

Asteraoth

Confirmed for 18w30b

Asteraoth

Confirmed for 18w31a

neron

This persists in 19w05a as well as 1.13.2

Marwan Zaki

Confirmed for 1.14.3

John Dame

Asteraoth

coschevi

Confirmed

(Unassigned)

barrier, offhand, particle

Minecraft 15w31a, Minecraft 15w32c, Minecraft 15w34d, Minecraft 15w35e, Minecraft 15w41b, ..., Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3, 19w38b

1.15 Pre-Release 2

Retrieved