mojira.dev

Dark Star

Assigned

No issues.

Reported

MC-248217 Snowballs Sometimes Pass Through Mobs Duplicate MC-238744 Holding Ctrl to sprint then attacking causes the sprint distance statistic to not increment Duplicate MC-225413 Can't Detect Recently Summoned Area Effect Clouds in Scope of player_hurt_entity Advancement if Damage Was Dealt by an Arrow Cannot Reproduce MC-198289 Knockback Resistance Still Has a Chance to Ignore Knockbacak Completely Duplicate MC-112340 Action bar title overlaps HUD if health is high enough Works As Intended

Comments

@Torzod Minecraft is definitely doing raytracing; if it didn't, then this bug would be significantly more prominent. You could test this yourself by summoning a super fast arrow and observing that the projectile still collides with mobs even though the projectile may have otherwise flown straight through the mob.

@PotholedSea40 It's possible that the projectile simply isn't colliding with anything (even blocks), and there might be some client-side code that handles animations and particles for collisions with blocks. That's not to say that the projectile doesn't exist on the server (see my previous comment), however a way to check this could be to see whether the same projectile clips through multiple mobs when the bug occurs. That would test whether the bug is a property of the projectile, or of the collision.

@PotholedSea40 I assume by "not existing", you mean that the projectile appears on the client, but the server doesn't recognise it as an entity and therefore doesn't update it. I don't think that's the issue as this bug also happens on Spigot servers and I have been able to "patch" and detect this bug through a plugin by doing my own raytracing. This suggests that the projectile does exist on the server, and even though I am using Spigot, it's highly unlikely that there would be two different causes for the exact same bug. It seems as though internally, the projectile's collision isn't being detected by the server, which means that even Spigot isn't aware of the collision (as the ProjectileHitEvent doesn't fire automatically), however I don't know enough about Spigot's architecture to make any conclusions here.

Either way, I don't think those observations are enough to definitively rule out any other possibility, although there is a very simple test you can do to confirm your theory. Setup a repeating command block that runs the following command.

execute if entity @e[type=snowball] run say hi

Then spam snowballs at an entity one at a time until the bug is observed. If the projectile still clips through entities despite being detected by the command, then it exists.

I tested it in 1.17 and couldn't reproduce the bug. My guess is that it was related to another issue and has since been indirectly fixed, but I've attached the file anyway in case the bug creeps up again in a later version.

I noticed a similar issue if you try to apply functions to a list of alternatives in a group table. If you attempt to apply the functions to the entire list, then the game ignores them. If you, however, apply functions to individual entries in "children", the functions are applied as normal.

For example, if I modify your examples like this:

"entries": [
  {
    "type": "alternatives",
    "weight": 9,
    "children": [
      {
        "type": "item",
        "name": "diamond"
      }
    ],
    "functions": [
      {
        "function: "set_name",
        "name": {
          "text": "Custom Name"
        }
      }
    ]
  },
  {
    "type": "item",
    "name": "emerald"
  }
]
"entries": [
  {
    "type": "alternatives",
    "children": [
      {
        "type": "item",
        "name": "diamond",
        "weight": 9,
        "functions": [
          {
            "function: "set_name",
            "name": {
              "text": "Custom Name"
            }
          }
        ]
      }
    ]
  },
  {
    "type": "item",
    "name": "emerald"
  }
]

You should notice that the loot table on the left will generate the emerald without the custom name, while the loot table on the right will set the name of the emerald. This strikes me as rather odd as functions applied to the entire pool or even the entire loot table seems to work normally.

This bug still persists in Minecraft 1.16.1. It's really odd, because if you use the minecraft.custom:minecraft.damage_dealt_resisted criteria, and give a mob a resistance status effect, then this will actually track the damage dealt to the mob that was resisted by the effect if you shoot it with a bow.

This is still an issue in the latest version of Minecraft (1.10).

This is still a concern in the latest snapshot 15w43c.