The Bug
Barriers and light don't display particles when the item is held in the second hand.
Steps to Reproduce
Place down a barrier/light and hold another one in your offhand.
Make sure particles are set to anything other than "minimal" in your video settings as a result of MC-47607/MC-221558.
Take note as to whether or not barrier particles are visible when holding barriers in your offhand.
Observed Behavior
Barrier/light particles aren't visible when holding barrier/light in your offhand.
Expected Behavior
Barrier/light particles would be visible when holding barrier/light in your offhand.
Code Analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by
Attachments
Comments
As the barrier one is a recursion, I suggest reducing this to only the barrier, and linking it as "clones" instead.
Mojira mods won't reopen it and will request a new report be made anyways.
I can confirm that the issue reappeared for barriers.
Can confirm in 21w14a.
Can confirm in 21w15a.
Can confirm in 21w16a.
Can confirm in 21w17a.
Can confirm for 1.17 pre-release 3
Can see why you count this as a bug, as in previous versions barrier particles do appear when there is a barrier in your offhand.
Can confirm in 1.17.
Can confirm in 1.17.1.
I am able to confirm this behavior in 21w43a. Here are some extra details regarding this problem.
The Bug:
Barrier particles aren't visible when holding barriers in your offhand.
Steps to Reproduce:
Place down a barrier and hold another one in your offhand.
Make sure particles are set to anything other than "minimal" in your video settings as a result of MC-47607.
Take note as to whether or not barrier particles are visible when holding barriers in your offhand.
Observed Behavior:
Barrier particles aren't visible when holding barriers in your offhand.
Expected Behavior:
Barrier particles would be visible when holding barriers in your offhand.
Can confirm in 1.18.1.
Can confirm in 1.19.
[media]Can confirm in 1.19.2.
Also affects light blocks.
Affects 1.20.2
Code analysis:
Here inside getMarkerParticleTargets(), a 'Block' object is returned to check elsewhere for if the player for holding it. If the player is holding it, the barrier/particle is rendered. This check however only accounts for the mainhand due to "getMainHandItem()" being used.
Class: net\minecraft\client\multiplayer\ClientLevel.java - Method: getMarkerParticleTargets()
@Nullable
private Block getMarkerParticleTarget() {
if (this.minecraft.gameMode.getPlayerMode() == GameType.CREATIVE) {
ItemStack itemstack = this.minecraft.player.getMainHandItem();
Item item = itemstack.getItem();
if (MARKER_PARTICLE_ITEMS.contains(item) && item instanceof BlockItem blockItem) {
return blockItem.getBlock();
}
}
return null;
}
The issue with the light block is MC-221555 and the barrier is
MC-83003.