In my Minecraft world I have a $3\times3\times3$ cube of space which I want to fill with $1\times1\times1$ generator and wire blocks.
I can install a single outlet as part of the room's wall; it takes up none of the $3\times3\times3$ space.
Each generator block must be connected to the outlet through wires, so for each generator there is always a path of adjacent wire blocks that goes from that generator to the outlet. Diagonal neighbors are not adjacent in this case. The outlet can only be touching one block, it can't be installed on the edge between blocks.
I can choose where to place the generators, wires, and outlet. I want to fit as many generators as I can.
I can see a way to get $18$ powered generators, if the middle layer is $9$ wire blocks and the top and bottom layers are $9$ and $9$ generator blocks. But I can't tell if this is the maximum possible.