Feature Request: Make Poison liquid use the fluid shape to tell if you are touching the block and poison you rather than if your bounding box intersects the cube around it
Zepalesque opened this issue ยท 3 comments
Currently, the poison just uses the entityInside method to check if you are inside the block. This causes even being in the air above the tiniest bit of liquid to give you inebration.
To fix this, I suggest that before doing everything in the entityInside method, it should check whether or not the entity's collision box intersects with FlowingFluid#getShape
in the fluid
field of the LiquidBlock (PoisonBlock).
You will also need to convert the VoxelShape
to an AABB
with VoxelShape#bounds()
, and then add the BlockPos
to the AABB to make sure it is at the right location, and then check if that AABB intersects with the entity's AABB.
The issue doesn't exactly derive from that.
There's a Block method called stepOn
, that checks when a player walks on a block.
This of course derives from checking the player's position in collision with the top bounding box of a block.
The method was an intended behavior of the poison to make it a bit more dangerous and different from lava, although we might revision this it's probably staying like this.
ah, ok
The main thing I was thinking was that it's a little odd for it to poison you when you don't fully touch it, and since Aether Mud's hitbox is a little lower than most blocks, stepping near the edge of one of the poison ponds can inflict inebriation on you which can get a bit annoying