Partial revert of 49868d519
1.12.1