Botania

Botania

133M Downloads

Hopperhock filter (item frame) does not function at far coordinates.

OJwithC opened this issue ยท 16 comments

commented

Botania v208

Somewhere just before x530,000 z530,000 (same for negative values), item frame filters, for the hopperhock at least, stop working. If you put an item frame on an adjacent inventory to filter it, the hopperhock picks up everything around it regardless of the flower's setting or the items in the frame. I found this out because the spread command for Garden of Glass put me past those coordinates.

commented

Ok, this is really weird.

commented

Is the position of the Item Frame direction-dependant or does it happen on any side of the chest? :O

commented

I can reproduce it at any side at (55002, 86, 550002).

commented

I'll try as well in my dev environment. This is definitely odd...

commented

I would like to help but it would be nice where i can find the hopperhock flower class (logic)

commented

I'm currently looking at getEntitiesWithinAABB. I don't really get World's MAX_ENTITY_RADIUS.. seems pretty weird to me.

commented

hmmm no clue... Nothing seem to fit there... (that could cause a problem)

commented

At these high coordinates the chunk coordinates extend the range of a short (32.767). Maybe that has something to do with it?

commented

As 0xc6 said, this is due to floating point inaccuracy. Minecraft starts going weird around 100k, and gets worse the further out you go. Players are never meant to get anywhere near that far out under normal circumstances.

See here: MC wiki's farlands article, effects section for more information on the effects of being too far out.

commented

It has probably something to do with floating point inaccuracies. EntityHanging.setDirection mostly uses floats for bounding box calculations, which are too inaccurate for some of the calculations after 524288.

commented

Some of the issues were, but I'm willing to bet that by that far out it's not finding the frames due to rounding.

Edit: Also, this is 1.7.10 still, as far as I know.

Edit 2: Additionally I bet just about anything which tries to get entities in an AABB is wonky that far out. The only real solution is not put players so damn far away from the origin.

commented

That's pretty old facts from before Beta 1.8 though, and entities don't really start lagging and glitching around anymore as before. So I thought the floating point issue got fixed (at least somewhat) too :O

commented

Yea, that's probably what it is then.. might not be able to fix it in a good way then.

commented

One resort might be to ditch the bounding box calculations done in EntityHanging.setDirection and redo them with doubles after the item frame has spawned.

commented

I was going to say something 4 hours ago just after Vazkii for commented, I would have thought the floating point errors would have been fixed by now?