This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Quote from Indigo » Players and mobs can fall through extending/retracting pistons Player + retracting: http://i.imgur.com/MeZHz.gif Mob + extending: http://i.imgur.com/2DarX.gif
public List<AABB> getCollidingBoundingBoxes(Entity e, AABB box)
public List<AABB> getCollidingBoundingBoxes(AABB box)
for (int i = minX; i < maxX; i++) { for (int j = minZ; j < maxZ; j++) { if (blockExists(i, 64, j)) { for (int k = minY - 1; k < maxY; k++) {
for (int i = minX - 1; i < maxX + 1; i++) { for (int j = minZ - 1; j < maxZ + 1; j++) { if (blockExists(i, 64, j)) { for (int k = minY - 1; k < maxY + 1; k++) {
if (entity.isExtending()) { progress = 1 - progress; }
if (entity.isExtending()) { progress = 1 - progress; } else { progress--; }
if (Facing.xOffsets[side] < 0) { box.minX -= Facing.xOffsets[side] * progress; } else { box.maxX -= Facing.xOffsets[side] * progress; } if (Facing.yOffsets[side] < 0) { box.minY -= Facing.yOffsets[side] * progress; } else { box.maxY -= Facing.yOffsets[side] * progress; } if (Facing.zOffsets[side] < 0) { box.minZ -= Facing.zOffsets[side] * progress; } else { box.maxZ -= Facing.zOffsets[side] * progress; } return box;
box.minX -= Facing.xOffsets[side] * progress; box.maxX -= Facing.xOffsets[side] * progress; box.minY -= Facing.yOffsets[side] * progress; box.maxY -= Facing.yOffsets[side] * progress; box.minZ -= Facing.zOffsets[side] * progress; box.maxZ -= Facing.zOffsets[side] * progress; return box;
Download: http://www.sendspace.com/file/h41500
Screenshots:
Test setup with cows:
Broken DocM77's Iron Lung (one of the pads is transparent due to an unrelated glitch, you can see mobs on it not falling through):
Inside the pads:
Code changes (for mojangsta):
1) If block collision box extends out of the block in any direction other than up (fences), it doesn't collide properly.
In Level in methods
replace
with
2) Piston bounding box is calculated incorrectly.
In MovingPistonTile.getCollisionBB replace
with
and in MovingPistonTile.getBoundingBox replace
with
More bugfixes coming soon!