Fix material sampling at max-height

MAGIC-87 #comment This should fix Repair at max height
Add additional safety checks to UndoList
Add spawnCustomMinecart method

Ooooooh- fun!