Added code, accidently deleted it so had to restore, some things MAY be missing, I did my best to fix it up.
Merge https://github.com/KeeperofMee/ClayMod