OpenBlocks

OpenBlocks

56M Downloads

Magic Pencil blocks not reliably blocking collisions

RoyCurtis opened this issue ยท 2 comments

commented

Ghost physical blocks drawn by Magic Pencils do not seem to prevent entities phasing through the block if they are pushed by other mobs, the player or other forces.

Screenshots

From OpenBlocks 1.4.2 on DW20 1.3.0

Tested with

Reproduction

  1. In a flatland creative world, wall off a 2x2 space with Magic Pencil walls that are 2 blocks thick and 2 blocks tall
  2. Using a Villager spawn egg, spawn 4 villagers in the 2x2 space, one on each block
  3. Using a zombie spawn egg, spawn up to 20 zombies outside the walls at random
  4. Observe zombies go towards villagers, eventually pushing each other inside the pencil walls

Note

I filed this report because of an issue I found with a build of mine, that relied on Magic Pencil blocks to keep mobs fixed in one place. After upgrading from DW20 1.2.1 to 1.3.0, these mobs started escaping at random.

The unusual thing is that I tested using zombies and villagers in an older version of Forge, OpenBlocks and OpenMobsLib (Infinity 1.1.0) and found the same issue, which may suggest:

  • This was always a bug with Magic Pencil, that got worse in a later version of OpenBlocks/Forge
  • My build's issue is actually being triggered by something else

Either way, I had decided to report this specific test case failing as it seemed a genuine bug with Magic Pencils.

commented

Wow, that's probably the best bug report I saw in this project. Thank you!

Anyway, imaginary (pencil and crayon) blocks don't have (and never had) collisions for non-player entities. You can test it by spawning mod on block - it will fall through.

Mob behaviour is actually glitch in their AI - during pathfinding they check for blocks, but not for actual collisions. So they see imaginary block as impassable barrier, even though they could freely walk through it.

If you need block that blocks mobs and allows players to pass, I suggest Ethereal Glass from ExtraUtils.

commented

Oh! I suppose that makes sense, then. I was previously lucky with the AI not deciding to escape the cages.

Thank you for responding and for the suggestion!