Botania

Botania

133M Downloads

Bellethorn range not symetric

chippydip opened this issue ยท 6 comments

commented

Bellethorn range appears to be only 5 blocks in the positive x and z directions and 6 blocks in the negative x and z directions (y range seems fine).

I double-checked the source and it looks like the ranges are missing a "+ 1" for the x and z bounds:

https://github.com/Vazkii/Botania/blob/master/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileBellethorn.java#L52

commented

Same with Heisei Dream, Tigerseye and Tangleberrie.

commented

most likely an issue with pretty any flower with a range on it, iirc its because the positioning is started from the corner of the block and not the centre in minecraft, you'll find the same happens in other mods aswell, i.e. Azanors lamps do it aswell.

commented

Yeah, there are plenty of places where ranges are calculated as (x/z - range) -> (x/z + range + 1), this just isn't one of them.

commented

I don't know if it's the case, but a week ago I was working with this method and adding +1 on the negative axis (X & Y) made the entity detection work properly. If I specify the correct area to the getEntitiesWithinAABB method, the method only returns the entities in the area -1 block in the negative axis. Maybe this is the case.

commented

Interestingly, the Alfheim Portal item detection AABB is correctly aligned with the portal

commented

probably because vaz manually set the bounding box here so it covers the correct places and it isn't dependent on a range