mojira.dev
MC-12000

The hit-box of corner fences isn't the same as the collision-box!

What I expect to see:
When the collision-box of corner fences was fixed, I expected for the hit-box to conform to the new collision box.
What I actually saw:
The hit-box of corner fences isn't the same as the collision-box!
How to recreate:
Replicate the conditions of the screenshot below.

Attachments

Comments

migrated
[media]
kumasasa

Are there any non cubic boxes in Minecraft ?

migrated

Jokes on the side, it causes serious problems with targetting / hitting small mobs standing near the corner.

  • baby chickens are not targettable at all (except with a bow ofc.),

  • adult chickens may only be targetted when you stand far enough from the fence. Targetting them from above when standing on the other side of the fence is impossible.

  • Two-high corner fence might block targetting of other mobs (altough that is just an idea, not tested it yet)

migrated

Minecraft cannot create a hitbox that isn't a rectangular prism. It is a technical limitation.

kumasasa

Sorry, my comment was misread as cheap pun, but actually I meant

Are there any non cubic hit/collision boxes in Minecraft ?

migrated

One can enter into corner fence - this possibility was added in one of the 1.5 snapshots - so collision box (thats the right term?) can be more complex than one box per block. Also stairs have such complex collision boxes I think? (I remember some tweeted screenshot before 1.4 release showing that it became possible to shoot an arrow through a tiny window made with stair block).
As for hitboxes, there are no complex ones at present as far as I know.

kumasasa

Reopened.
May be possible, see stairs.

migrated

The stair hit box is still a cube.

bugi74

Actually, stairs have a separate method for raytracing it, but that is not used for all purposes. It is at least used to trace arrows and mouse clicks (so, yeah, "hitbox" is handled with stairs exact shape). However, when called for things like where the raindrops should hit it, the "bounding box" is taken a bit simpler way. (Detail: there is a bug going on with this, too, see MC-10806.)

And of course, when walking on stairs, the "collision box" is again the exact stairs shape (probably using the same ray tracing, but I haven't checked).

However, it is sort of kinky implementation for stairs. I can imagine the horror-code if the corner fence (let along T- or +-connected) was implemented in a similar way.

migrated

I do not think this is a bug. I am familiar with how the code for this is written, and fences and stairs actually specifically change their collision boxes to this form just for rendering the wire frame, then change it back again. However, I concede that it may be a bad feature.

bugi74

Affects 1.7.4.

bugi74

Affects at least 1.8.8. Also, not just corner fence, but also T-connections of fences.

[Mod]Les3awe

This issue duplicates MC-2666.

migrated

(Unassigned)

Community Consensus

collision-box, fence, hitbox

Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w21b, Snapshot 13w22a, ..., Minecraft 14w08a, Minecraft 1.8.8, Minecraft 1.10.2, Minecraft 16w41a, Minecraft 16w42a

Minecraft 17w47a

Retrieved