I am trying to make it so when you put this block on a ziggurat it replaces the ziggurat with a structure. I got half the job done, checking if it is on a ziggurat, but I am stuck on the structure part. Now when I put the block on the ziggurat it does nothing, and my game crashes in an interesting way. I can walk around and do things, but when I try to exit it crashes with no log.
I've never used your method of placing a structure before, but omg have you never seen "for" loops before?? Your "while" loops could be simplified using "for" loops.
Also don't you know there's the method Block#setUnlocalizedName you should be using instead of overriding the Block#getUnlocalizedName method? You should also be setting the block's registry name, but I'm going to presume you're doing that somewhere else for some reason.