mojira.dev
MC-271069

Item entities appear to fly towards the player when picked up by a Dolphin that isn't being rendered

Item entities picked up by a dolphin within simulation distance but far enough away to not be visually rendered will appear to fly toward the player as if they're the ones picking up the item.

 

Steps to reproduce:

-Trap a dolphin in a pool of water with an item, name tag it so it won't potentially despawn.

-Move away until the dolphin is no longer visible but still within simulation distance. From a little bit of testing I did it seems to start at about 80 blocks away horizontally with default view distance, simulation distance and entity distance. vertical distance doesn't appear to matter.

-At a certain point, the item entity will appear to fly towards the player and not the dolphin

 

Video of the issue attached, longer better quality video showing f3 menu and settings on google drive here: https://drive.google.com/file/d/1OEsanHmUredeTD3fQM2vhj4q7UDe7-9l/view?usp=sharing

 

Linked issues

Attachments

Comments 2

This behavior can be considered a quirk of Minecraft's entity handling and rendering system. While the dolphin is the one picking up the item, the game adjusts the visual representation of the item's movement to accommodate the player's perspective, even if the dolphin is not being rendered.

I investigated this the other day,

the issue is seemignly caused by the dolphin having a client entity tracking range of 5, which is less then that of item which is 6

this means that when the dolphin picks up the item and the client attempts to find the dolphin to render the animation, it fails and falls back to rendering the animation to the player instead

potential fixes include removing this fallback behaviour or increase the tracking range of dolphins

i used a simple mixin in a fabric mod to acchieve this for my own use

@Mixin(EntityType.Builder.class)
public class EntityTypeMixin<T extends Entity> {
    @Shadow private int clientTrackingRange;

    @Inject(method = "build", at = @At("HEAD"))
    private void injected(String string, CallbackInfoReturnable<EntityType<T>> cir) {
        if ("dolphin".equals(string)) {
            this.clientTrackingRange = 6;
        }
    }
}

AdorableCat

(Unassigned)

Confirmed

Platform

Normal

Items, Rendering

1.20.5, 1.20.6, 1.21, 1.21.1, 24w33a, 1.21.4

Retrieved