Add some optimizations from EcoCityCraft/Spigot [needs testing]