Closed LeoBeliik closed 9 months ago
While the intention is noble, this will not work. Note the portion of code that references TOUCH_AABBS:
AABB aabb = TOUCH_AABBS[level.getBlockState(pos).getValue(AdditionalBasePressurePlateBlock.PLACING).ordinal() - 1].move(pos);
The existing code in the pressure plate classes use AABB's that match the upwards facing plate only.
The only reason I removed that code instead of just adding an extra check it's because it was not necessary, vertical and upside-down pressure plates work normally without it, as in, if the entity is not touching it, it won't trigger. Unless I'm misunderstanding the point
It may look like it's working properly for you, but if you actually look at the code, as I stated before the pressure plate is only checking an area that's appropriate for a floor-mounted plate.
To further clarify, this is the bounding box which is being checked:
new AABB(0.125, 0.0, 0.125, 0.875, 0.25, 0.875);
which has a margin of 2 pixels around it, and goes from the ground to 4 pixels high.
This PR makes vertical and ceiling pressure plates to respect the parent conditions for activation.
Whilst this also fixes a crash with quark because they set the sensibility to null it also makes it respect the rule of activation from mods like player pressure plates, since as for now, mobs can activate their pressure plates placed vertically for example.