Minecraft wiki entry for Defeating_a_bastion_remnant, associated text: When exploring a Treasure Room, after clearing out the areas above, you should fill in the surrounding lava and disable/close off the Magma Cube spawner. Gravel and Sand can help you fill in the lava from above, as the lava pool is only 2 blocks deep with the exception of the occasional hole in the base of the bastion. A Potion of Fire Resistance can save your life if a Magma Cube knocks you into the lava pool while you're trying to fill it. Note that because Magma Cubes spawn at all light levels, the only way to disable the spawner is to completely cover it with blocks in a ~9x5x9 area with the spawner being in the center, one block under the top of that area. It's usually more practical to wall off the 9x5x9 area they spawn in instead.